我有一个触摸屏,但是驱动程序不能正常工作并干扰我的鼠标。
是否可以禁用我的触摸屏,以便我可以再次正常工作?
答案1
您可以尝试使用以下命令禁用输入设备xinput
。首先查看您有哪些输入设备,只需输入:
xinput
你应该看到如下列表:
$ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Atmel Atmel maXTouch Digitizer id=9 [slave pointer (2)]
⎜ ↳ TPPS/2 IBM TrackPoint id=13 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=12 [slave pointer (2)]
...
然后您可以使用以下命令禁用所需的输入设备:
xinput disable 9
其中 9 是您要禁用的设备的 ID。您也可以使用引号内的设备名称。
在 xinput 版本 1.5.99.1 中,您需要改为执行此操作xinput set-prop 9 'Device Enabled' 0
。奇怪的是,在 xinput v1.6.2 上,第一种方法有效。
答案2
答案3
使用编辑文件
sudo nano /usr/share/X11/xorg.conf.d/10-evdev.conf
在触摸屏部分将 MatchIsTouchscreen 从“开”更改为“关”,使其看起来像这样:
Section "InputClass"
Identifier "evdev touchscreen catchall"
MatchIsTouchscreen "off"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection
保存、命名并退出
触摸屏已被禁用,并且不再在 xinput 列表中检测到。
答案4
为了禁用 Ubuntu 19.x 和 20.x 上的触摸屏,您可以:
- 等待登录屏幕
- 按 Alt+F2
- 编辑“libinput”配置并禁用触摸屏部分,如下所示:
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" <----
# Identifier "libinput touchscreen catchall" <---- this one
# MatchIsTouchscreen "on" <---- put # in
# MatchDevicePath "/dev/input/event*" <---- front of
# Driver "libinput" <---- every line
#EndSection <----
Section "InputClass"
Identifier "libinput tablet catchall"
MatchIsTablet "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
我的“戴尔 Inspiron”触摸屏坏了。光标到处乱动,一秒钟内多次点击随机位置。我甚至无法登录 gnome,甚至无法访问 BIOS。