Disable Touchscreen in Gnu/Linux

(0 comments)

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"
EndSection

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

Currently unrated

Comments

There are currently no comments

New Comment

required

required (not published)

optional