[Spice-devel] Agent crashes on Alpine Linux guest due to lack of /dev/uinput

let-me-use-copy-and-paste let-me-use-copy-and-paste at proton.me
Thu Nov 10 03:14:10 UTC 2022


> > > I installed Alpine Linux 3.16 virtual machine edition on QEMU/KVM using Virt-Manager. I installed XFCE on it. I wanted to enable copy-and-paste, so I tried to install spice-vdagent on it, but it kept crashing. I checked the output using the "-x" parameter, and basically, it crashed due to the lack of /dev/uinput. The screenshot is at https://i.imgur.com/9WKaVG8.png
> > > 
> > > I do not know Linux much, so I am not sure if /dev/uinput is not present due to the settings of the virtual machine or because I have not installed something on Alpine Linux. I tried the standard edition of Alpine, and right after the installation, /dev/uinput was not present.
> > > 
> > > In case that Alpine Linux indeed does not support /dev/uinput, can't the spice service run anyway? All I want is text copy-and-paste between the host and the guest, and does that feature need /dev/uinput?
> > 
> > Hi,
> > try to add "-f -u /dev/null" to the parameters (that is
> > "--fake-uinput --uinput-device /dev/null").
> > 
> > Frediano
> 
> 
> In Alpine Linux, if I install the "spice-vdagent" package, there seem to be two executables: spice-vdagentd and spice-vdagent. I ran spice-vdagentd with "-x -d -d -f -u /dev/null" and this time, it did not crash. But as soon as I ran "spice-vdagent -x -d", the virtual machine's mouse stopped working. With the debug messages from spice-vdagentd, I knew that the daemon was receiving the mouse pointer movements and button clicks, but somehow the XFCE desktop did not get it, so I could not do things like clicking a window. Keyboard was working, though. Also, probably copy-and-paste also would work, because in the debug message from spice-vdagent, it seemed to have received the event, when I copied some text on the host OS. How can I fix this mouse not moving problem?
> 
> Also, there is another problem. It seems that after running "spice-vdagentd -x -f -u /dev/null", any subsequent execution of it fails with "Fatal could not create the server socket /run/spice-vdagentd/spice-agent-sock: Error binding to address (GUnixSocketAddress): No such file or directory. Rebooting the guest OS did not solve the problem. Here is the screenshot: https://i.imgur.com/pKtD8BH.png
> 
> Luckily, I had created a snapshot right after installing Alpine Linux and XFCE, so I can revert it and keep testing. If there is anything more I can do, please let me know.

If there currently is no way to solve this problem, can't the agent be updated so that it would not crash when /dev/uinput is not present, and continue to do what it can do without /dev/uinput? I mean, all I want is copy-and-paste, and I am not sure why that cannot function without /dev/uinput.


More information about the Spice-devel mailing list