Audio Dropouts and Choppy Video in Linux KVM w/ GPU Passthrough

I am by no means a Linux power user, however I have a good grasp on how to operate and maintain the system. I just recently got KVM passthrough working on my MSI B350 PC Mate and Ryzen 1500x. The performance is pretty much on par with bare metal, however I have been experiencing some weird issues.

When playing games that use OpenGL like PSX emulator, or when simply viewing videos on youtube with the latest Firefox build, the audio cuts out and the video playback goes to a few frames per second. Simply refreshing the page or exiting the program and starting again fixes the issues. I have no idea how to debug this so I hoped these forums would be a start.

Audio wise:
usb soundcard/pci/pci-e sound card or ask @SgtAwesomesauce for advice, he helped me to make it less choppy but external soundcard that gets passed on hw lvl works the best.

1 Like

Can you give a bit more information about your system? Distro, kernel version (and any manual patches) and GPUs used?


@sinisa94 thanks for bringing this to my attention.

Or, if the monitor you’re using is connected via HDMI, you could use that audio, since it’s already passed through. Could be less than ideal, depending on your setup though.

1 Like

I have an HDMI audio extractor that I use for certain things. I find it extremely useful.

I built the latest vanilla kernel from source for fedora 27 using the ACS patch. Kernel version is 4.14.14.-300.patched.fc27.x86_64.

I managed to remedy the problem by playing around with a few things. I removed a few passed through usb devices from the VM until I was left with two (the keyboard and mouse) and that seemed to do the trick. Playing back videos no longer exhibits that weird playback bug. But that leaves me now with no sound and any other peripherals I might need. Hopefully this may help others that are also trying to pass through too many usb devices on the virtual usb bus

The next question is If I bought a pci-e usb adapter if it would even work, because the ACS patch isn’t changing the iommu grouping.

Again, I’m currently on a MSI B350 PC Mate Motherboard with a Ryzen 1500x, 1050Ti passed through for the VM.

1 Like

Good question. It depends on the board. Ryzen is notoriously picky when it comes to IOMMU groups and on B350, you’re in rough shape. I don’t think you’ll have much luck on that front.

It may be possible to pass the the /dev/sys/usb device through to the VM. You may not need a totally separate USB card.

If it was the UBS peripherals causing the issue, do you have something that is using the 1000hz polling rate on USB?

I ditched the ryzen system in favor of a x299 system on debian stretch. Proxmox works well for virtualization and i can manage it easily from a web browser and ssh. After passing through my usb controller i was able to solve the issue. Not only did the ryzen system exhibit this issue, but so did the intel system. This leads me to believe that there is some limitation in directly passing through the usb device.

1 Like

There is.

There were a few patches that supposedly fixed it, but I’ve never really found indirect audio passthrough to be good, with the patches enabled. Didn’t even notice an improvement.

did just find this thread by incident. But wanted to say that B350 don’t need to have disadvanteges in IOMMU. I have a MSI B350 Gaming Plus and after a few BIOS updates, the devices are all in separate groups (as far as seperation is possible on Ryzen) now. Only what’s on the chipset is one group, but what I read this is by design of Ryzen.