No audio with SPICE + pipewire, halts with ALSA, Qemu pipewire unsupported

  • I have tried to make the sound work between host as a debian + pipewire with KVM using SPICE and pipewire in the guest, i wasnt successful, no sound is ported to the host. Tested this with debian-12 .iso on KVM but result was the same.

@HulaHoop have you by any chance tried this?

  • If i change SPICE to ALSA in VM configs, it will result into the same situation of virtualbox mentioned here:
  • If i change it to pipewire <audio id='1' type='pipewire'/> it will not be acceptable by QEMU:
Error starting domain: internal error: process exited while connecting to monitor: 2024-09-04T18:13:40.241754Z qemu-system-x86_64: Unknown audio driver pipewire'. Perhaps you want to install qemu-system-gui package?

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 72, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 108, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
    ret = fn(self, *args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 1402, in startup
    self._backend.create()
  File "/usr/lib/python3/dist-packages/libvirt.py", line 1379, in create
    raise libvirtError('virDomainCreate() failed')
libvirt.libvirtError: internal error: process exited while connecting to monitor: 2024-09-04T18:13:40.241754Z qemu-system-x86_64: Unknown audio driver pipewire'. Perhaps you want to install qemu-system-gui package?

So the user is without sound if he use pipewire on host and guest with KVM at the moment.

1 Like

Is it installed? Try installing it.

sudo apt update
sudo apt install qemu-system-gui

If it is already installed and you’re still getting this error message, could you report this please to upstream KVM?

1 Like
1 Like

The reply indicates that there might be something wrong with our KVM XML configuration files.

The comment states that,

-device virtio-sound-pci,audiodev=system -audiodev pipewire,id=system

works with QEMU command line

We however are using libvirt, which is a wrapper, which then runs QEMU with similar options. At time of writing, we are using:

    <sound model='ich9'>
      <codec type='output'/>
    </sound>

Looking at the libvirt manual chapter sound…

    <sound model='virtio'>
      <codec type='output'/>
    </sound>

Could you try that please?

We might also have to delete <codec type='output'/>.

We might also have to set type=.

    <sound model='virtio'>
        <codec type='output'/>
        <backend type='pipewire'/>
    </sound>

But I hope this won’t be necessary. It would be more compatible if QEMU / KVM can autodetect this.

1 Like

will lead to unacceptable/wrong argument scheme.

1 Like
1 Like

Debian pipewire host + Debian pipewire guest with SPICE = No sound

https://lists.libvirt.org/archives/list/users@lists.libvirt.org/thread/JGEVXVUPN5FB7Q3GSZ6VMX53MVVVJJH2/

1 Like