Linux – How to disable the touch screen on the laptop

arch linuxtouch screen

My laptop has a touchscreen but I do not use this. How do I disable this functionality? I use Arch Linux. I figured I could try removing the related driver. According to this page the possible drivers are all named xf86-input*. However, it looks like I have nothing like that installed:

# pacman -Qs xf86-input
local/xf86-input-evdev 2.8.3-1 (xorg-drivers xorg)
    X.org evdev input driver
local/xf86-input-joystick 1.6.2-3 (xorg-drivers xorg)
    X.Org Joystick input driver
local/xf86-input-keyboard 1.8.0-2 (xorg-drivers xorg)
    X.Org keyboard input driver
local/xf86-input-mouse 1.9.0-2 (xorg-drivers xorg)
    X.org mouse input driver
local/xf86-input-synaptics 1.7.5-1 (xorg-drivers xorg)
    Synaptics driver for notebook touchpads
local/xf86-input-vmmouse 13.0.0-3 (xorg-drivers xorg)
    X.org VMWare Mouse input driver
local/xf86-input-void 1.4.0-6 (xorg-drivers xorg)
    X.org void input driver

Any idea how I can track down the responsible driver or in some other way disable the touch screen functionality?

Best Answer

Besides uninstalling the appropriate drivers (which might fail to work since some devices act as usual mouse devices and only need specific drivers for more sophisticated features and your list of installed drivers suggests this) you can also disable the device via the xinput tool or by explicitly matching in xorg.conf.

To disable the device using xinput, you'll have to determine the devices XInput id:

$ xinput
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=10   [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=11   [slave  pointer  (2)]
⎜   ↳ My annoying touchscreen                       id=14   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Sleep Button                              id=8    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=9    [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                    id=12   [slave  keyboard (3)]
    ↳ HID 0430:0005                             id=13   [slave  keyboard (3)]

In this example, »My annoying touchscreen« has the id 14. So to disable it, simply type

$ xinput disable 14

To disable it via xorg.conf, you simply create a file under the /etc/X11/xorg.conf.d directory, for example 99-no-touchscreen.conf with the following content:

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

    Option "Ignore" "on"
EndSection

This would ignore all touchscreen devices. In case you have more than one and want to use one or several of them, you could specify the match more exactly with one of the other Match directives. See the xorg.conf manpage for more details on this (simply search for »Match« and you should find what you're looking for).