Blub / netevent

Input-Event device cloning utility. Use it together with ssh/netcat/... to share input devices among different machines.
GNU General Public License v2.0
148 stars 14 forks source link

ETPS/2 Elantech Touchpad: ERROR: failed to grab input device: Device or resource busy #5

Closed graytron closed 2 years ago

graytron commented 6 years ago

I have an old Debian jessie i386 laptop with ETPS/2 Elantech Touchpad touchpad, which I'm trying to share with a remote Raspberry Pi 3B.

Configuration file /etc/netevent/pi3-wlan.conf on local is following:

device add mymouse /dev/input/by-path/platform-i8042-serio-1-event-mouse
device add mykbd /dev/input/by-path/platform-i8042-serio-0-event-kbd
hotkey add mykbd key:69:1 grab toggle
hotkey add mykbd key:69:0 nop
output add myremote exec:ssh pi@pi3-wlan netevent create
use myremote

When I run the command below:

$ netevent daemon -s /etc/netevent/pi3-wlan.conf /tmp/netevent-command.sock
added device mymouse
added device mykbd
added hotkey 1:69:1 for device 1
added hotkey 1:69:0 for device 1
added output myremote

... it gives me the following error message when hotkey is pressed:

ERROR: failed to grab input device: Device or resource busy

So, the touchpad is not grabbed nor shared with the remote system.

According to fuser, only Xorg is using device /dev/input/by-path/platform-i8042-serio-1-event-mouse, in addition to netevent, when netevent is running.

Sharing a USB mouse (Logitech MX518) on the same local system works just fine, so the problem seems to be related to ETPS/2 Elantech Touchpad or its features.

Please let me know how I can help resolving this issue.

graytron commented 6 years ago

I just realized that I have set Option "GrabEventDevice" "1" for the synaptics driver in /etc/X11/xorg.conf, which is the reason for this error and problem in the first place.

Before closing this issue, I will test setting it to "0". Hopefully there will be no side effects.

Blub commented 6 years ago

Ah thanks a lot for digging into this a bit more. It would probably be good to mention this option in the docs/manpage's Notes section, so let's keep this open as a reminder until then.

graytron commented 6 years ago

Yes, it is probably a good idea to document this synaptics driver feature.

Option "GrabEventDevice" "0" fixed the grabbing error and issue with no negative side effects that I can tell.

There's still no mouse pointer movement on remote Xorg, although events are received there (similar to issue #4).