Update 2017.11.10
Linput 1.9 总算搞定了这个问题,选择采用硬件内建的加速方案,libinput 仅提供简单的线性映射。
如果需要自己调速度,除了设置 xinput set-float-prop id=X 'libinput Accel Speed' $speed
之外,更底层的方式是给 libinput 提供一个 LIBINPUT_ATTR_TRACKPOINT_RANGE 属性。
通过
sudo libinput measure trackpoint-range
命令测量出一个硬件提供的 trackpoint 加速范围,并在 hwdb 中写上,例如
evdev:name:*DualPoint Stick:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeE7440*:pvr*
LIBINPUT_ATTR_TRACKPOINT_RANGE=30
即可;这个值越大,指针速度越慢。
Update
Libinput 0.19 至今,针对指点杆的配置都是开发者自认为的「自适应」配置,在我的设备上
加速度非常非常非常不够,开发者则是一副自己很懂的样子。
https://bugs.freedesktop.org/show_bug.cgi?id=91369
于是我只好把 libinput patch 掉了
--- a/src/filter.c
+++ b/src/filter.c
@@ -720,7 +720,7 @@ trackpoint_accel_profile(struct motion_filter *filter,
else if (speed_in < threshold)
factor = 1;
else
- factor = incline * v_us2ms(speed_in - threshold) + 1;
+ factor = incline * v_us2ms(speed_in - threshold)/dpi_factor + 1;
layout: post
factor = min(max_accel, factor);
Update
Systemd 221 之后 已经有 trackpoint 的 hwdb 了,libinput 也支持 trackpoint 加速,我现在的配置是
evdev:name:*DualPoint Stick:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeE7440*:pvr*
POINTINGSTICK_CONST_ACCEL=2
Update End
近期 Arch Linux 升上了 Gnome 3.16,Wayland 相关组件开始大量启用,比如 GDM 默认使用 Wayland,Xorg 默认使用 libinput 替代 evdev 等。
Arch 更新之后我们首先关心的是:有没有东西坏掉?很幸运遗憾,这次鼠标速度不对了……
具体来说,我习惯使用 trackpoint ,之前使用 xset m 5 2 设置光标速度,
更新后此法无法调整光标速度,可见 xf86-input-libinput 不再接受这种设置,
同时即使 gnome 设置中把鼠标速度调到最快,trackpoint 的速度仍然很慢。
这个 bug 已经有 好事者 好心人汇报,最近也有 patch 提交,下个版本的 libinput 就设置
trackpoint 的加速参数了。
可是我等不及啊老湿!而且怎么设置参数阿根本找不到在哪里调好不好!
...
Read more