I have a laptop with Zorin OS and the screen has a problem where it randomly gets touches which make the laptop unusable. In windows to disable it was as easy as just going to Device Manager and disable the touchscreen. But with Linux it was a bit trickier. I tried all the ways possible but either it was only for X11 (which by the way it made Xorg crash and cannot log in with it anymore) or outright just don't work. I read a lot of articles and the only possible workaround I found is when I read this article https://www.projectgus.com/2014/09/blacklisting-a-single-usb-device-from-linux/ . If we consider the touchscreen an USB device we can blacklist that "USB device" from starting up with the system.
Here's a breakdown:
Key Points:
- Method: Creates a udev rule to disable the USB device's authorization.
- Target: Blacklists a single USB device (in this case, the touchscreen).
- Identification: Uses Vendor ID (VID) and Product ID (PID) from lsusb
command.
Adapting to Touchscreen:
- Identify VID/PID: Run lsusb
in your terminal and look for entries related to your touchscreen. It might be listed under Human Interface Devices (HID). Note down the VID and PID values. Doing so, I got
"Bus 001 Device 004: ID 04f3:2012 Elan Microelectronics Corp. Touchscreen" - Create udev Rule:
- Open a terminal with administrative privileges (e.g., sudo su).
- Create a new file in the /etc/udev/rules.d/ directory. Name it something descriptive, like 99-block-touchscreen.rules
. You can use a text editor like nano or vi - Example command: sudo nano /etc/udev/rules.d/99-block-touchscreen.rules
- Add the following line, replacing VID (which in my case was 04f3)
and PID (which was 2012)
with the actual values from your touchscreen device:
SUBSYSTEM=="usb", ATTRS{idVendor}=="VID", ATTRS{idProduct}=="PID", ATTR{authorized}="0" - Save and close the file by pressing Ctrl + X to exit, then Y to save and then press enter.
- Reload udev Rules:
- Run the following command to apply the new rule:
sudo udevadm trigger
- Reboot (Optional):
- For the changes to take full effect, consider rebooting your system.
Important Note:
- This method disables the device completely. You won't be able to use your touchscreen until you remove the udev rule.
- Be cautious while editing udev rules. Mistakes might lead to unintended consequences.
Additional Considerations:
- Some laptops might have separate drivers or BIOS settings for the touchscreen. Check your system's documentation for alternative ways to disable it.
(Note: I am by no means an expert and a total noob, just trying to help people which are in the same situation I was. Just leaving this here for the next person who will browse the web like I did for a solution.