I have a Dell Inspiron 5547, massive laptop with 16GB RAM and Intel i7. It also got a touchscreen. I don’t like touchscreens on laptops and I can’t remember ever using it. I usually plugin my laptop, Desktop and RaspberryPi 2 to an IOGear 4port KVM switch and use a single keyboard and mouse with Dual-screen display. So my point is, I just wanted to disable the touchscreen cause the few times I tried to clean my screen of some dust, (forgetting I have a touchscreen), it messed up my terminal session. I did some tests and found the best way to disable touchscreen in Linux. So here goes:
List loaded modules
Hardware drivers these days uses loadable Kernel module (LKM). So I simply listed all kernel modules and searched for anything that was described as touchscreen.
[email protected]:~# lsmod | grep touch hid_multitouch 20480 0 hid 118784 5 i2c_hid,hid_multitouch,hid_generic,hid_rmi,usbhid
hid_multitouch module … that is possibly what we are looking for.
Find more info about module
We need to ensure that we got the right module by looking into using
[email protected]:~# modinfo hid_multitouch | head filename: /lib/modules/4.7.0-kali1-amd64/kernel/drivers/hid/hid-multitouch.ko license: GPL description: HID multitouch panels author: Benjamin Tissoires <benjami[email protected]> author: Stephane Chatty <[email protected]>
Seems legit, as the description clearly says it’s for HID multitouch panels.
Disable touchscreen module
We could try to remove this
hid_multitouch to see if that disables touchscreen.
[email protected]:~# modprobe -r hid_multitouch
I was also looking in
[email protected]:~# tail -f /var/log/messages Oct 19 10:58:35 kali /usr/lib/gdm3/gdm-x-session: (II) config/udev: removing device ELAN Touchscreen Oct 19 10:58:35 kali /usr/lib/gdm3/gdm-x-session: (**) Option "fd" "46" Oct 19 10:58:35 kali gnome-settings-: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
gnome/gdm3 wasn’t too happy … but that’s normal. Double-checking using
[email protected]:~# lsmod | grep touch
returns nothing, which is exactly what we wanted.
Making it permanent
Now this is still temporary. Next time I restart my laptop, it will load this
hid_multitouch module again. To stop this Linux kernel module from auto loading, we need blacklist it.
In Kali / Debian / Ubuntu, it’s as simple as creating a new blacklist file in modprobe.d folder with correct module name:
[email protected]:~# vi /etc/modprobe.d/hid_multitouch.conf # Use following syntax # blacklist driver-name blacklist hid_multitouch
Save the file and reboot,
hid_multitouch module will not be loaded next time. You can follow the same process to disable / unload Linux Kernel modules or blacklist Linux Kernel modules.
This guide explained and concentrated on how to disable touchscreen in Linux. But as you can see, you can disable almost any modules similarly. Just do it temporarily first and you’ll be pretty safe on a single user machine.