使用 libinput 而不是突触驱动程序的触摸板

Kev*_*rce 5 touchpad synaptics drivers libinput

我的 lenovo x230 上的触摸板没有运行突触驱动程序,我需要它来增加功能。相反,它使用 libinput。如何让突触驱动程序在启动时优先?

触摸板是(xinput list):

?   ? PS/2 Synaptics TouchPad                   id=13   [slave  pointer  (2)]
Run Code Online (Sandbox Code Playgroud)

我可以检查它正在使用什么驱动程序grep -i "Using input driver" /var/log/Xorg.0.log

(II) Using input driver 'libinput' for 'PS/2 Synaptics TouchPad'
Run Code Online (Sandbox Code Playgroud)

但是,我肯定安装了突触驱动程序 ( sudo apt install xserver-xorg-input-synaptics):

Reading package lists... Done
Building dependency tree       
Reading state information... Done
xserver-xorg-input-synaptics is already the newest version (1.9.0-1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Run Code Online (Sandbox Code Playgroud)

我可以在 libinput 驱动程序 ( ls /usr/share/X11/xorg.conf.d/)旁边看到 Synaptics 驱动程序的配置文件:

10-amdgpu.conf  40-libinput.conf          70-wacom.conf
10-quirks.conf  51-synaptics-quirks.conf
10-radeon.conf  70-synaptics.conf
Run Code Online (Sandbox Code Playgroud)

我的结论是同时安装了突触和 libinput 驱动程序,但由于某种原因,libinput 具有更高的优先级。这很令人困惑,因为我的理解是,配置文件的数量/usr/share/X11/xorg.conf.d/越高,优先级就越高,这意味着应该选择突触。

我怎样才能让突触运行呢?到目前为止,我尝试将synaptics.conf文件移动到,/etc/X11/xorg.conf.d因为 我读取了这个目录具有更高的优先级,但这不起作用。的相关部分/var/log/Xorg.0.log

[     7.718] (II) config/udev: Adding input device PS/2 Synaptics TouchPad (/dev/input/event5)
[     7.718] (**) PS/2 Synaptics TouchPad: Applying InputClass "libinput pointer catchall"
[     7.718] (II) Using input driver 'libinput' for 'PS/2 Synaptics TouchPad'
[     7.718] (**) PS/2 Synaptics TouchPad: always reports core events
[     7.718] (**) Option "Device" "/dev/input/event5"
[     7.718] (**) Option "_source" "server/udev"
[     7.719] (II) event5  - PS/2 Synaptics TouchPad: is tagged by udev as: Mouse
[     7.719] (II) event5  - PS/2 Synaptics TouchPad: device is a pointer
[     7.719] (II) event5  - PS/2 Synaptics TouchPad: device removed
[     7.748] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio1/input/input5/event5"
[     7.748] (II) XINPUT: Adding extended input device "PS/2 Synaptics TouchPad" (type: MOUSE, id 13)
[     7.748] (**) Option "AccelerationScheme" "none"
[     7.748] (**) PS/2 Synaptics TouchPad: (accel) selected scheme none/0
[     7.748] (**) PS/2 Synaptics TouchPad: (accel) acceleration factor: 2.000
[     7.748] (**) PS/2 Synaptics TouchPad: (accel) acceleration threshold: 4
[     7.749] (II) event5  - PS/2 Synaptics TouchPad: is tagged by udev as: Mouse
[     7.749] (II) event5  - PS/2 Synaptics TouchPad: device is a pointer
[     7.749] (II) config/udev: Adding input device PS/2 Synaptics TouchPad (/dev/input/mouse0)
[     7.749] (II) No input driver specified, ignoring this device.
[     7.750] (II) This device may have been added with another device file.
Run Code Online (Sandbox Code Playgroud)

它所指的另一个设备文件是什么?在哪里libinput被选为触摸板驱动程序,我如何才能被synaptics选中?

编辑:我的 libinput 版本是

kp@kvnp:~$ libinput --version
1.10.4
Run Code Online (Sandbox Code Playgroud)

似乎只有一种滚动方法可用:

kp@kvnp:~$ xinput list-props 16
Device 'PS/2 Synaptics TouchPad':
    Device Enabled (150):   1
    Coordinate Transformation Matrix (152): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Natural Scrolling Enabled (285):   1
    libinput Natural Scrolling Enabled Default (286):   0
    libinput Scroll Methods Available (289):    0, 0, 1
    libinput Scroll Method Enabled (290):   0, 0, 1
    libinput Scroll Method Enabled Default (291):   0, 0, 1
    libinput Button Scrolling Button (292): 2
    libinput Button Scrolling Button Default (293): 2
    libinput Middle Emulation Enabled (294):    1
    libinput Middle Emulation Enabled Default (295):    0
    libinput Accel Speed (296): 0.000000
    libinput Accel Speed Default (297): 0.000000
    libinput Accel Profiles Available (298):    1, 1
    libinput Accel Profile Enabled (299):   1, 0
    libinput Accel Profile Enabled Default (300):   1, 0
    libinput Left Handed Enabled (301): 0
    libinput Left Handed Enabled Default (302): 0
    libinput Send Events Modes Available (270): 1, 0
    libinput Send Events Mode Enabled (271):    0, 0
    libinput Send Events Mode Enabled Default (272):    0, 0
    Device Node (273):  "/dev/input/event5"
    Device Product ID (274):    2, 1
    libinput Drag Lock Buttons (287):   <no items>
    libinput Horizontal Scroll Enabled (288):   1
Run Code Online (Sandbox Code Playgroud)

当我尝试在 libinput 中让两根手指滚动时,我得到以下输出:

kp@kvnp:~$ xinput set-prop 16 290 1 0 0 
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  131 (XInputExtension)
  Minor opcode of failed request:  57 ()
  Value in failed request:  0x122
  Serial number of failed request:  19
  Current serial number in output stream:  20
Run Code Online (Sandbox Code Playgroud)

小智 3

我知道这个线程很旧,但我最近在更新到 Ubuntu 20.04 LTS 后遇到了同样的问题。

我通过更改 中的突触编号优先级解决了这个问题 /usr/share/X11/xorg.conf.d/

就我而言,这是命令的输出ls -1 /usr/share/X11/xorg.conf.d/

10-amdgpu.conf
10-quirks.conf
10-radeon.conf
40-libinput.conf
51-synaptics-quirks.conf
70-synaptics.conf
70-wacom.conf
Run Code Online (Sandbox Code Playgroud)

我用命令将 更改70-synaptics.conf30-synaptics.conf

mv 70-synaptics.conf 30-synaptics.conf
Run Code Online (Sandbox Code Playgroud)

这赋予它比 更高的优先级40-libinput.conf。请务必以 root 身份执行此操作。然后reboot


kev*_*aks 2

我重新安装了内核,然后安装了两个

xserver-xorg-input-multitouch

xserver-xorg-input-mouse
Run Code Online (Sandbox Code Playgroud)

这通过允许触摸板被识别为SynPS/2 Synaptics Touchpad而不是解决了这个问题PS/2 Synaptics Touchpad。简而言之,我认为内核将触摸板识别为一个基本的鼠标。我不太确定为什么。