Thinkpad x240 imprecise cursor
The cursor on Thinkpad x240 is imprecise. I struggled a bit to find out why and I found that the touchpad size is wrong. The real size is 87x67mm whereas the touchpad size as listed by the kernel is 109x95mm.
$ sudo touchpad-edge-detector 87x67 /dev/input/event4
Touchpad SynPS/2 Synaptics TouchPad on /dev/input/event4
Move one finger around the touchpad to detect the actual edges
Kernel says: x [1232..5710], y [1156..4696]
Touchpad sends: x [1232..5711], y [1159..4700] /
Touchpad sends: x [1232..5711], y [1159..4700] -^C
Touchpad size as listed by the kernel: 109x95mm
User-specified touchpad size: 87x67mm
Calculated ranges: 4479/3541
Suggested udev rule:
# <Laptop model description goes here>
evdev:name:SynPS/2 Synaptics TouchPad:dmi:bvnLENOVO:bvrGIET99WW(2.49):bd03/17/2020:svnLENOVO:pn20ALA007FR:pvrThinkPadX240:rvnLENOVO:rn20ALA007FR:rvrNotDefined:cvnLENOVO:ct10:cvrNotAvailable:*
EVDEV_ABS_00=1232:5711:51
EVDEV_ABS_01=1159:4700:53
EVDEV_ABS_35=1232:5711:51
EVDEV_ABS_36=1159:4700:53
It is much much better with the new rule.
There is a rule that seem to apply to all ??40 but they don't seem to have the same touchpad size. https://github.com/systemd/systemd/blob/master/hwdb.d/60-evdev.hwdb
evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrThinkPad??40:*
evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrThinkPad??40?:*
I can make a PR to systemd if needed but what is the best way to handle this ? Something like that after the ??40 rule maybe to not break the other ??40 ?
# Lenovo 240 series
evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrThinkPad?240:*
evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrThinkPad?240?:*
EVDEV_ABS_00=1232:5711:51
EVDEV_ABS_01=1159:4700:53
EVDEV_ABS_35=1232:5711:51
EVDEV_ABS_36=1159:4700:53