Disable Touchscreen in Gnu/Linux


Some of new laptops have touchscreen functionality. It is fancy, but practically it is useless. Mostly, you touch it by mistake and it uses some battery.

Recently I cracked my laptop's screen, it is a small crack that doesn't distract me but somehow it is making some random touches. I was searching for ways to disable touchscreen and most of them wasn't working and touchscreen was enabled again after reboot or sleep.

You can temporarily disable your touchscreen (or any other input device) using xinput tool. Use xinput --list to get the list of your input devices and use their id to disable any of them: xinput disable <id number>.

I added this command to the autostart to disable at boot:

xinput --list | awk '/Atmel Atmel maXTouch Digitizer/ {print $7}' | awk '{split($0,a,"="); print a[2]}' | xargs xinput disable

It works fine, it finds the id number of the touchscreen device (it can change at boot) using its name (Atmel Atmel maXTouch Digitizer - from xinput list) and disables it. The only problem is that, touchscreen becomes enabled again after sleep. Also, for some unknown reason, it is not working at every reboot.

There is also another way, disable the module for the touchscreen device, but I hate that way as missing modules are annoying.

My final solution that worked well was to create a configuration file in X11 and add a general touchscreen disabling setting to it. For example, I have created /etc/X11/xorg.conf.d/94-no-touchscreen.conf file and added this content to it:

Section "InputClass"
    Identifier         "Touchscreen catchall"
    MatchIsTouchscreen "on"
    Option "Ignore" "on"

That works both on reboots and on waking from the sleep mode.

Current rating: 3.9


Jonas19 10 months, 3 weeks ago

Thanks man it worked

Link | Reply
Current rating: 5

Erik Magni 2 months, 3 weeks ago

Nice article. I have not destroyed my touchscreen (yet) but would like to disable it more or less permanently. I like to have it disabled at boot and have the option to easy switch it on when needed. So if anyone could suggest a way to switch it on would I be glad.

Link | Reply
Currently unrated

Emin Mastizada 2 months, 1 week ago

Unless you have a hardware switch for it, disabling and enabling easily is not possible. The disabling using "xinput" command will disable for the current session and will work again after the reboot, but this way it can be activated/disabled anytime. With the second option, adding ignore line to the `xorg.conf` disables the driver itself, so it will be disabled after reboot and it will not be possible to turn it on as the driver for it is ignored.

Link | Reply
Currently unrated

New Comment


required (not published)