[daily][device][archlinux][trackpoint] 修改指点杆速度/敏捷度

时间:2024-08-03 00:07:44

修改指点杆速度,敏捷度:

[root@T7 ~]# echo  > /sys/devices/platform/i8042/serio1/serio2/sensitivity
[root@T7 ~]# echo > /sys/devices/platform/i8042/serio1/serio2/speed
[root@T7 ~]# echo > /sys/devices/platform/i8042/serio1/serio2/speed
[root@T7 ~]# echo > /sys/devices/platform/i8042/serio1/serio2/sensitivity

改不改的,好像没什么变化捏。

-------------------  update @ 2017-07-05 ---------------------

有变化有变化,而且效果和明显。

我最后选了,sensitivity 245, speed 220   取值范围在0-255 之间。

手指头终于没那么累了。 目前方法是使用一个脚本手动设置,过两天改成自动配置。

------------------  update @ 2017-07-06 -----------------------

我很久以前,实现的一份配置。目前仍然生效,但是与speed无关。

/home/tong [tong@T7] [:]
> cat /etc/X11/xorg.conf.d/-trackpoint.conf
Section "InputClass"
Identifier "Trackpoint Wheel Emulation"
MatchProduct "TPPS/2 IBM TrackPoint"
MatchDevicePath "/dev/input/event*"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" ""
Option "Emulate3Buttons" "false"
Option "XAxisMapping" "7 6"
Option "YAxisMapping" "5 4"
EndSection

新增一份speed的配置。

/home/tong [tong@T7] [:]
> sudo libinput-list-devices

信息收集:

[root@T7 ~]# libinput-list-devices |grep -A  -i trackpoint
Device: TPPS/ IBM TrackPoint
Kernel: /dev/input/event20
Group:
Seat: seat0, default
Capabilities: pointer
Tap-to-click: n/a
[root@T7 ~]# udevadm info -q all -n /dev/input/event20
P: /devices/platform/i8042/serio1/serio2/input/input11/event20
N: input/event20
E: DEVNAME=/dev/input/event20
E: DEVPATH=/devices/platform/i8042/serio1/serio2/input/input11/event20
E: ID_BUS=i8042
E: ID_INPUT=
E: ID_INPUT_MOUSE=
E: ID_INPUT_POINTINGSTICK=
E: LIBINPUT_DEVICE_GROUP=//a/:synaptics-pt/serio0
E: MAJOR=
E: MINOR=
E: POINTINGSTICK_CONST_ACCEL=1.0
E: POINTINGSTICK_SENSITIVITY=
E: SUBSYSTEM=input
E: USEC_INITIALIZED= [root@T7 ~]# ls /sys/dev
dev/ devices/
[root@T7 ~]# ls /sys/devices/platform/i8042/serio
serio0/ serio1/
[root@T7 ~]# ls /sys/devices/platform/i8042/serio1/serio2/
bind_mode draghys driver ext_dev id input mindrag power protocol reach resolution sensitivity speed thresh upthresh
description drift_time drvctl firmware_id inertia jenks modalias press_to_select rate resetafter resync_time skipback subsystem uevent ztime
[root@T7 ~]#

配置:

[root@T7 ~]# touch /etc/udev/rules.d/-trackpoint.rules
[root@T7 ~]# cat /etc/udev/rules.d/-trackpoint.rules
ACTION=="add", SUBSYSTEM="input", ATTR{name}=="TPPS/2 IBM TrackPoint", ATTR{device/sensitivity}="", ATTR{device/speed}=""

测试:

/home/tong [tong@T7] [:]
> udevadm test /sys/devices/platform/i8042/serio1

参考:http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint

https://wiki.archlinux.org/index.php/TrackPoint

--------------------------------------   update @ 2017-07-19 ---------------------------------------

前文的配置方式,以及如下的配置方式,都无法对sensitivity的配置生效:开机之后sensitivity的值始终为默认的200.

> cat /etc/udev/rules.d/-trackpoint.rules
ACTION=="add", SUBSYSTEM=="input", ATTR{name}=="TPPS/2 IBM TrackPoint", ATTR{device/speed}=""
ACTION=="add", SUBSYSTEM=="input", ATTR{name}=="TPPS/2 IBM TrackPoint", ATTR{device/sensitivity}=""

---------------------------------------  update @ 2018-03-05 -------------------------------------------

既然rules.d不能设置sensitivity, 那么我们就换一招设置sensitivity, 把speed留给rules.d进行设置.

┬─[tong@T7:~]─[:: AM]
╰─>$ cat /etc/udev/rules.d/-trackpoint.rules
ACTION=="add", SUBSYSTEM=="input", ATTR{name}=="TPPS/2 IBM TrackPoint", ATTR{device/speed}=""

使用hwdb设置sensitivity, 参考https://wiki.archlinux.org/index.php/TrackPoint

cp /usr/lib/udev/hwdb.d/-pointingstick.hwdb /etc/udev/hwdb.d/-pointingstick-local.hwdb

修改该文件的中内容如下:

┬─[tong@T7:~]─[:: AM]
╰─>$ tail -n /etc/udev/hwdb.d/-pointingstick-local.hwdb
# Lenovo Thinkpad * series
evdev:name:TPPS/ IBM TrackPoint:dmi:bvn*:bvr*:bd*:svnLENOVO:pn*:pvrThinkPad??:*
evdev:name:TPPS/ IBM TrackPoint:dmi:bvn*:bvr*:bd*:svnLENOVO:pn*:pvrThinkPad???:*
POINTINGSTICK_SENSITIVITY=
POINTINGSTICK_CONST_ACCEL=1.0

然后, 执行命令:

$ systemd-hwdb update

至此, 重启系统, speed和sensitivity就都能成功开机自动设置了.

不过, 我的蓝牙鼠的速度怎么好像也变快了呢? 难道是幻觉???

所幸, 鼠标速率调整起来比较容易. 调到满意就好了.