ICH6, AC97 and ICH9 do not work on QEMU

Hello, I have a KVM with GPU passthrough going, but I have not yet figured out how to make audio working in it. Well, that was a lie, I have but both solutions are not ideal. I can pass through my audio device (I use the VM for video editing and gaming, so I will need sounds outside of the VM to be audible too), I can also open a spice server and do it that way, but the spice server requires an output and that is not a thing I want to have going.

There is a 3rd way, and I do see some options for it, but I cannot find the VFIO sound part in Virtual Machine Manager. This is the way I would like to get audio out, as said ICH6, AC97 and ICH9 do not work so I have come here.

As for HDMI audio, I do not want to use it, because everytime I have used it it was bad, also I have a dedicated speaker system installed and hotplugging that stuff is not exactly an option to consider.

My host is running Arch with Pipewire audio.

If you have any suggestions, please tell me and ask me questions if you want to know other about other convfigurations on my system.

Get a USB Sound DAC and passthrough the USB controler.

1 Like

I want to do it through software.

Found this working solution (no idea why the GUI for Virtual Machine Manager does not do this by default):
In /etc/libvirt/qemu.conf you should find the line which says user = "example" and de-comment it, then change the username to your username.
Later, in the VM’s XML which is usually located in /etc/libvirt/qemu and named according to your VM name you will have to add these lines to use the pipewire-pulse protocol to stream audio from the guest into the host.

<sound model='ich9'>
      <address type='pci' domain='0x0000' bus='0x10' slot='0x02' function='0x0'>
    </sound>
    <audio id='1' type='none'/>

After that you execute this command (to restart the libvirtd service): sudo systemctl restart libvirtd

And the problem should be solved.