I'm running Ubuntu 22.10 (Wayland) on a Lenovo ThinkPad T15 Gen2 laptop, and while this particular laptop came configured with a touchscreen, I never use it intentionally: on occasion I've managed to bump the screen which would then register some kind of touch event. So, I wanted to go ahead and disable the touchscreen once and for all.
First, I needed to find the hardware. This was pretty easy using sudo lshw
:
...
*-input:11
product: GTCH7503:00 2A94:D64D Touchscreen
physical id: d
logical name: input218
logical name: /dev/input/event7
logical name: /dev/input/mouse2
capabilities: i2c
...
Knowing the name of the touchscreen hardware (GTCH7503:00 2A94:D64D
), I could then look in the logs using sudo dmesg | grep -i GTCH
to understand how this hardware is getting loaded/registered:
[ 2.035353] input: GTCH7503:00 2A94:D64D Touchscreen as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-2/i2c-GTCH7503:00/0018:2A94:D64D.0001/input/input6
[ 2.036955] hid-generic 0018:2A94:D64D.0001: input,hidraw0: I2C HID v1.00 Device [GTCH7503:00 2A94:D64D] on i2c-GTCH7503:00
[ 8.946824] input: GTCH7503:00 2A94:D64D as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-2/i2c-GTCH7503:00/0018:2A94:D64D.0001/input/input11
A First Solution
I now know that my Lenovo touchscreen is getting managed through both the hid-generic
and the hid-multitouch
modules. So, I should be able to disable my touchscreen if I remove both of these modules like this:
sudo modprobe -r hid_generic
AND
sudo modprobe -r hid-multitouch
This works: no touchscreen. Of course, to make this permanent, I'd need to create a file to blacklist these modules in a .conf
file in /etc/modprobe.d
.
But there's more...
A Second Solution
I also know (from some additional digging into the modules currently in use using lsmod
) that I can also do the following:
sudo modprobe -r i2c-hid-acpi
OR
sudo modprobe -r intel_lpss_pci
And this works too: no touchscreen.
A Third Solution
Finally, and for anyone who's also interested in disabling their Lenovo touchscreen (at least for a T15 Gen2), there's one additional option that doesn't rely on removing kernel modules, but instead disables the touchscreen driver, and that's to edit your grub
file in /etc/default
to include a specific initcall_blacklist
argument:
GRUB_CMDLINE_LINUX_DEFAULT="splash initcall_blacklist=dw_i2c_init_driver"
This final bit of knowledge I learned over on the Unix & Linux StackExchange. I can confirm that blacklisting this "driver" does indeed disable my touchscreen (though again, I'm not sure why and if there can/will be any side effects).
My Question
This is now a bit discouraging because these "solutions" seem to be more of a "shotgun approach" where I'm randomly removing modules with the side-effect (one of many?) that just happens to disable my touchscreen.
For example, my gut tells me that the intel_lpss_pci
should probably not be removed (it's the Intel Low Power Subsystem Support module). Same for the hid-generic
module (which means that the hid-multitouch
module should also stay active). So I think the i2c-hid-acpi
module would be the best candidate to remove if I want to disable my touchscreen correctly.
So here's my question:
How do I know--definitively--which module to remove? What's the best approach for determining/troubleshooting specific module functionality with a high degree of certainty?
Thanks