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

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

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

$ sudo evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
...
/dev/input/event6:  Synaptics TM2714-001
...

但是 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

并且 synclient 同意:

$ synclient
Couldn't find synaptics properties. No synaptics driver loaded?

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
...

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

如何才能提高轻敲的灵敏度?

答案1

使用 libinput 提供的 libinput 测量触摸板压力工具。此工具将搜索您的触摸板设备并打印一些压力统计数据,包括触摸是否在逻辑上被视为按下。

sudo libinput measure touchpad-pressure

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

sudo libinput measure touchpad-pressure --touch-thresholds=10:8 --palm-threshold=20

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

一旦确定了阈值(例如 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

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

一旦到位,您需要运行以下命令,并根据设备的事件节点进行调整:

sudo udevadm hwdb --update
sudo udevadm test /sys/class/input/eventX

如果压力范围属性显示正确,请重新启动 X 或 Wayland 合成器,然后 libinput 现在应该会使用正确的压力阈值。可以使用辅助工具先验证功能是否正确,而无需重新启动。

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

注:没有一个字是我打的,这全是引用。

来源: https://wayland.freedesktop.org/libinput/doc/latest/touchpad-pressure-debugging.html

相关内容