如何配置触摸板点击灵敏度?

Slo*_*man 15 touchpad wayland libinput 17.10

自从我升级到 17.10 后,触摸板的敲击灵敏度太低,经常错过我的敲击。我知道系统已经发现我的 Lenovo Yoga 2 有一个 Synaptics 触摸板:

$ sudo evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
...
/dev/input/event6:  Synaptics TM2714-001
...
Run Code Online (Sandbox Code Playgroud)

但 xinput 并不认为它是 Synaptics 特有的:

$ xinput list
? Virtual core pointer                          id=2    [master pointer  (3)]
?   ? Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
?   ? xwayland-pointer:13                       id=6    [slave  pointer  (2)]
?   ? xwayland-relative-pointer:13              id=7    [slave  pointer  (2)]
?   ? xwayland-touch:13                         id=9    [slave  pointer  (2)]
? Virtual core keyboard                         id=3    [master keyboard (2)]
    ? Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ? xwayland-keyboard:13                      id=8    [slave  keyboard (3)]

$ xinput list-props "xwayland-touch:13"
Device 'xwayland-touch:13':
    Device Enabled (119):   1
    Coordinate Transformation Matrix (121): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (244): 0
    Device Accel Constant Deceleration (245):   1.000000
    Device Accel Adaptive Deceleration (246):   1.000000
    Device Accel Velocity Scaling (247):    10.000000
Run Code Online (Sandbox Code Playgroud)

并且 synclient 同意:

$ synclient
Couldn't find synaptics properties. No synaptics driver loaded?
Run Code Online (Sandbox Code Playgroud)

libinput 确实知道它是一个 Synaptics:

$ sudo libinput list-devices
...
Device:           Synaptics TM2714-001
Kernel:           /dev/input/event6
Group:            8
Seat:             seat0, default
Size:             87x57mm
Capabilities:     pointer 
Tap-to-click:     disabled
Tap-and-drag:     enabled
Tap drag lock:    disabled
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   *two-finger edge 
Click methods:    *button-areas clickfinger 
Disable-w-typing: enabled
Accel profiles:   none
Rotation:         n/a
...
Run Code Online (Sandbox Code Playgroud)

虽然我没有看到像旧的 X11 手指压力属性那样的东西。(libinput measure-touchpad-tap有趣的是,收集有关时间而不是压力的数据。)

如何提高对敲击的敏感度?

ano*_*nim 5

使用 libinput 提供的 libinput 测量触摸板压力工具。此工具将搜索您的触摸板设备并打印一些压力统计信息,包括触摸是否/被认为是逻辑关闭。

sudo libinput measure touchpad-pressure
Run Code Online (Sandbox Code Playgroud)

默认情况下,此工具使用 udev hwdb 条目作为压力范围。要缩小设备的最佳值,请使用“--touch-thresholds”参数指定“逻辑上向下”和“逻辑上向上”压力阈值:

sudo libinput measure touchpad-pressure --touch-thresholds=10:8 --palm-threshold=20
Run Code Online (Sandbox Code Playgroud)

与触摸板交互并检查此工具的输出是否符合您的期望。

一旦确定了阈值(例如 10 和 8),就可以使用以下 hwdb 文件启用它们:

cat /etc/udev/hwdb.d/99-touchpad-pressure.hwdb
libinput:name:*SynPS/2 Synaptics TouchPad:dmi:*svnHewlett-Packard:*pnHPCompaq6910p*
LIBINPUT_ATTR_PRESSURE_RANGE=10:8
Run Code Online (Sandbox Code Playgroud)

第一行是匹配行,应该根据 /sys/class/dmi/id/modalias 中的信息针对设备名称(请参阅 evemu-record 的输出)和本地系统进行调整。modalias 应缩短为特定系统的信息,通常是系统供应商 (svn) 和产品名称 (pn)。

到位后,您需要运行以下命令,针对您设备的事件节点进行调整:

sudo udevadm hwdb --update
sudo udevadm test /sys/class/input/eventX
Run Code Online (Sandbox Code Playgroud)

如果压力范围属性正确显示,重新启动 X 或 Wayland 合成器,libinput 现在应该使用正确的压力阈值。Helper 工具可用于首先验证正确的功能,而无需重新启动。

一旦认为压力范围正确,请报告错误以将压力范围放入存储库。

注意:我没有输入一个词,这都是引用。

来源:https : //wayland.freedesktop.org/libinput/doc/latest/touchpad_pressure.html#touchpad_pressure_hwdb