Software & AppsOperating SystemLinux

How To Disable Touchscreen Drivers on Ubuntu for Better Mouse Control

Ubuntu 5

In this article, we will be discussing how to disable touchscreen drivers on your Ubuntu system to improve mouse control. This can be particularly useful if you find the touchscreen feature unnecessary or distracting, especially when using a mouse or touchpad.

Quick Answer

To disable touchscreen drivers on Ubuntu for better mouse control, you can use the xinput command to disable the touchscreen device, edit the Xorg configuration file to ignore the touchscreen, or create a script to easily disable the touchscreen whenever needed.

Understanding the Basics

Before we dive into the steps, it’s important to understand what we are dealing with. Touchscreen drivers are software that enables your operating system to interact with your device’s touchscreen hardware. By disabling these drivers, we essentially stop Ubuntu from recognizing any touch inputs on the screen.

Method 1: Using the xinput Command

The xinput command is a utility to configure and test X input devices. It can be used to list available devices, check their settings, and change them.

Step 1: Identify the Touchscreen Device

First, we need to identify the touchscreen device. Open a terminal by pressing Ctrl + Alt + T and type xinput. This command lists all the input devices recognized by your system.

$ xinput

Look for the device that corresponds to your touchscreen. It might be named something like “ELAN Touchscreen” or “Atmel maXTouch Digitizer”. Note the ID number associated with this device.

Step 2: Disable the Touchscreen

Once you have the device ID, you can disable the touchscreen using the xinput disable <device_id> command. Replace <device_id> with the actual ID of your touchscreen device.

$ xinput disable <device_id>

This command tells the system to ignore any input from the device with the specified ID.

Method 2: Editing the Xorg Configuration File

Another way to disable the touchscreen is by editing the Xorg configuration file. Xorg is the public, open-source implementation of the X Window System that provides the graphical environment for Linux.

Step 1: Open the Configuration File

Open a terminal and type the following command to open the Xorg configuration file in a text editor:

$ sudo nano /usr/share/X11/xorg.conf.d/10-evdev.conf

This command uses sudo to gain administrative privileges, nano to open the file in the Nano text editor, and the path to the file (/usr/share/X11/xorg.conf.d/10-evdev.conf).

Step 2: Edit the Configuration File

In the configuration file, find the section that corresponds to the touchscreen device. This section might include a line like MatchIsTouchscreen "on". At the end of this section, add the line Option "Ignore" "on". This tells Xorg to ignore the touchscreen device.

Save the file by pressing Ctrl + X, then Y to confirm, and finally Enter to exit Nano.

Step 3: Reboot Your System

After editing the configuration file, reboot your system to apply the changes.

Method 3: Using a Script to Disable the Touchscreen

If you need to disable the touchscreen frequently, you might find it helpful to create a script that does it for you. Here’s how to do it:

Step 1: Create the Script

Create a new script file (for example, and open it in a text editor:

$ nano

In this file, write the following lines:

xinput disable <device_id>

Replace <device_id> with the actual ID of your touchscreen device.

Step 2: Make the Script Executable

Save the file and exit Nano. Then, make the script executable using the chmod command:

$ chmod +x

This command changes the permissions of the file to make it executable (+x).

Step 3: Run the Script

Now you can run the script whenever you want to disable the touchscreen:

$ ./


Disabling the touchscreen drivers on Ubuntu can help improve mouse control by preventing accidental touch inputs. Whether you choose to use the xinput command, edit the Xorg configuration file, or create a script to do the job, the process is fairly straightforward. Remember to replace <device_id> with your actual device ID in all the commands. Happy computing!

Can I re-enable the touchscreen after disabling it?

Yes, you can re-enable the touchscreen by either using the xinput command to enable the device again or by removing the line Option "Ignore" "on" from the Xorg configuration file and rebooting your system.

Will disabling the touchscreen affect any other functionalities of my Ubuntu system?

Disabling the touchscreen will only affect the touch input functionality. All other functionalities of your Ubuntu system, including the mouse and touchpad, will continue to work normally.

Can I disable the touchscreen for only a specific period of time?

Yes, you can create a script that disables the touchscreen and schedule it to run at specific times using tools like cron. This way, you can automate the disabling and enabling of the touchscreen based on your desired schedule.

Will disabling the touchscreen improve the performance of my Ubuntu system?

Disabling the touchscreen itself will not directly improve the performance of your Ubuntu system. However, it may improve the responsiveness of your mouse or touchpad by preventing accidental touch inputs that can interfere with cursor movements.

Can I disable the touchscreen on a laptop but keep it enabled on a separate monitor or external device?

Yes, you can disable the touchscreen for specific devices by using the xinput command with the device ID of the touchscreen on that specific device. This way, you can disable the touchscreen on your laptop but keep it enabled on a separate monitor or external device if desired.

Leave a Comment

Your email address will not be published. Required fields are marked *