Thinkpad Trackpoint sensitivity on Ubuntu

A while back I found some notes on configuring the sensitivity of my trackpoint on my Thinkpad T43 and took the time to tweak the values to get it just right. The commands were

    /bin/echo -n 171 > /sys/devices/platform/i8042/serio1/serio2/sensitivity /bin/echo -n 119 > /sys/devices/platform/i8042/serio1/serio2/speed

In order to keep those values the same on reboot, I placed those commands in /etc/rc.local. I rebooted and… values got reset. After struggling a bit and just giving up on the issue, I ended up just making a shell script that I would execute on boot each time (crappy solution). Finally I got annoyed with the issue enough and researched it again some more and stumbled uponthis post on Ubuntu Forums. A couple of things I learned from that…

  1. The proper ways to set the values in the sysfs is to use udev rules, Writing udev rules
  2. Even if I used a udev rule, there appears to be an issue where the device does not exist yet at the time the rule is processed to set the value for the device

Solution (per forum post) create a file /etc/udev/rules.d/trackpoint.rules and place the following in

SUBSYSTEM=="serio", DRIVERS=="psmouse", ATTR{description}=="Synaptics pass-through", WAIT_FOR="/sys/devices/platform/i8042/serio1/serio2/sensitivity" ATTR{sensitivity}="171", ATTR{speed}="119"