tl;dr possible to setup a config-based disablement of touchscreen’s touch-interactions? I think I’ve identified the faulty touchscreen via xinput below (and I’m 99% sure there’s no bios disable-option; I hunted around that UI thrice already). I’d love to hear I’m wrong about BIOS though… that’d be much easier.
I have a Lenovo ThinkPad X1 Nano Gen 1 (20UN005JUS) for which the laptop’s screen just got violently stepped on. It’s still usable and crystal clear, except the touchscreen sensor is now erratically detecting inputs. I am able to disable it via xinput --disable 9 (the device listed as xwayland-keyboard:15 id=9 [slave keyboard (3)]), but I’m obviously looking for a way to codify this properly in my nix config files. Can anyone point me in the right direction?
a. “nixos libinput” to see if there’s a general guide on passing commands like above but via config
b. “gnome 40 disable touchscreen” to see if there’s alternatives to my above method (libinput gives me warnings about my wayland usage)
udev investigation
the latter reveals this ZorinOS forum thread with a suggestionffor a new udev rule setting ATTR{authorized}="0" for the matching device (the full line given:SUBSYSTEM=="usb", ATTRS{idVendor}=="VID", ATTRS{idProduct}=="PID", ATTR{authorized}="0"). udev sounds better because I know there’s good udev config support in nixos, but I’m not sure what my device IDs would be… I see the following when running lsusb:
$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 003: ID 04f2:b6ea Chicony Electronics Co., Ltd Integrated Camera
Bus 003 Device 004: ID 8087:0026 Intel Corp. AX201 Bluetooth
Bus 003 Device 005: ID 06cb:00bd Synaptics, Inc. Prometheus MIS Touch Fingerprint Reader
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
I’m guessing my touchscreen, if it’s even listed there, is one of the first three lines or the last line. If anyone has ideas/knowledge here, please share!
Searching the web for how to identify a screen in udev’s terms, I only found a udevadm info CLI, but it doesn’t reveal anything that makes me confident I’m even looking at the right item:
output of `udevadm info --query=property --name=/dev/input${i}` run in a loop
tl;dr tips to disable hid-multitouch via nixos config?
On my millionth websearch I finally came across a working manual-solution, but still seeking help to declare via nixos config.
manual-fix: touch driver's API: the unbind file in /sys/bus/hid/drivers/hid-multitouch
Manual solution
So here’s the solution I found: I can disable the touchscreen via linux kernel driver hid-multitouch:
list the currently bound multitouch devices:
$ ls -la /sys/bus/hid/drivers/hid-multitouch/
# you'll see symlinks here named after the ID of the device.
# eg: for me:
# - _one_ was my mouse-touchpad
# - the _other_ was my cracked touchscreen
unbind one at a time until you identify which is the culprit:
$ echo SOME_DEVICE_ID_HERE |
sudo tee /sys/bus/hid/drivers/hid-multitouch/unbind
# or re-enable via:
$ echo SOME_DEVICE_ID_HERE |
sudo tee /sys/bus/hid/drivers/hid-multitouch/bind
So I’ve confirmed I have the correct device ID, and disabling it fixes my issues. Now to do this persistently across reboots…
TBD: how to do this via .nix configs…
Obviously I’d like to do that manual fix via nix config, eg: /etc/nixos/hardware-configuration.nix? But I’m not seeing anything obvious with my current web searches.