GfxTablet
GfxTablet copied to clipboard
nixos -> Can't see "Network Tablet" in xinput list
$ sudo networktablet
GfxTablet driver (protocol version 2) is ready and listening on 0.0.0.0:40118 (UDP)
Hint: Make sure that this port is not blocked by your firewall.
$ sudo xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ USB OPTICAL MOUSE id=11 [slave pointer (2)]
⎜ ↳ USB OPTICAL MOUSE Consumer Control id=13 [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)]
↳ Asus Wireless Radio Control id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ Power Button id=9 [slave keyboard (3)]
↳ Sleep Button id=10 [slave keyboard (3)]
↳ USB OPTICAL MOUSE Keyboard id=12 [slave keyboard (3)]
↳ USB2.0 VGA UVC WebCam: USB2.0 V id=14 [slave keyboard (3)]
↳ Asus WMI hotkeys id=15 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=16 [slave keyboard (3)]
↳ USB OPTICAL MOUSE Consumer Control id=17 [slave keyboard (3)]
$ cat /etc/X11/xorg.conf.d/10-evdev.conf
#
# Catch-all evdev loader for udev-based systems
# We don't simply match on any device since that also adds accelerometers
# and other devices that we don't really want to use. The list below
# matches everything but joysticks.
Section "InputClass"
Identifier "evdev pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection
Section "InputClass"
Identifier "evdev keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection
Section "InputClass"
Identifier "evdev touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection
Section "InputClass"
Identifier "evdev tablet catchall"
MatchIsTablet "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection
Section "InputClass"
Identifier "evdev touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection
xserver config https://github.com/srghma/dotfiles/blob/d34e09a078521326a0657012f016ce6e04a84e41/nixos/root/services/default.nix#L83-L120
gfxtablet is added here https://github.com/srghma/dotfiles/blob/d34e09a078521326a0657012f016ce6e04a84e41/nixos/root/environment/default.nix#L181
$ realpath $(whereis networktablet)
/home/srghma/networktablet:
/nix/store/wiphsmvzfg3hjywdnl2dhrv2fr934yry-gfxtablet-uinput-driver-1.4/bin/networktablet
I also use nixos and had the same problem. I noticed that in /var/log/X.0.log it showed that the tablet was rejected with the message:
[ 3951.940] (EE) event20 - Network Tablet: libinput bug: missing tablet capabilities: resolution. Ignoring this device.
I was able to fix this by adding a resolution value for "pressure" and recompiling. I'm not sure what resolution in terms of pressure is, but it fixed it.
Here is the patch: z.txt