GPU Passthrough With Libvirt: Disabling the VGA Emulation

I followed this walkthrough and have a VM with GPU PCI passthrough working, installed the Radeon drivers.

I am already a user of virt-manager and it makes it much easier to manager VMs, generally, so I diverged from the blog post a little in that I used virt-manager and virsh edit.

The problem is that libvirt keeps adding the default VGA emulation (this is documented behavior), which makes the Windows guest prefer that over the Radeon display device. I can set the type of video to none (as suggested by the documentation) but then no output is shown.

Probably this is some really basic ignorance on my part with regard to how video works with libvirt, can somebody enlighten me?

How about disabling the VGA device in windows device manager?

I tried that, also no video output. So probably the problem is not really the disabling itself, but more “how do I still get video output”. I think it has something to do with the Spice Server Display (similar to VNC) video output which is intended for remote access but I don’t know how to get more direct access to the video output generated by qemu using virt-manager.

Are you trying to use the QEMU window on the Linux host for your display? Or are you using the display out(s) from the back of the passed through GPU?

The QEMU windows does not have 3d acceleration because it always uses the emulated VGA device even if you have a GPU passed through. If you want to have a window on the linux host that has the accelerated GPU display output, then take a look at looking-glass. https://looking-glass.hostfission.com/

That sound exactly like what I need. I guess I had assumed this would be a standard feature of qemu but I guess that is not too common a use case so many thanks to Geoffrey McRae for developing it.

Online information could be a lot more explicit about needing to either connect a dedicated monitor or installing this framebuffer tool, so thanks to you for pointing me in the right direction.

Well, you came to the right place for looking-glass. See the post below for, some more links to useful threads.

Actually, since I’ll need to use a USB toggle for my mouse anyway I might as well just use the KVM I’m not really using. This works great for video.

For mouse and keyboard not so much because I’m passing through the devices, not one of the USB ports. So when the machine is on I can no longer control the host on one of my other 2 monitors.

Still figuring out how to solve this.