Отключить сенсорную панель linux

How do I disable the touchscreen drivers?

I have a touchscreen, but the drivers are not working properly and interfere with my mouse. Is it possible to disable my touchscreen , so that I can work again properly?

I have the same problem although the touchscreen is working perfectly, but the reason is my old year old touching on the screen while I try to work 🙂

Related: I added an answer to disable the trackpad on Ubuntu 22.04 from the command-line here: How to enable/disable the touchpad in Ubuntu 22.04 from the command-line

8 Answers 8

You can try disabling the input device with the xinput command. First see what input devices you have, just type:

And you should see a list like:

$ xinput ⎡ Virtual core pointer [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer [slave pointer (2)] ⎜ ↳ Atmel Atmel maXTouch Digitizer [slave pointer (2)] ⎜ ↳ TPPS/2 IBM TrackPoint [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad [slave pointer (2)] . 

Then you can disable the input device you want with this command:

Where 9 is the id of the device you want to disable. You can also use the device name between quotes.

In xinput version 1.5.99.1 , you need to do xinput set-prop 9 ‘Device Enabled’ 0 instead. Oddly on xinput v1.6.2 the first way work.

Works on Dell XPS 13 running Ubuntu 16.04. I also added this to ~/.profile to auto apply after reboots: xinput | grep ‘ELAN Touchscreen’ | grep -Po ‘id=\d+’ | cut -d= -f2 | xargs xinput disable

Atmel also seems pretty common, an alternative way as @TalkLittle: xinput enable `xinput | grep Atmel | sed «s/^.*id=\(7*\).*$/\1/»` . Command inside What does backticks return the id.

The xinput solution did not work for me. I instead followed the instructions in this thread. This will disable it at boot time.

  1. Edit /usr/share/X11/xorg.conf.d/10-evdev.conf
  2. Add Option «Ignore» «on» to the end of the section with the touchscreen identifier
  3. Reboot

enter image description here

  • For the record (Google), I have a Samsung Series 7 and my touch screen was listed as ELAN Touchscreen in xinput .
  • JFTR too, in this question says the power consumption difference is mostly negligible.

I did that on a Dell XPS and it disabled the screen completely. After booting the screen is just black. Booted in recovery mode, removed the line and everything went back to normal.

This prevented my laptop for rebooting into X windows. Not a big deal to remove that setting, but something newbies want to check they can do before trying it.

Читайте также:  Astra linux подключение принтера kyocera

Also disabled the touchpad on my Sony Vaio. Setting the driver value to «libinput» did the trick though

On Ubuntu 17.10, I couldn’t find the file you listed but there was /usr/share/X11/xorg.conf.d/40-libinput.conf . I changed a similar block in this file and at next restart I guess I’ll find out how it went!

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

Change MatchIsTouchscreen from «on» to «off» in the Touchscreen section so it looks like this:

Section "InputClass" Identifier "evdev touchscreen catchall" MatchIsTouchscreen "off" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection 

Touchscreen is disabled and no longer detected in xinput list.

This worked for Dell XPS 15 and Linux Mint 18. I think this is safer than using Option = ignore from the answer, as it doesn’t disable the device just not doesn’t treat it as a touch screen.

This isn’t working anymore. I updated to Ubuntu 18.04, and the 10-evdev.conf file is gone. I tried recreating it, but it didn’t work.

@Merlin04 Did you check the libinput file? There is an answer that mentions this: askubuntu.com/a/1038259/167115

As id for xinput changes on reboot, I added a simple one-line screen on session load:

#!/bin/bash xinput --list | awk '/Atmel Atmel maXTouch Digitizer/ ' | awk 'xinput --list for device name).

)" data-controller="se-share-sheet" data-se-share-sheet-title="Share a link to this answer" data-se-share-sheet-subtitle="" data-se-share-sheet-post-type="answer" data-se-share-sheet-social="facebook twitter " data-se-share-sheet-location="2" data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f3.0%2f" data-se-share-sheet-license-name="CC BY-SA 3.0" data-s-popover-placement="bottom-start">Share
)" title="">Improve this answer
answered Feb 20, 2018 at 13:11
Add a comment|
2

In order to disable the touchscreen on Ubuntu 19.x and 20.x you can:

  • Wait the login screen
  • Press Alt+F2
  • Edit the "libinput" configuration and disable the touchscreen section, like that:
sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf
# Match on all types of devices but joysticks # # If you want to configure your devices, do not copy this file. # Instead, use a config snippet that contains something like this: # # Section "InputClass" # Identifier "something or other" # MatchDriver "libinput" # # MatchIsTouchpad "on" # . other Match directives . # Option "someoption" "value" # EndSection # # This applies the option any libinput device also matched by the other # directives. See the xorg.conf(5) man page for more info on # matching devices. 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"  

My "Dell Inspiron" touchscreen was broken. The cursor moved all over the place and click in random places several times a second. I was unable even to make login on the gnome or even to access the bios.

Источник

How do I disable a touchpad using the command line?

There are at least two methods (that I know of) you could try.

synclient

If your laptop is equipped with a Synaptics (or ALPS) touchpad you can indeed use synclient as already mentioned by Shutupsquare. I'm running Ubuntu 14.04 and on my machine it was installed by default.

Test if synclient is installed: synclient -V (it should report the version number)

Turn touchpad ON: synclient TouchpadOff=0

Turn touchpad OFF: synclient TouchpadOff=1

I have not tested this myself, but if your goal is to not move the mouse when your arms are resting on the touch pad, this might help.

Turn palm detection ON: synclient PalmDetect=1

Turn palm detection OFF: synclient PalmDetect=0

In general you can configure any property of your Synaptics touchpad by synclient property=value . Where the property is one of the available properties shown by synclient -l

Links for further reading

archlinux - wiki - Touchpad Synaptics

ask ubuntu - How do I make my synclient settings stick? - Ubuntu

xinput

If you do not want or cannot use synclient, you could also use xinput . The procedure is somewhat similar.

list all xinput devices: xinput

Part of the ouput could look like this:

⎡ Virtual core pointer [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer [slave pointer (2)] ⎜ ↳ Logitech USB-PS/2 Optical Mouse [slave pointer (2)] ⎜ ↳ ETPS/2 Elantech Touchpad [slave pointer (2)] 

It this particular case my touchpad has and its full name is "ETPS/2 Elantech Touchpad".

The command to set a property is xinput set-prop . The property to enable or disable the touchpad is Device Enabled , so to enable or disable it type:

Turn touchpad ON: xinput set-prop "Device Enabled" 1 (where is your device id, in my case 17)

Turn touchpad OFF: xinput set-prop "Device Enabled" 0

Turn palm detection ON: xinput set-prop "Palm Detection" 1

Turn palm detection OFF: xinput set-prop "Palm Detection" 0

To query available properties: xinput list-props OR xinput list-props , this should be quite similair to synclient -l .

NOTE

When setting properties through either xinput or synclient the properties are not set to the other tool. They are also not set in unity-control-center.

Note that xinput ids can change over restarts. So relying on these ids in scripts or shortcuts won't work.

This did it for me. In particular, I discovered I need to run xinput , as setting TouchpadOff via synclient was ineffective.

Thank you for the introduction to xinput . I was in a bit of a pickle with my builtin keyboard and trackpoint buttons apparently sending bad inputs that interfered with the input from the external keyboard. This allowed my to disable the builtin devices. Cheers! 🙂

synclient and xinput will not work if you are using gnome (or unity, cinnamon) environment, because it will override settings, so if you want synclient or xinput to take over these settings, you should disable that first:

    install dconf-editor if not installed:

apt-get install dconf-editor 

This should make synclient or xinput work.

I wrote a python piece of code (now updated from python2 to python3) so that you can use the xinput technique without doing all the manual work. Copyleft, AS-IS, no warranty, use at your own risk. Works great for me: and if you are using gnome, just map it to a key shortcut like Ctrl Shift T .

#!/usr/bin/python3 # -*- coding: utf-8 -*- '''Program to toggle Touchpad Enable to Disable or vice-versa.''' from subprocess import check_output import re def current_id(): """ Search through the output of xinput and find the line that has the word Touchpad. At that point, I believe we can find the ID of that device. """ props = check_output(["xinput"]).decode("utf-8").splitlines() match = [line for line in props if "Touchpad" in line] assert len(match) == 1, "Problem finding Touchpad string! %s" % match pat = re.match(r"(.*)id=(\d+)", match[0]) assert pat, "No matching ID found!" return int(pat.group(2)) def current_status(tpad_id): """Find the current Device ID - it has to have the word Touchpad in the line.""" props = check_output( ['xinput','list-props',str(tpad_id)]).decode("utf-8").splitlines() match = [line for line in props if "Device Enabled" in line] assert len(match) == 1, "Can't find the status of device #%d" % tpad_id pat = re.match(r"(.*):\s*(\d+)", match[0]) assert pat, "No matching status found!" return int(pat.group(2)) def flop(tpad_id, status): """Change the value of status, and call xinput to reverse that status.""" if status == 0: status = 1 else: status = 0 print("Changing Device #",tpad_id," Device Enabled to ",status) props = check_output(['xinput', 'set-prop', str(tpad_id), 'Device Enabled', str(status)]) def main(): """Get curent device id and status, and flop status value.""" tpad = current_id() stat = current_status(tpad) flop(tpad, stat) main() 

Источник

Оцените статью
Adblock
detector