xinput 显示两个轨迹点而不是一个(其中一个是 libinput)

xinput 显示两个轨迹点而不是一个(其中一个是 libinput)

我多年来一直使用脚本来配置 Trackpoint。它可以在我当前使用 Gentoo 的 Lenovo x230 笔记本电脑上运行,但可能由于某些软件更新而停止运行。

#!/bin/bash
trackpoint="TPPS/2 IBM TrackPoint"

xinput set-prop "$trackpoint" "Device Accel Profile" 3
xinput set-prop "$trackpoint" "Device Accel Velocity Scaling" 30
xinput set-prop "$trackpoint" "Evdev Wheel Emulation" 1
xinput set-prop "$trackpoint" "Evdev Wheel Emulation Button" 2
xinput set-prop "$trackpoint" "Evdev Wheel Emulation Timeout" 200
xinput set-prop "$trackpoint" "Evdev Wheel Emulation Axes" 6 7 4 5

错误消息非常清楚。

Warning: There are multiple devices matching 'TPPS/2 IBM TrackPoint'.
To ensure the correct one is selected, please use the device ID, or prefix the
device name with 'pointer:' or 'keyboard:' as appropriate.

unable to find device TPPS/2 IBM TrackPoint

很容易检查错误消息是否正确。

$ xinput
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=11   [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=12   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=10   [slave  pointer  (2)]

所以问题是(1)为什么现在有两个轨迹点记录以及(2)如何修复它。过去,xinput 只能看到一个轨迹点,并且一切正常。

有一种解决方法可以使用12设备名称来代替设备名称,但不能保证 id 会稳定,尤其是当它仅因错误而存在时。

我在网上没有找到任何有用的资源。

我意识到有两种不同的 Xorg 输入驱动程序,一种称为埃夫德夫,另一个叫库输入。我在用着埃夫德夫在 Gentoo 上,我没有编译任何其他输入驱动程序。我不知道如何正确检查内核设备列表以及如何埃夫德夫库输入对待他们。

联想 x260 又发生了这种情况 – 但不幸的是我似乎没有复制两个轨迹点记录,所以你不会看到这一点。 :(

> xinput --list-props 11
Device 'SynPS/2 Synaptics TouchPad':
    Device Enabled (169):   1
    Coordinate Transformation Matrix (171): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (297): 1
    Device Accel Constant Deceleration (298):   2.500000
    Device Accel Adaptive Deceleration (299):   1.000000
    Device Accel Velocity Scaling (300):    12.500000
    Synaptics Edges (301):  1545, 5399, 1333, 4521
    Synaptics Finger (302): 25, 30, 0
    Synaptics Tap Time (303):   180
    Synaptics Tap Move (304):   255
    Synaptics Tap Durations (305):  180, 180, 100
    Synaptics ClickPad (306):   1
    Synaptics Middle Button Timeout (307):  0
    Synaptics Two-Finger Pressure (308):    282
    Synaptics Two-Finger Width (309):   7
    Synaptics Scrolling Distance (310): 116, 116
    Synaptics Edge Scrolling (311): 0, 0, 0
    Synaptics Two-Finger Scrolling (312):   1, 0
    Synaptics Move Speed (313): 1.000000, 1.750000, 0.034400, 0.000000
    Synaptics Off (314):    0
    Synaptics Locked Drags (315):   0
    Synaptics Locked Drags Timeout (316):   5000
    Synaptics Tap Action (317): 0, 0, 0, 0, 1, 3, 2
    Synaptics Click Action (318):   1, 3, 2
    Synaptics Circular Scrolling (319): 0
    Synaptics Circular Scrolling Distance (320):    0.100000
    Synaptics Circular Scrolling Trigger (321): 0
    Synaptics Circular Pad (322):   0
    Synaptics Palm Detection (323): 0
    Synaptics Palm Dimensions (324):    10, 200
    Synaptics Coasting Speed (325): 20.000000, 50.000000
    Synaptics Pressure Motion (326):    30, 160
    Synaptics Pressure Motion Factor (327): 1.000000, 1.000000
    Synaptics Grab Event Device (328):  0
    Synaptics Gestures (329):   1
    Synaptics Capabilities (330):   1, 0, 0, 1, 1, 1, 1
    Synaptics Pad Resolution (331): 73, 53
    Synaptics Area (332):   0, 0, 0, 0
    Synaptics Soft Button Areas (333):  3472, 0, 4112, 0, 0, 0, 0, 0
    Synaptics Noise Cancellation (334): 29, 29
    Device Product ID (293):    2, 7
    Device Node (292):  "/dev/input/event1"

> xinput --list-props 12
Device 'TPPS/2 IBM TrackPoint':
    Device Enabled (169):   1
    Coordinate Transformation Matrix (171): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Natural Scrolling Enabled (339):   0
    libinput Natural Scrolling Enabled Default (340):   0
    libinput Scroll Methods Available (341):    0, 0, 1
    libinput Scroll Method Enabled (342):   0, 0, 1
    libinput Scroll Method Enabled Default (343):   0, 0, 1
    libinput Button Scrolling Button (344): 2
    libinput Button Scrolling Button Default (345): 2
    libinput Middle Emulation Enabled (346):    0
    libinput Middle Emulation Enabled Default (347):    0
    libinput Accel Speed (348): 0.000000
    libinput Accel Speed Default (349): 0.000000
    libinput Accel Profiles Available (350):    1, 1
    libinput Accel Profile Enabled (351):   1, 0
    libinput Accel Profile Enabled Default (352):   1, 0
    libinput Left Handed Enabled (353): 0
    libinput Left Handed Enabled Default (354): 0
    libinput Send Events Modes Available (289): 1, 0
    libinput Send Events Mode Enabled (290):    0, 0
    libinput Send Events Mode Enabled Default (291):    0, 0
    Device Node (292):  "/dev/input/event3"
    Device Product ID (293):    2, 10
    libinput Drag Lock Buttons (355):   <no items>
    libinput Horizontal Scroll Enabled (356):   1

上面的输出似乎有很大不同。另外,当输出看起来像这样时,TrackPoint 不起作用,即鼠标不移动。

相关链接:

相关内容