How can I disable touchscreen while using Wayland?
Solution 1
Following steps in JNixus' answer on reddit gave me the result: touchscreen is disabled and touchpad still works: https://www.reddit.com/r/Dell/comments/76jm9x/dell_xps_9343_linux_wayland_touchscreen_help/
Using the ability to disable a single USB device, we need just to create a UDEV rule. Create the file in
/etc/udev/rules.d/80-touchscreen.rules
With following information
SUBSYSTEM=="usb", ATTRS{idVendor}=="04f3", ATTRS{idProduct}=="20d0", ATTR{authorized}="0"
You can find idVendor
and idProduct
by running
cat /proc/bus/input/devices
You can reload the rules without restart
udevadm control --reload-rules && udevadm trigger
Solution 2
The power of Google to the rescue. I followed the instructions from here and I was able to blacklist the touchscreen driver. As per the instructions, I created a file called hid_multitouch.conf
in /etc/modprobe.d
.
Inside the file I put:
# Use the following syntax
# blacklist driver-name
blacklist hid_multitouch
Save, restart, and no more glitchy touchscreen.
Solution 3
The hid_multitouch solution above disables all multitouch devices if there are multiple. But the udev route is an issue if your device isn't USB (I think). So what worked for me is to unbind the device from the driver, instead of unloading the whole driver.
You can find the devices linked to the hid-multitouch driver with
ls /sys/bus/hid/drivers/hid-multitouch/
That will show a couple of files and folders, but the actual device id's are a combination of characters and numbers like this: 0018:06CB:19AC.0001
.
You may have multiple devices in there. I just figured out the right one with trial and error. Once you know, you can unbind it from the driver with:
echo "0018:06CB:19AC.0001"> /sys/bus/hid/drivers/hid-multitouch/unbind
That will (temporarily) disable the driver. Then you could use rc-local or a dedicated systemd service to make it permanent. You can't do it in .bashrc
or similar user space scripts since you need to be root to do this.
Related videos on Youtube
Josh Schechter
Updated on September 18, 2022Comments
-
Josh Schechter over 1 year
I am using Ubuntu Gnome 17.04. My touchscreen is glitchey; I think it is a hardware issue. I can disable my touchscreen when logged into Gnome using Xorg, but I can't figure it out when I login using Wayland. Any advise? Thanks! - Josh
-
hwjp over 6 yearsI can confirm this worked for me on a samsung 940X laptop with ubuntu 17.10 and wayland -- thanks! :)
-
dty over 6 yearsUnfortunately, on my Dell XPS13 it disabled the touchpad as well as the touchscreen. :(
-
hwjp over 6 yearsoh, maybe it didn't actually.
-
cornuz over 6 yearsAlso on my XPS13, it disables the touchpad.
-
Andrew W. about 6 yearsThis was the solution that worked for me. Dell XPS 13 Ubuntu 17.10.
-
fffred almost 6 yearsThis did not work for me (Dell XPS13, Ubuntu 18.04). Could you explain how you recognize the touch screen in the devices list ?
-
Sandeep over 4 yearsworked for inspiron 15 series on fedora as well
-
mefiX about 4 yearsWorked on a Lenovo Thinkpad T480s with Debian Buster
-
Andrew Dinmore about 4 yearsI'm running Neon/KDE on some kind of Dell and while nothing seemed to be affected after running the reload command, the touch-screen is disabled after restarting.
-
piegames almost 4 years
/etc/rc.local
is obsolete since 1983. -
Kocsis Dávid almost 3 yearsdoes disabling in udev also prevent power consumption?
-
joseph_morris about 2 yearsThis works, although when I wanted to get the touchscreen back seemed like I had to reboot; just setting authorized to "1" and reload/trigger command didn't work. If anyone knows how to do that without reboot would much appreciate.
-
Admin almost 2 yearsWorks on a DELL Latitude XT2 with ATTRS{idVendor}=="1b96" and ATTRS{idProduct}=="0001" (Ubuntu 22.04).