[vfio-users] No video output from dedicated GPU when doing PCI passthrough

Marius Steffen marius.steffen at posteo.de
Sun Apr 16 21:31:46 UTC 2017


Regarding audio: create an ac97 audio device in virt-manager, and edit 
your VM's XML, setting 'QEMU_AUDIO_DRV' environmental variable to 
'alsa', and playing around with the QEMU_ALSA_* environment variables as 
explained here:
http://stackoverflow.com/a/35998501/4398587
You will need to install the AC97 audio driver with driver signature 
enforcement disabled. For QEMU command-line options and environment vars 
in libvirt XML,
see 
http://blog.vmsplice.net/2011/04/how-to-pass-qemu-command-line-options.html
Configured correctly, this provides a pretty low latency setup. If 
latency is a further concern, switch from standard Arch Linux kernel to 
something optimized for lower latency, e.g. linux-zen/linux-lqx or linux-rt.

For mouse and keyboard switching, something like Synergy (I think it's 
called) or a hardware-based switch would probably be easiest. Otherwise, 
you could do something like this (already mentioned somewhere on this 
mailing list):
https://rokups.github.io/blog/#!pages/full-software-kvm-switch.md
I suggest using ClickMonitorDDC instead of mControl though, as 
mControl's trial period is very short.

Finally, I'd suggest switching to Q35 chipset, as that's a more modern 
architecture, allowing for PCI-E hotplug, which I consider quite useful.

--
Marius Steffen

Am 16.04.2017 um 22:05 schrieb Elias Kosunen:
> I got it to work! Fiddling with the drivers seems to have fixed it. I 
> still need to figure out a way to get audio, keyboard and mouse working 
> properly, but still a huge thank you for your help!
> 
> On 04/16/2017 09:15 PM, Marius Steffen wrote:
>> For HID button over interrupt, see: 
>> https://bugzilla.redhat.com/show_bug.cgi?id=1377155#c12
>>
>> Also for installation of drivers, reattach the virtio driver ISO to 
>> the VM. Then let Device Manager look recursively in the CD drive the 
>> ISO is loaded into, and install all drivers.
>>
>> Marius Steffen
>>
>> Am 16.04.2017 um 15:28 schrieb Elias Kosunen:
>>> XML dump: https://pastebin.com/MFdqSV1F
>>> I haven't touched it by hand at all, it's all generated by virt-manager.
>>>
>>> I installed Windows and booted into it. Here's a screengrab of the 
>>> Windows Device Manager: http://imgur.com/crC1lsd I was able to 
>>> install the drivers for the first one ("Microsoft Basic Display 
>>> Adapter") and after the installation its name changed to "MSI AMD R9 
>>> 380" and its errors went away. For the others, it couldn't 
>>> automatically find the drivers.
>>>
>>> For the "HID Button over Interrupt Driver", the status message was:
>>>    This device is not working properly because Windows cannot load 
>>> the drivers required for this device (Code 31)
>>>    Object Name not found.
>>>
>>> And for the others it was the same:
>>>    The drivers for this device are not installed. (Code 28)
>>>
>>> According to Windows, the "PCI Device" is attached to PCI slot 10, 
>>> "PCI Simple Communications Controller" to slot 7 and "Video 
>>> Controller" to slot 12. Unfortunately, I was unable to figure out 
>>> which devices these refer to.
>>>
>>>
>>> On 04/16/2017 02:49 PM, Marius Steffen wrote:
>>>> Could you please attach your virtual machine's config XML (output of 
>>>> 'sudo virsh dumpxml <your_machine_name>')?
>>>> Also, Graphical Console is not available because you removed the QXL 
>>>> controller and SPICE server. Please try reattaching them (SPICE, 
>>>> Tablet, set video controller type to QXL) and keep your GPU attached.
>>>> Start into Windows 10 (you should be able to use the Graphical 
>>>> Console in virt-manager now) and tell us/take a screenshot of 
>>>> Windows' device manager, and possible errors it's showing regarding 
>>>> your GPU.
>>>
>>> _______________________________________________
>>> vfio-users mailing list
>>> vfio-users at redhat.com
>>> https://www.redhat.com/mailman/listinfo/vfio-users
>>
>> _______________________________________________
>> vfio-users mailing list
>> vfio-users at redhat.com
>> https://www.redhat.com/mailman/listinfo/vfio-users
> 
> _______________________________________________
> vfio-users mailing list
> vfio-users at redhat.com
> https://www.redhat.com/mailman/listinfo/vfio-users




More information about the vfio-users mailing list