Skip to content

Prevent X windows taking the Touchscreen input

Richard Goodwin edited this page Feb 23, 2021 · 10 revisions

When developing Europi, I like to do so within the X graphical environment.

One of the problems is that once I have installed the touchscreen drivers, and am using raspi2fb to mirror /dev/fb0 to /dev/fb1 and touch input also gets sucked in and interpreted by X windows.

To prevent this, edit the following file:

/usr/share/X11/xorg.conf.d/10-evdev.conf

Find the section that includes the identifier "evdev touchscreen catchall" and add the following (including quotes) at the bottom of that section:

Option "Ignore" "on"

It will probably then look a bit like this:

Section "InputClass"
    Identifier "evdev touchscreen catchall"
    MatchIsTouchscreen "on"
    MatchDevicePath "/dev/input/event&"
    Driver "evdev"
    Option "Ignore" "on"
End Section

Note: that Raspbian Stretch uses the libinput drivers, so you will need to edit the file with a name similar to the following:

/user/share/X11/xorg.conf.d/40-libinput.conf

and edit it so that the touchscreen section looks like this:

Section "InputClass"
    Identifier "libinput touchscreen catchall"
    MatchIsTouchscreen "on"
    MatchDevicePath "/dev/input/event*"
    Driver "libinput"
    Option "Ignore" "on"
End Section