我需要永久禁用触摸屏输入 - Ubuntu 16.04

Ion*_*sca 19 touchscreen 16.04

最近我在 HP Envy 17t 上安装了 Ubuntu 16.04,一切正常。但是,我需要永久禁用触摸屏输入,我尝试了所有能找到的方法,但没有任何效果。

我可以管理的最接近的事情是制作一个将在启动时运行的 shell 脚本(shell 脚本调用xinput set-prop "Touchscreen Input Name" "Device Enabled" 0命令)。

但是,此脚本在我登录之前不会运行。需要在登录屏幕上禁用我的触摸屏。

我该如何解决这个问题?我尝试修改10-evdev.conf文件,但我得到的只是一个紫色屏幕和一个损坏的 Ubuntu 设置。

Alc*_*del 36

尝试使用 找到您的触摸屏 XID xinput --list,然后将以下命令添加到您的启动应用程序中:(xinput disable [touchscreen XID]例如,如果 XID 为 9,则该命令将为xinput disable 9)。

  • -1 不能保证 XID 保持不变,因此您的解决方案可能会导致,例如,在启动时禁用触摸板而不是触摸屏。 (10认同)
  • 我的触摸屏有时会显示 id 17,有时会显示 13。这不是解决方案。 (2认同)

Str*_*ger 5

@Whiteboy 共享的链接有效。

在 file 中/usr/share/X11/xorg.conf.d/10-evdev.conf,将触摸屏“驱动程序”部分中的“evdev”更改为“libinput”应该可以解决问题。

所以现在它看起来像这样:

#
# Catch-all evdev loader for udev-based systems
# We don't simply match on any device since that also adds accelerometers
# and other devices that we don't really want to use. The list below
# matches everything but joysticks.

Section "InputClass"
Identifier "evdev pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection

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

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

Section "InputClass"
Identifier "evdev tablet catchall"
MatchIsTablet "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection

Section "InputClass"
Identifier "evdev touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Run Code Online (Sandbox Code Playgroud)

这适用于我的戴尔 5558 笔记本电脑。