Re: libvirtError with pipewire audio backend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/17/24 08:12, Karl Frederick Roldan wrote:
> Hi everyone,
> 
> I'm having trouble regarding using the pipewire backend for libvirt. My
> OS is GNU Guix with Wayland and pipewire running with wireplumber on a
> user session. I have the following versions:
> 
> libvirt-9.10.0 (with pipewire enabled)
> 
> qemu-8.2.2 (with pipewire enabled)
> 
> libpipewire-1.0.3
> 
> I only modified the =<audio>= configuration in the xml file using =sudo
> virsh edit win10= as follows:
> 
>     <audio id='1' type='pipewire' runtimeDir='/run/user/1000'/>
> 
> I can confirm that pipewire is running and that I have pipewire sockets
> in the directory specified. But when running the VM using virt-manager,
> I get the following error:
> 
>     Error starting domain: internal error: process exited while
> connecting to monitor: 2024-09-17T05:54:03.785811Z qemu-system-x86_64:
> Failed to initialize PW context
> 
>     Traceback (most recent call last):
>       File
> "/gnu/store/nxpr6npj618pqmlanqqh7ks9a92jgm98-virt-manager-4.1.0/share/virt-manager/virtManager/asyncjob.py", line 72, in cb_wrapper
>         callback(asyncjob, *args, **kwargs)
>       File
> "/gnu/store/nxpr6npj618pqmlanqqh7ks9a92jgm98-virt-manager-4.1.0/share/virt-manager/virtManager/asyncjob.py", line 108, in tmpcb
>         callback(*args, **kwargs)
>       File
> "/gnu/store/nxpr6npj618pqmlanqqh7ks9a92jgm98-virt-manager-4.1.0/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
>         ret = fn(self, *args, **kwargs)
>       File
> "/gnu/store/nxpr6npj618pqmlanqqh7ks9a92jgm98-virt-manager-4.1.0/share/virt-manager/virtManager/object/domain.py", line 1402, in startup
>         self._backend.create()
>       File
> "/gnu/store/yaqxaja0ckyf6fm7gnd9iqlrijz6qcqy-python-libvirt-10.6.0/lib/python3.10/site-packages/libvirt.py", line 1362, in create
>         raise libvirtError('virDomainCreate() failed')
>      libvirt.libvirtError: internal error: process exited while
> connecting to monitor: 2024-09-17T05:54:03.785811Z qemu-system-x86_64:
> Failed to initialize PW context
> 
> If I switch the audio backend back to =spice=, the VM will run but
> there's no sound. I am not sure if this is a virt-manager problem or I
> somehow misconfigured libvirt. How should I proceed about this problem?
> 

Is pipewire daemon running? Also, if you run QEMU under different user
than UID 1000 then I guess QEMU can't connect to the pipewire socket
under runtimeDir.

There might be some more info why QEMU was unable to init PW under
/var/log/libvirt/qemu/$dom.log

Michal




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux