Disable touchscreen on Lenovo Yoga

My touchscreen suffers from some bad ghost touches to the screen due to hardware issues. I do not ever use the touchscreen and want to disable it.

Thanks,
BJ

1 Like

Can you disable it in the BIOS setup? That would be the easiest solution.

Not an option in the BIOS.

Hello @sdrloomsed In Settings / Mouse and touchpad you could disable touchpad.

My touchpad is disabled already. I need my touch screen disabled.

Did you ever find out about this? My touch screen suffers from phantom touches which makes it basically unusable since it competes with the touch pad and keyboard. However, I almost never used the touch screen anyway, so I would be fine with disabling it and making it into an old school laptop.

Also Lenovo Yoga (720). It’s not an option in BIOS. (Also, might be relevant that I’m running Silverblue and not Workstation.)

1 Like

After some googling (most results were for outdated software (old Ubuntus not running Wayland)), I noticed there are various Wacom driver settings in /usr/share/X11/xorg.conf.d (even a file called 71-libinput-overrides-wacom.conf). I’m guessing these actually mean something (despite the directory name) even when running Wayland? There’s a libinput section here, for instance. I haven’t managed to scope the correct Section and adding an override yet, but I’m trying various things. There’s a section that matches the touchscreen to the wacom driver, for instance, but the override didn’t take when I used Option "Ignore" "on" on a new file in /etc/X11/xorg.conf.d. Maybe I should copy the entire file to and remove the relevant section instead.

I haven’t touched anything like xorg.conf settings since I was trying to get AMD Catalyst drivers to work 10 years ago, so I’m rusty. And it’s opaque to me where Wayland settings are actually set. Legacy directory names don’t help either.

So from what I can gather, the files in xorg.conf.d don’t do anything when you’re in a Wayland session. Which is understandable, I guess. I’m deep into the udev and libinput rabbit holes now, and I’ve found reports of people getting it to work, but I can’t find anything that works for my case.

I’ve done this:
sudo libinput debug-events to find the event node that corresponds to the /dev/input.

As expected, the debugger went crazy since it’s registering phantom screen touches every other second. But it told me that the touchscreen is /dev/input/event8.

Then udevadm info --attribute-walk --path=$(udevadm info --query=path --name=/dev/input/event8) which tells me that event8 is the libinput equivalent of the parent event, which is a more wacom-y unit called event17 and which has a vendor id and product id.

So I tried this rule:

# /etc/udev/rules.d/91-touchscreen-disable.rule
SUBSYSTEM=="input", ATTRS{idVendor}=="056a", ATTRS{idProduct}=="50ee", ATTR{authorized}="0"

But it still doesn’t work. I’ve tried various ways like unsetting the ID_INPUT=1 and ID_INPUT_TOUCHSCREEN=1, but I can’t that to work either.

It’s too bad that disabling this is defined as a compositor issue on Wayland, which makes it the realm of developers only and makes us wait for Gnome/Mutter to add options. xinput had a ton of useful commands power users could tap into, libinput docs are written for developers already deep into the material. I find most of e.g. this relevant part of the docs impenetrable.

Here’s a complaint from the developer of Eolie and Lollypop on the Mutter Gitlab: Add an option to disable touchscreen (#243) · Issues · GNOME / mutter · GitLab

I’ve also followed the comments and noticed there’s an application for doing exactly this Bastien Nocera / disable-touchscreens · GitLab, but it seems a bit dangerous, so I haven’t tried it yet.

Add the following option in the touchscreen section of /usr/share/X11/xorg.conf.d/10-evdev.conf:

Option “Ignore” “on”

/usr/share is readonly on Silverblue. But even if I put an override in /etc are you sure this works on Wayland?

I solved this by running the above-mentioned mini-application by Gnome developer Bastien Nocera. This one: Bastien Nocera / disable-touchscreens · GitLab

I needed to install glib2-devel and libgudev-devel first, then I could clone the repo and run sudo make and sudo ./disable-touchscreens.

sudo disable-touchscreens needs to be run on every reboot, which is fine with me. I can put it in a startup script or just run it when my screen goes haywire (which usually doesn’t happen immediately after reboot, but after a little bit of use).

cc @sdrloomsed