So maybe a rather esoteric problem, but I’ll post what I’m experiencing. I have a Debian 11 system that I upgraded from Debian 9. I got the latest driver from eGalax (eGalaxTouch Linux Driver - specifically https://www.eeti.com/touch_driver/Linux/20220318/eGTouch_v2.5.10703.L-x.tar.gz) and am running the latest kernel. It is a serial touchscreen assigned to /dev/ttyS3
and I can cat
that file, touch the screen and get binary output.
Linux 00187da19e9d 5.10.0-13-amd64 #1 SMP Debian 5.10.106-1 (2022-03-17) x86_64 GNU/Linux
These installed packages may be relevant:
ii xserver-xorg-input-all 1:7.7+22 amd64 X.Org X server -- input driver metapackage
ii xserver-xorg-input-libinput 0.30.0-1 amd64 X.Org X server -- libinput input driver
ii libinput-bin 1.16.4-3 amd64 input device management and event handling library - udev quirks
ii libinput-dev:amd64 1.16.4-3 amd64 input device management and event handling library - development files
ii libinput-tools 1.16.4-3 amd64 input device management and event handling library - command line tools
ii libinput10:amd64 1.16.4-3 amd64 input device management and event handling library - shared library
ii libevdev-dev:amd64 1.11.0+dfsg-1 amd64 wrapper library for evdev devices - development files
ii libevdev2:amd64 1.11.0+dfsg-1 amd64 wrapper library for evdev devices
ii python3-libevdev 0.5-3 all Python 3 wrapper for libevdev
I have run the setup script and tried the both the libinput and non libinput versions of their xorg.conf. I have little understanding of linux input devices and xorg configs.
# /usr/share/X11/xorg.conf.d/52-egalax-virtual-libinput.conf
Section "InputClass"
Identifier "eGalax touch class"
MatchProduct "eGalax Inc.|Touchkit|eGalax_eMPIA Technology Inc."
MatchDevicePath "/dev/input/event*"
Driver "void"
Option "Ignore"
EndSection
Section "InputClass"
Identifier "eGalax mouse class"
MatchProduct "eGalax Inc.|Touchkit|eGalax_eMPIA Technology Inc.|eGalaxTouch Virtual Device"
MatchDevicePath "/dev/input/mouse*"
Driver "void"
Option "Ignore"
EndSection
Section "InputClass"
Identifier "eGalax joystick class"
MatchProduct "eGalax Inc.|Touchkit|eGalaxTouch Virtual Device"
MatchDevicePath "/dev/input/js*"
Driver "void"
Option "Ignore"
EndSection
Section "InputClass"
Identifier "eGalax virtual class"
MatchProduct "eGalaxTouch Virtual Device"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Also this, seemingly confirmed useless udev rule:
# /etc/udev/rules.d/99-egalax-udev.rules
ACTION=="add", ENV{ID_VENDOR_ID}=="0eef", ENV{ID_INPUT}=""
The best part is that there is a closed source daemon and service called eGTouchD
running, I wonder if that is messing with it somehow.
X11 stuff
When looking in /var/log/Xorg.0.log
I am seeing the following recurring over and over:
[ 735.737] (II) config/udev: Adding input device eGalaxTouch Virtual Device for Single (/dev/input/mouse0)
[ 735.737] (**) eGalaxTouch Virtual Device for Single: Ignoring device from InputClass "eGalax mouse class"
[ 735.737] (II) config/udev: Adding input device eGalaxTouch Virtual Device for Single (/dev/input/js0)
[ 735.737] (**) eGalaxTouch Virtual Device for Single: Ignoring device from InputClass "eGalax joystick class"
[ 735.779] (II) config/udev: Adding input device eGalaxTouch Virtual Device for Single (/dev/input/event9)
[ 735.779] (**) eGalaxTouch Virtual Device for Single: Applying InputClass "libinput pointer catchall"
[ 735.779] (**) eGalaxTouch Virtual Device for Single: Applying InputClass "eGalax virtual class"
[ 735.779] (**) eGalaxTouch Virtual Device for Single: Applying InputClass "eGalax virtual class"
[ 735.779] (II) Using input driver 'libinput' for 'eGalaxTouch Virtual Device for Single'
[ 735.779] (**) eGalaxTouch Virtual Device for Single: always reports core events
[ 735.779] (**) Option "Device" "/dev/input/event9"
[ 735.779] (**) Option "_source" "server/udev"
[ 735.780] (II) event9 - eGalaxTouch Virtual Device for Single: is tagged by udev as: Mouse
[ 735.780] (II) event9 - eGalaxTouch Virtual Device for Single: device is a pointer
[ 735.780] (II) event9 - eGalaxTouch Virtual Device for Single: device removed
[ 735.832] (**) Option "config_info" "udev:/sys/devices/virtual/input/input18/event9"
[ 735.832] (II) XINPUT: Adding extended input device "eGalaxTouch Virtual Device for Single" (type: MOUSE, id 11)
[ 735.832] (**) Option "AccelerationScheme" "none"
[ 735.832] (**) eGalaxTouch Virtual Device for Single: (accel) selected scheme none/0
[ 735.832] (**) eGalaxTouch Virtual Device for Single: (accel) acceleration factor: 2.000
[ 735.832] (**) eGalaxTouch Virtual Device for Single: (accel) acceleration threshold: 4
[ 735.833] (II) event9 - eGalaxTouch Virtual Device for Single: is tagged by udev as: Mouse
[ 735.833] (II) event9 - eGalaxTouch Virtual Device for Single: device is a pointer
When it gets to this point, I am able to touch the screen and the mouse moves (not at the calibration point yet), but when I stop touching, about 2 seconds later I get:
[ 777.465] (II) config/udev: removing device eGalaxTouch Virtual Device for Single
[ 777.465] (II) event9 - eGalaxTouch Virtual Device for Single: device removed
[ 777.500] (II) UnloadModule: "libinput"
This repeats over and over in the logs, so seems like the touchscreen is being removed since there’s no activity, which doesn’t quite make sense. I dug in a bit further with xinput
, and found the following appears occasionally, in the time when I can visually see screen touches affecting the mouse cursor:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ eGalaxTouch Virtual Device for Single id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ USB2.0 Video Camera: USB2.0 Vid id=9 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=10 [slave keyboard (3)]
ID=11 is constantly being added and removed every 30 odd seconds (unless I am touching the touchscreen to send activity on the serial line).
Libinput
So digging a bit deeper I added the libinput command, and ran libinput debug-events
:
-event2 DEVICE_ADDED Power Button seat0 default group1 cap:k
-event5 DEVICE_ADDED Video Bus seat0 default group2 cap:k
-event1 DEVICE_ADDED Power Button seat0 default group3 cap:k
-event4 DEVICE_ADDED USB2.0 Video Camera: USB2.0 Vid seat0 default group4 cap:k
-event0 DEVICE_ADDED AT Translated Set 2 keyboard seat0 default group5 cap:k
-event9 DEVICE_ADDED eGalaxTouch Virtual Device for Single seat0 default group6 cap:p left scroll-nat calib
event9 DEVICE_REMOVED eGalaxTouch Virtual Device for Single seat0 default group6 cap:p
-event9 DEVICE_ADDED eGalaxTouch Virtual Device for Single seat0 default group7 cap:p left scroll-nat calib
event9 DEVICE_REMOVED eGalaxTouch Virtual Device for Single seat0 default group7 cap:p
-event9 DEVICE_ADDED eGalaxTouch Virtual Device for Single seat0 default group8 cap:p left scroll-nat calib
event9 POINTER_MOTION_ABSOLUTE +133.449s 61.62/ 42.48
event9 POINTER_MOTION_ABSOLUTE +133.449s 61.52/ 42.48
event9 POINTER_MOTION_ABSOLUTE +133.473s 61.33/ 43.55
event9 DEVICE_REMOVED eGalaxTouch Virtual Device for Single seat0 default group8 cap:p
You can see it being removed after I stop touching it.
Dmesg
Finally, in line with the additions/removals I’m seeing this constantly repeated in dmesg
:
[ 13.209696] input: eGalaxTouch Virtual Device for Single as /devices/virtual/input/input9
[ 39.980094] input: eGalaxTouch Virtual Device for Single as /devices/virtual/input/input10
[ 66.714542] input: eGalaxTouch Virtual Device for Single as /devices/virtual/input/input11
[ 85.238652] input: eGalaxTouch Virtual Device for Single as /devices/virtual/input/input12
[ 153.162989] input: eGalaxTouch Virtual Device for Single as /devices/virtual/input/input13
As I said, I have a giant blindspot in this area, but I’m still digging and learning.
Thanks for coming to my TED talk.