在mint下总感觉小红点(正式名称:TrackPoint)难用,力量小很慢,稍微用点力就起飞,非常难用。
经过一番折腾发现是libinput的问题。以下是解决方案。
将libinput换成evdev
终端运行xinput
命令,列出当前输入设备,其中注意这一行
TPPS/2 ALPS TrackPoint id=18 [slave pointer (2)]
得到小红点的设备名称"TPPS/2 ALPS TrackPoint"和id=18。运行
xinput --list-props 18
输出这些东西
Device 'TPPS/2 ALPS TrackPoint':
Device Enabled (164): 1
Coordinate Transformation Matrix (166): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Natural Scrolling Enabled (299): 0
libinput Natural Scrolling Enabled Default (300): 0
libinput Scroll Methods Available (301): 0, 0, 1……
可以看到当前系统默认使用libinput来控制小红点。那么就干掉它!
安装xserver-xorg-input-evdev和xserver-xorg-input-synaptics(给触摸板用)包,然后再purge掉xserver-xorg-input-libinput,重启。此时上面那条命令的输出变成这样
Device 'TPPS/2 ALPS TrackPoint':
Device Enabled (164): 1
Coordinate Transformation Matrix (166): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (296): 0
Device Accel Constant Deceleration (297): 1.000000
Device Accel Adaptive Deceleration (298): 1.000000
Device Accel Velocity Scaling (299): 10.000000
Device Product ID (284): 2, 10
Device Node (285): "/dev/input/event11"
Evdev Axis Inversion (300): 0, 0
Evdev Axes Swap (302): 0……
成功使用evdev驱动起了小红点,手感也不像之前那么飘了。
模拟滚轮
libinput默认能够在点击中键时上下移动小红点实现滚动,换成evdev后还需要进行配置。
将这些写入/etc/xprofile或~/.xprofile中:
xinput set-prop "TPPS/2 ALPS TrackPoint" "Evdev Wheel Emulation" 1
xinput set-prop "TPPS/2 ALPS TrackPoint" "Evdev Wheel Emulation Button" 2
xinput set-prop "TPPS/2 ALPS TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5
重新登录搞定。6 7是允许横向滚动,不需要横向滚动的话设成0 0 4 5。
参考资料