• [gentoo-user] Audio stopped working in KVM with libvirtmanager

    From Nikos Chantziaras@21:1/5 to All on Sat May 7 15:50:02 2022
    Audio in KVM (qemu) launched through libvirtmanager used to work fine
    last time I used it (about 3 months ago.) There has been lots of updates
    since then, including a switch from Pulseaudio to Pipewire, and
    something along the way broke it. Now I get no sound whatsoever. qemu
    doesn't even show up as an application in the audio mixer, nor in the
    output of "pw-top".

    If I launch the VM directly through qemu with:

    qemu-system-x86_64 [...] -audiodev id=audio1,driver=pa

    then it works fine. But if I launch it through libvirtmanager, it
    doesn't. Even if I force the use of "-audiodev id=audio1,driver=pa" in
    the XML of the VM in /etc/libvirt/qemu/, it still doesn't work. There's
    no error anywhere, no warning, nothing in the logs.

    Does anyone have any idea what to do?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Wed May 11 19:33:40 2022
    On Saturday, 7 May 2022 14:45:06 BST Nikos Chantziaras wrote:
    Audio in KVM (qemu) launched through libvirtmanager used to work fine
    last time I used it (about 3 months ago.) There has been lots of updates since then, including a switch from Pulseaudio to Pipewire, and
    something along the way broke it. Now I get no sound whatsoever. qemu
    doesn't even show up as an application in the audio mixer, nor in the
    output of "pw-top".

    If I launch the VM directly through qemu with:

    qemu-system-x86_64 [...] -audiodev id=audio1,driver=pa

    then it works fine. But if I launch it through libvirtmanager, it
    doesn't. Even if I force the use of "-audiodev id=audio1,driver=pa" in
    the XML of the VM in /etc/libvirt/qemu/, it still doesn't work. There's
    no error anywhere, no warning, nothing in the logs.

    Does anyone have any idea what to do?

    I don't use libvirt, but use QEMU from a console. For the last couple of versions I have been getting these sort of notices when I launch a Win10 VM:

    ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.6.1/work/alsa-lib-1.2.6.1/ src/pcm/pcm.c:8568:(snd_pcm_recover) underrun occurred

    I don't have pulseaudio on this PC, only alsa modules and pipewire with
    default settings. The VM audio works, but it clips. I haven't looked into it yet, because audio in VM is less of an issue for my use case, hence I have no useful suggestions (yet). :-)

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmJ8AYQACgkQseqq9sKV Zxly1hAAnSAPe31i4ttK6lSkMQtyEpp2LKE9utUUzvDQ4UDILEB7zbPF8qkE1iZa AbA/FSlYQFPp43pbdwN4Ci5z8bMAx+JtIdqiGLLMzy/BUXExMX+2P0YX07wkm+gh GKgu9nyk802ArhBx6DhrNCdtORZ4Mhci1PUwW3xw7bN8tpt2v8Lk7PVx5774tfjk DDrQ+BWIqu0QdEWnAL+/niPCn/ec6Of02HnTMHn34m8KGZQ+taak4zo8lJB84FNp Uu8eQDVeaP/AwVVxkbUzqALIz8PM9IS6FWqc4+h9qL36NwvmZhMT/K3XPWxFT2aJ OpaYYgzGYyOBLBViWmgY0ddGZdwP8+BI9IKQimcplY0v7zCfTzrSs+/ihiVjMA+M vPBEsXxkOHV2fGb3OtZuwUAt+t2xS/3M7uHPX4EWFpEQxq52+L3WM+5EaP4uaXUJ cWGxlbwYr2i97C4F2rrRNQ7J++cjIkfT4DoI4KPHvnnsupZXNw2URq3AOTHQr50j 71kP8Hi08pabeDqgYP7Wttj+bvEI13+3g55ESqVmo2lPMSCTYDsVWU6zAQ7GFf05 J7SNIHqlomHz1fhcpZBIIFn/U/sGmhBA5OasnYPZ6acqtlEfrZ8uWceN4uONH77t U8j1tc6TXh+TFXE/LKJpV8oxnSXNfm6amxeuI1v5XWHlcWAFGuk=
    =B56y
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)