lenovo T440 Thinkpad Touchscreen

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
User avatar
Bob M
Level 5
Level 5
Posts: 557
Joined: Sat Jan 28, 2017 9:54 pm
Location: New Zealand

lenovo T440 Thinkpad Touchscreen

Post by Bob M »

Not sure if this should be in Software or Hardware, but does anyone know how to turn off the touchscreen on a lenovo T440 Thinkpad?

Thanks

Bob
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
SMG
Level 25
Level 25
Posts: 31760
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: lenovo T440 Thinkpad Toucscreen

Post by SMG »

I have deleted the duplicate topic you created. Please [8] Do Not Cross-Post.

Check the BIOS/UEFI to see if there might be an option to turn off the touchscreen there. That would be the easiest solution.

If not, run xinput to determine the device number and disable it in a similar fashion to what the person in this topic did Disabling touch screen on the system level on Linux Mint.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
Bob M
Level 5
Level 5
Posts: 557
Joined: Sat Jan 28, 2017 9:54 pm
Location: New Zealand

Re: lenovo T440 Thinkpad Touchscreen

Post by Bob M »

Thanks SMG for sorting where this Post should go.

Back to the problem at hand.

I have checked the BIOS and it appears to be Legacy with no facility to turn off the Touchscreen?
BIOS.JPG
BIOS.JPG (55.58 KiB) Viewed 2186 times
I then ran xinput as you suggested and came up with the following.
Touchscreen.png
I can see it there but have no idea what the exact instruction should be to disable the touchscreen as I’m a complete dunce with Terminal Instructions.

Would you be able to help me out with something I can copy and paste?

Oh, I’d better mention that the OS is Mint 19.3 Cinnamon.

Thanks

Bob
User avatar
SMG
Level 25
Level 25
Posts: 31760
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: lenovo T440 Thinkpad Touchscreen

Post by SMG »

Bob M wrote: Tue Jan 25, 2022 5:52 pmI have checked the BIOS and it appears to be Legacy with no facility to turn off the Touchscreen?

BIOS.JPG
I would not expect it to be under the Boot heading in BIOS. There should be other headings in BIOS where it might be, but I did some searches and I don't see anyone mentioning a place to turn it off so we'll head to plan B.
Bob M wrote: Tue Jan 25, 2022 5:52 pmI then ran xinput as you suggested and came up with the following.
The Elan touchscreen is ID 10. If you open a terminal and type:

Code: Select all

xinput disable 10
I think that should disable it.

However, that number isn't necessarily the same each time you boot. There is another way to disable it, but it requires creating a file. Because I do not have a LM19.3 Cinnamon install and I don't want to assume it is the same as my LM20.3 install, I would like you to cut and paste the output (no photo please) of

Code: Select all

cat /usr/share/X11/xorg.conf.d/40-libinput.conf
I am going to have you re-use part of it to create a new file that turns off the touchpad using a different method which is explained in this link How to disable touchscreen on Ubuntu?. I'm just putting the link there so I have it handy. I'll walk you through the steps.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
Bob M
Level 5
Level 5
Posts: 557
Joined: Sat Jan 28, 2017 9:54 pm
Location: New Zealand

Re: lenovo T440 Thinkpad Touchscreen

Post by Bob M »

Ok, I've been to the end of every branch of the BIOS and can't find anything that suggests it might relate to the Touchscreen so I too think we can forget turning it off there on this model Thinkpad.

Moving on, cat /usr/share/X11/xorg.conf.d/40-libinput.conf produces the following:

Code: Select all

bob@bob-ThinkPad-T440:~$ cat /usr/share/X11/xorg.conf.d/40-libinput.conf
# Match on all types of devices but joysticks
Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

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

Section "InputClass"
        Identifier "libinput tablet catchall"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection
bob@bob-ThinkPad-T440:~$
Hope that helps because I'm way out of my depth. :oops:
Last edited by SMG on Wed Jan 26, 2022 4:13 pm, edited 1 time in total.
Reason: Added code tags to the file output to put it in a neat, scrollable box.
User avatar
SMG
Level 25
Level 25
Posts: 31760
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: lenovo T440 Thinkpad Touchscreen

Post by SMG »

There is a process which runs in Mint called X Server. It reads the configuration files installed on your computer and uses the information in them to know what to do. I had you list the contents of one of those files. The part I marked in blue below is where it says to have the touchscreen on.

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

What we are going to do is create a new file with information to tell X Server to have the touchscreen off. X Server runs the files in numerical order, so you will create a file with a high number at the start of its name so the initial system files are read and then your custom file is read. We will also place the file in a directory where customizations are located so system updates will not overwrite it.

This is not a big change and we are not changing any existing files, but feel free to make a Timeshift snapshot before doing the steps if you want. I did my best to make it as easy as possible and list what you should expect to see.

I am presuming you do not have any custom files or this directory, so first create the directory in which to save the file by opening a terminal and typing (or use the three steps below):

Code: Select all

sudo mkdir /etc/X11/xorg.conf.d
To prevent typing mistakes:
  • You can click "SELECT ALL" to the right of CODE: in order to select everything.
  • Then do Control-C to copy what you selected.
  • Then in the terminal window select Edit > Paste.
Press Enter to run the command. You will be prompted to type in your password because the sudo command was used.

Then copy and paste the below, using the same three steps, to create the file and open it in the nano editor.

Code: Select all

sudo nano /etc/X11/xorg.conf.d/99-disabletouchscreen.conf
The nano editor is a file editor inside your terminal window. You should see the file name at the top of the editor.

Then copy and paste the below using the three steps listed above to prevent typing mistakes.

Code: Select all

Section "InputClass"
    Identifier "touchscreen catchall"
    MatchDriver "libinput"
    MatchIsTouchscreen "off"
EndSection
This puts the text inside the file.
Then Control-S to save the file with the changes.
Then Control-X to exit.
The editor closes.

You can then check to make sure the file is saved by copying the below and pasting it into the terminal window and pressing Enter.

Code: Select all

cat /etc/X11/xorg.conf.d/99-disabletouchscreen.conf
It should list the lines in the file.

The next time you boot it should take effect. I believe you can also restart the X Server with Control-Alt-Backspace and have it take effect, but restarting the X Server will close everything you have open on your screen, so make sure everything is saved before you try that.

Note: I do not have a touchscreen, so I could not test to verify this file worked. I did create the directory and file on my system to make sure the steps worked. Let me know if you have questions.

Edit 1: Change filename from 99-disabletouch.conf to 99-disabletouchscreen.conf.
Edit 2: Change instructions to have an explicit save.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
Bob M
Level 5
Level 5
Posts: 557
Joined: Sat Jan 28, 2017 9:54 pm
Location: New Zealand

Re: lenovo T440 Thinkpad Touchscreen

Post by Bob M »

Quick query before I proceed.

I notice that the instruction sudo nano /etc/X11/xorg.conf.d/99-disabletouch.conf and wondered if the "disabletouch.conf" portion would disable the touchpad as well as the touchscreen?

Just thought it might pay to check. :D
User avatar
SMG
Level 25
Level 25
Posts: 31760
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: lenovo T440 Thinkpad Touchscreen

Post by SMG »

Bob M wrote: Wed Jan 26, 2022 9:45 pmI notice that the instruction sudo nano /etc/X11/xorg.conf.d/99-disabletouch.conf and wondered if the "disabletouch.conf" would disable the touchpad as well as the touchscreen?
The file I had you print out has a separate section for the touchpad. We are only modifying the part for the touchscreen.

From the original file, here are the two sections.

Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection

Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Here is the file you will create.

Section "InputClass"
Identifier "touchscreen catchall"
MatchDriver "libinput"
MatchIsTouchscreen "off"
EndSection
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
SMG
Level 25
Level 25
Posts: 31760
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: lenovo T440 Thinkpad Touchscreen

Post by SMG »

I could change the name, if you want.

I've always thought of touchscreen as two parts, touch, and screen, and we're only disabling the touch part. The screen still works. I didn't even think of the touchpad with regards to the file name. I guess because if we disable the touchpad, it doesn't work at all. However, you are right that it could be confusing and one has to open the file to see what it does.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
Bob M
Level 5
Level 5
Posts: 557
Joined: Sat Jan 28, 2017 9:54 pm
Location: New Zealand

Re: lenovo T440 Thinkpad Touchscreen

Post by Bob M »

Ok, that's fine, I'll get onto it in about an hour. 15:40hrs Thursday afternoon down here and a bit to tidy up. :wink:
User avatar
SMG
Level 25
Level 25
Posts: 31760
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: lenovo T440 Thinkpad Touchscreen

Post by SMG »

Bob M wrote: Wed Jan 26, 2022 10:41 pm Ok, that's fine, I'll get onto it in about an hour. 15:40hrs Thursday afternoon down here and a bit to tidy up. :wink:
Because you were not in the middle of using the directions, I changed the name. Might as well clearly define what the file is meant to do. :mrgreen:
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
Bob M
Level 5
Level 5
Posts: 557
Joined: Sat Jan 28, 2017 9:54 pm
Location: New Zealand

Re: lenovo T440 Thinkpad Touchscreen

Post by Bob M »

No luck, so I started again and got this:
touchscreen1.png
User avatar
SMG
Level 25
Level 25
Posts: 31760
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: lenovo T440 Thinkpad Touchscreen

Post by SMG »

If you enter the following in a terminal:

Code: Select all

ls /etc/X11/xorg.conf.d
does it come back with a prompt or does it tell you no such file or directory?
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
Bob M
Level 5
Level 5
Posts: 557
Joined: Sat Jan 28, 2017 9:54 pm
Location: New Zealand

Re: lenovo T440 Thinkpad Touchscreen

Post by Bob M »

touchscreen2.png
User avatar
SMG
Level 25
Level 25
Posts: 31760
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: lenovo T440 Thinkpad Touchscreen

Post by SMG »

I was trying to make the directions with as few keystrokes as possible so I did not put an explicit save in them. I totally forgot we were probably working with different versions of nano (you with LM19 and me with LM20) and "defaults" might be handled differently. I am guessing that is why the difference in the filename. Sorry about that.

Let's see if the file you created has all the necessary info and just needs renamed in order to work. Use the below to list the contents of the file.

Code: Select all

cat /etc/X11/xorg.conf.d/99-disabletouchscreen.conf.save
If the contents are correct, then change the filename using the below.

Code: Select all

sudo mv /etc/X11/xorg.conf.d/99-disabletouchscreen.conf.save /etc/X11/xorg.conf.d/99-disabletouchscreen.conf
Then check to see the filename was changed correctly.

Code: Select all

ls /etc/X11/xorg.conf.d
If the file contents are not correct, I have modified the instructions above so you should be able to create a new file and have it named correctly this time. I will give you directions to remove the incorrect file in a new post.

When you open nano, it should have the version number in the top right. Let me know what that is. That might help me figure out what happened.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
Bob M
Level 5
Level 5
Posts: 557
Joined: Sat Jan 28, 2017 9:54 pm
Location: New Zealand

Re: lenovo T440 Thinkpad Touchscreen

Post by Bob M »

Ok,lets jump the first fence. :D
touchscreen3.png
Whoops. :(
User avatar
SMG
Level 25
Level 25
Posts: 31760
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: lenovo T440 Thinkpad Touchscreen

Post by SMG »

Bob M wrote: Thu Jan 27, 2022 3:44 pm Ok,lets jump the first fence. :D
I wonder if nano is still open and that is a lock on the file? I don't use nano a lot so I will go check and get back to you.

When you typed the command to exit nano, did it close and you were returned to a prompt on the terminal?
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
Bob M
Level 5
Level 5
Posts: 557
Joined: Sat Jan 28, 2017 9:54 pm
Location: New Zealand

Re: lenovo T440 Thinkpad Touchscreen

Post by Bob M »

When you typed the command to exit nano, did it close and you were returned to a prompt on the terminal?
No, I had to close the Terminal itself or it wasn't going anywhere.
User avatar
SMG
Level 25
Level 25
Posts: 31760
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: lenovo T440 Thinkpad Touchscreen

Post by SMG »

Bob M wrote: Thu Jan 27, 2022 4:09 pmNo, I had to close the Terminal itself or it wasn't going anywhere.
Sounds like the file got stuck in the locked state when that happened. Let's see if you can remove it. Run the following.

Code: Select all

sudo rm /etc/X11/xorg.conf.d/99-disabletouchscreen.conf.save
You will have to type in your password to have this command proceed and when it is done it should return a prompt. Then run the following to verify the file is gone.

Code: Select all

ls /etc/X11/xorg.conf.d
If it is gone (that command just returns a prompt), then you can try creating the file again. You would start with the 'sudo nano' step because the directory has already been created.

Let me know if something happens that is not what I have described.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
Bob M
Level 5
Level 5
Posts: 557
Joined: Sat Jan 28, 2017 9:54 pm
Location: New Zealand

Re: lenovo T440 Thinkpad Touchscreen

Post by Bob M »

Well we're up to here which I think is as you explained but I don't understand the "sudo nano" part. :oops:
touchscreen4.png
Locked

Return to “Graphics Cards & Monitors”