How can I disable touchscreen while using Wayland?

13,249

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.

Share:
13,249

Related videos on Youtube

Josh Schechter
Author by

Josh Schechter

Updated on September 18, 2022

Comments

  • Josh Schechter
    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
    hwjp over 6 years
    I can confirm this worked for me on a samsung 940X laptop with ubuntu 17.10 and wayland -- thanks! :)
  • dty
    dty over 6 years
    Unfortunately, on my Dell XPS13 it disabled the touchpad as well as the touchscreen. :(
  • hwjp
    hwjp over 6 years
    oh, maybe it didn't actually.
  • cornuz
    cornuz over 6 years
    Also on my XPS13, it disables the touchpad.
  • Andrew W.
    Andrew W. about 6 years
    This was the solution that worked for me. Dell XPS 13 Ubuntu 17.10.
  • fffred
    fffred almost 6 years
    This did not work for me (Dell XPS13, Ubuntu 18.04). Could you explain how you recognize the touch screen in the devices list ?
  • Sandeep
    Sandeep over 4 years
    worked for inspiron 15 series on fedora as well
  • mefiX
    mefiX about 4 years
    Worked on a Lenovo Thinkpad T480s with Debian Buster
  • Andrew Dinmore
    Andrew Dinmore about 4 years
    I'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
    piegames almost 4 years
    /etc/rc.local is obsolete since 1983.
  • Kocsis Dávid
    Kocsis Dávid almost 3 years
    does disabling in udev also prevent power consumption?
  • joseph_morris
    joseph_morris about 2 years
    This 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
    Admin almost 2 years
    Works on a DELL Latitude XT2 with ATTRS{idVendor}=="1b96" and ATTRS{idProduct}=="0001" (Ubuntu 22.04).