Disable touchscreen

S3l3n3

New Member
Joined
Sep 16, 2022
Messages
3
Reaction score
0
Credits
30
Hello, Here a beginner in Linux. I upgraded Ubuntu to 20.4.1 and all of a sudden my touchscreen came on. I have tried permanently disabling it with the command sudo nano usr/share/X11/xorg.conf.d/40-libinput.conf and changing touchscreen "on" to "off" which worked perfectly for me before but now it doesn't. Also not adding Option "Ignore" "on" Does anyone know how I can disable the touch screen permanently?
 


This looks promising:

 
You can also which is what I did on my Ubuntu installation is create a file under /etc/X11/xorg.conf.d with the following contents.
Code:
Section "InputClass"
    Identifier         "Touchscreen catchall"
    MatchIsTouchscreen "on"

    Option "Ignore" "on"
EndSection
Then reload Xorg or you can blacklist the driver used by your touchscreen by creating a file in /etc/modprobe.d with the following content.
Code:
blacklist driver-name
Then Reboot
 
Last edited:
Or, if you have not already taken the advice from above, try what I did a few years ago?

G'day @S3l3n3 and welcome to linux.org :)

First of all check the output of

xinput

for the touchscreen entry

Then, in your file

usr/share/X11/xorg.conf.d/40-libinput.conf

You may have a section that looks a bit like this

Code:
Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

What you should do rather than just change on to off is alter it to look like this

Code:
#Section "InputClass"
#        Identifier "libinput touchscreen catchall"
#        MatchIsTouchscreen "on"
#        MatchDevicePath "/dev/input/event*"
#        Driver "libinput"
#EndSection

Then save the file, reboot and see how you go.

Check the xinput output and you should see the previous reference removed.

If you try this and it works, I'll tell you a funny story about how I first used this.

Chris Turner
wizardfromoz
 
Hi,

Thanks for the alternative but it doesn't work for me or I don't know how to apply it correctly.

When I modify the command it turns blue. I save the changes and restart but the touchscreen still works
Check the xinput output and you should see the previous reference removed.
 
That's a bugger, works for me with touchpad (don't have a touchscreen).

Let's go simple and write up a small script for your startup applications.

1. Go to the 9 dots square that has smart tip Show Applications and click.
2. Start to type in (without quotes) "startup" and choose Startup Applications.
3. Choose Add
4. Type in a meaningful name, eg
TouchScreenOff
5. Get the name of your touchscreen device from

Code:
xinput --list

For my touchpad I have this

Code:
DELL0811:00 044E:120A Touchpad              id=13

I could simply type in

Code:
xinput disable 13

but very occasionally, with the addition or removal of devices those numbers can change, so better is

Code:
xinput disable "DELL0811:00 044E:120A Touchpad"

6. I give it a meaningful description eg

"Turns TouchPad Off from startup"

7. Apply the changes, and reboot

Here's a couple of pictures of what mine looks like.

zKjgz1k.png


ciMObIn.png


So you need only substitute touchscreen for my touchpad, and your touchscreen identifier from xinput for my touchpad identifier. Don't forget the quotation marks with the xinput command.

Let us know how you go.

Wizard
 
Thanks for this other option.

When going to test it I discovered that the name of my touchscreen does not appear. In input --list it is no longer there. I understand that in one of the tests I managed to make my touchscreen disappear but it resists and still works. Now I don't know how to make it appear again so I can try the option you recommend.

Sorry but I'm totally a beginner.

I have thought about completely uninstalling Ubuntu and installing the previous version from 0 since with it I could easily turn off the touchscreen. Do you think it is a viable option?

That's a bugger, works for me with touchpad (don't have a touchscreen).

Let's go simple and write up a small script for your startup applications.

1. Go to the 9 dots square that has smart tip Show Applications and click.
2. Start to type in (without quotes) "startup" and choose Startup Applications.
3. Choose Add
4. Type in a meaningful name, eg
TouchScreenOff
5. Get the name of your touchscreen device from

Code:
xinput --list

For my touchpad I have this

Code:
DELL0811:00 044E:120A Touchpad              id=13

I could simply type in

Code:
xinput disable 13

but very occasionally, with the addition or removal of devices those numbers can change, so better is

Code:
xinput disable "DELL0811:00 044E:120A Touchpad"

6. I give it a meaningful description eg

"Turns TouchPad Off from startup"

7. Apply the changes, and reboot

Here's a couple of pictures of what mine looks like.

zKjgz1k.png


ciMObIn.png


So you need only substitute touchscreen for my touchpad, and your touchscreen identifier from xinput for my touchpad identifier. Don't forget the quotation marks with the xinput command.

Let us know how you go.

Wizard
 
Do you think it is a viable option?

It is certainly an option.

The above offering from @forester may be worth a shot, perhaps try it, and if it does not work, I have another option, I think.

Cheers

Wiz
 
Hello, Here a beginner in Linux. I upgraded Ubuntu to 20.4.1 and all of a sudden my touchscreen came on. I have tried permanently disabling it with the command sudo nano usr/share/X11/xorg.conf.d/40-libinput.conf and changing touchscreen "on" to "off" which worked perfectly for me before but now it doesn't. Also not adding Option "Ignore" "on" Does anyone know how I can disable the touch screen permanently?
simple solution is that first of all disable "wayland" to do that go to "sudo nano /etc/gdm3/custom.conf" and remove # from "WaylandEnable=false" then go to 40-libinput.conf and add below command in touchscreen section => Option "Ignore" "on"
 
Here is my little script to disable the touch screen. Add this to your startup applications

#!/bin/bash

# This is called "./notouch.sh"
# this gets copied from administrator HOME dir to user/home/
# We need the time after a person logs in
# Run 'xinput list' to see the name of your touch screen and number. The number changes at time so it has to be searched for.
# Make sure you give allow executing permissions on this file.

metouch=eGalaxTouch # <<< change this varible

sleep 10
virtual=$(xinput list | grep -io -m1 virtualbox)
if [ "$virtual" != "VirtualBox" ]; then

idnumber="$(xinput list | grep -i -m1 $metouch | sed 's/.id=\([0-9]\).*/\1/')"
len=$(echo ${#idnumber})
if [ $len = 0 ]; then
idnumber="$(xinput list | grep -i -m1 $metouch | sed 's/.id=\([0-9]\).*/\1/')"
fi
len=$(echo ${#idnumber})
if [ $len = 0 ]; then
echo "Touch Screen * $metouch * not found" > ./touchstat.txt
echo "Touch Screen * $metouch * not found"
xinput list >> ./touchstat.txt
else
echo "yippie!" > ./touchstat.txt
xinput disable $idnumber
echo $idnumber >> ./touchstat.txt
echo $idnumber Disabled
echo "Touch screen $idnumber disabled" >> ./touchstat.txt
fi
fi

echo "Today is "$(date) >> ./touchstat.txt
 

Members online


Top