如何禁用笔记本电脑上的触摸屏?

ple*_* me 33 arch-linux touch-screen

我的笔记本电脑有触摸屏,但我不使用它。如何禁用此功能?我使用 Arch Linux。我想我可以尝试删除相关的驱动程序。根据此页面,可能的驱动程序都已命名xf86-input*。但是,看起来我没有安装类似的东西:

# pacman -Qs xf86-input
local/xf86-input-evdev 2.8.3-1 (xorg-drivers xorg)
    X.org evdev input driver
local/xf86-input-joystick 1.6.2-3 (xorg-drivers xorg)
    X.Org Joystick input driver
local/xf86-input-keyboard 1.8.0-2 (xorg-drivers xorg)
    X.Org keyboard input driver
local/xf86-input-mouse 1.9.0-2 (xorg-drivers xorg)
    X.org mouse input driver
local/xf86-input-synaptics 1.7.5-1 (xorg-drivers xorg)
    Synaptics driver for notebook touchpads
local/xf86-input-vmmouse 13.0.0-3 (xorg-drivers xorg)
    X.org VMWare Mouse input driver
local/xf86-input-void 1.4.0-6 (xorg-drivers xorg)
    X.org void input driver
Run Code Online (Sandbox Code Playgroud)

知道如何追踪负责的司机或以其他方式禁用触摸屏功能吗?

And*_*ese 58

除了卸载适当的驱动程序(这可能无法正常工作,因为某些设备充当通常的鼠标设备,并且只需要特定驱动程序才能获得更复杂的功能,并且您的已安装驱动程序列表表明了这一点)您还可以通过该xinput工具或通过明确匹配来禁用该设备在xorg.conf

要使用 禁用设备xinput,您必须确定设备 XInput id:

$ xinput
? Virtual core pointer                      id=2    [master pointer  (3)]
?   ? Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
?   ? SynPS/2 Synaptics TouchPad                id=10   [slave  pointer  (2)]
?   ? TPPS/2 IBM TrackPoint                     id=11   [slave  pointer  (2)]
?   ? My annoying touchscreen                       id=14   [slave  pointer  (2)]
? Virtual core keyboard                     id=3    [master keyboard (2)]
    ? Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ? Power Button                              id=6    [slave  keyboard (3)]
    ? Video Bus                                 id=7    [slave  keyboard (3)]
    ? Sleep Button                              id=8    [slave  keyboard (3)]
    ? AT Translated Set 2 keyboard              id=9    [slave  keyboard (3)]
    ? ThinkPad Extra Buttons                    id=12   [slave  keyboard (3)]
    ? HID 0430:0005                             id=13   [slave  keyboard (3)]
Run Code Online (Sandbox Code Playgroud)

在此示例中,»我烦人的触摸屏« 具有 id 14。所以要禁用它,只需键入

$ xinput disable 14
Run Code Online (Sandbox Code Playgroud)

要通过 禁用它xorg.conf,您只需在/etc/X11/xorg.conf.d目录下创建一个文件,例如99-no-touchscreen.conf具有以下内容:

Section "InputClass"
    Identifier         "Touchscreen catchall"
    MatchIsTouchscreen "on"

    Option "Ignore" "on"
EndSection
Run Code Online (Sandbox Code Playgroud)

这将忽略所有触摸屏设备。如果您有多个并且想要使用其中一个或多个,您可以使用其他Match指令之一更精确地指定匹配。有关xorg.conf更多详细信息,请参阅联机帮助页(只需搜索 »Match« 即可找到您要查找的内容)。