KVM sound issue

I cannot seem to find a way to get sound to play on the guest, except for passing through my USB headphones
The closest I got was setting up a ich6 sound entry on libvirt. A device showed up on the guest and it was receiving sounds. It was just not outputting it to my pulse-audio as I'd expect it to.

What Blanger and ApplePI say.

Sound in a KVM is a known issue, a passed through (shared with the host) sound card will have issues from latency to garbled output, my KVM had the latency issue when I used the on-board sound card built into my mother board, no amount of tweaking made it usable playing games, my solution was a less than $20 USB sound card that I could pass directly to the guest using pci-stub, it has worked very well for me, my host uses the on-board SC and the guest uses the USB SC...of course I use headphones while gaming so no extra speakers or was switching needed.

USB DACs are the best solution to this problem unless you have a sound stack that is compatible with KVM such as some modifications to PA

I though i didn't had the issue. But now i suddenly recall yeah i got that too.

1 Like

If you think about how shared hardware works in a KVM it's pushing things to share a keyboard or mouse although both are very doable, but when it comes to a device like a NIC or SC it's going to cause problems with either the host or guest or both, when I shared a NIC between both it worked but latency made playing a on-line game like WOW or GW2 almost impossible. (died every 30 seconds...lol)

For the NIC you need to make a bridge interface to create a virtbr device to use as a NIC instead of the standard Eth0 port, if you just redirect the port itself it will be removed from the host system and given to the slave device.

1 Like

Yeah....I did that as long as the host wasn't using the NIC it worked very well, but since I like to multi-task if I started a file transfer from my host to one of the servers on our network while playing say GW2 it just simply killed the guest connection, it never lost connection but had so much latency that pushing W on the keyboard to move forward in the game took several seconds to respond of course holding the key down was a disaster...lol but adding a 2nd NIC and passing it to the guest solved all the problems.

Is this an Intel NIC or what? I've never had any issues with over 80 guests on as single interface bridge lol.

Nope....it was a Intel NIC I added to the guest but the intergrated was a Qualcomm Atheros Killer E2200 Series on a Asrock MB

The issue for me is I wish to use both OSes at the same time. I have spent ages setting it up, I just need sound
Everything else works flawlessly. I want to be able to share an audio device. I'm not sure if that's possible but I damn well hope so.

Most of us that have hardware pass through use both OSs at the same time, it is the purpose of a KVM vs a normal VM, sharing a audio device will work but it as you have found out has issues, think about it both operating systems are sending signals to a device that was intended to take only one signal from one source at a time....something has to give and it will always be audio quality and the timing of the signal being processed ie delays as the signals being processed.

Unfortunately just like needing a 2nd GPU you will as far as I know you will need a 2nd sound card to get it to work flawlessly at least that is what I had to do and others have said it was their solution also, there are tweaks you can try but I'm not sure what they are since it's been over a year since I did them.

You might read through this thread, I know @mythicalcreature posted some things to try to improve the shared sound card and like I said that was over a year ago but there is a lot of good info in the thread.

1 Like

My current solution to try later today:


Other then this I'll have to just give up.

1 Like

did you try just using a USB sound card that gets attached right to the virtual machine? You can easily pass-trough USB devices.

Don't have one, and I am broke diddle oke

:( yeah, sound over networks does indeed work, but realizing its dumb that its still not working correctly. I usually don't game much on my laptop but i tried to get TLJ to work and when i had solution i indeed started it in KVM/Qemu and the sounds was lagging. I forgot that it was KVM/Qemu since i usually just test networkapplication in it or run some software without sound, but please let me hear if it works well i never really though of it for redirecting it over network inside KVM/Qemu.

I don't think that will work, I may be wrong but I would think that sending the signals over the LAN would add more latency not decrease it, the signals still have to be processed by the same card and then sent across the network, the network would in theory would have more bandwidth but also has other traffic to prioritize and if your also sharing a NIC between the host and guest it will have plenty to do without the added load of the audio signal......let us know how it goes it's a interesting concept. BTW I tried using HDMI and it didn't work either.

hmm yeah true.
Bytheway i just tried Qemu/Kvm inside Gnome Boxes...ok nvm.
Its like somthing got fixed in Fedora.
I got no lags or static on my Qemu/Kvm on Fedora 24(I always keep it up to date).

I think somebody finally can play TLJ under Linux <3 (ME :D)
Only negative part thing now the machine is desperately trying to get fresh air.

Yeah, I'm running Fedora 23 (been using Fedora for my daily driver with the KVM since 22 (over a year)) but still had the sound issue, honestly after using the USB sound card I have no need to do anything else, it just works and like I said above it was like $20 US, windows recognized it and I was able to load the drivers off the cd into the guest OS....

This is what I bought, it was on sale for like $22 or $24 at that time.

http://www.newegg.com/Product/Product.aspx?Item=9SIA6ZP3K25595&cm_re=usb_sound_card-_-29-128-012-_-Product

Well i had the sound issues before but i just wanted to test it out for this post and i was surprised i couldn't find the bug. Something must have fixed it in the last 2 weeks. At least for me.