Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

How can I disable touchscreen while using Wayland?

Writer Emily Wong

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

6 Answers

Following steps in JNixus' answer on reddit gave me the result: touchscreen is disabled and touchpad still works:

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
7

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.

4

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.

Followed the instructions on the linked article above. The solution did not work however there is a helpful comment by user Raphael that got the touchscreen disabled and touchpad enabled for me.

Steps:

1) Edit /etc/rc.local

2) Add the following line modprobe -r usbhid

3) Save and restart

1

The only thing that worked for me was this startup script suggestion here. I didn't like the "manualness" of the script so I added it to be more generic. This may not work for everyone since it unbinds all hid-multitouch devices found. Add it to the crontab as suggested in the link and this happens on boot. Tested on kubuntu 22.04.

#!/bin/bash
for X in `find /sys/bus/hid/drivers/hid-multitouch -type l`; do if [[ $(udevadm info ${X}|grep "DRIVER=hid-multitouch") ]]; then basename ${X} | sudo tee /sys/bus/hid/drivers/hid-multitouch/unbind fi
done

The other solutions do not work for my Lenovo Yago 710. Here's what I do:

  • Use lsmod to find the module for the touchscreen.

    lsmod | grep touch

    For me, it is hid_multitouch.

  • Disable it temporarily

    sudo modprobe -r hid_multitouch

    The modprobe -r unloads the kernel module (driver). The touchscreen should be disabled.

  • Make it permanent

    Edit /etc/rc.local as

    #!/bin/bash
    modprobe -r usbhid

    In Ubuntu 17.10, you may need to run

    sudo systemctl enable rc-local.service

    to make /etc/rc.local run on startup.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy