[ltp] Smooth trackpoint acceleration

Guarded Identity linux-thinkpad@linux-thinkpad.org
Mon, 5 Jun 2006 10:16:45 -0500


On Monday 05 June 2006 9:07 am, Richard rn214-at-hermes.cam.ac.uk |
LinuxThinkpad| wrote:
> > I imagine that the Thinkpad community in general has gotten used to using
> > the device with what's available.  I just realized now that it's possible
> > to make this device even more accurate than it is now.  I think
> > exponential or polynomial acceleration is a good start.
>
> I see what you mean - but I think that perhaps you haven't got the most
> out of the existing setup.
>
> Firstly, if you get the kernel >= 2.6.14, you can then set the mouse
> sensitivity to 255. I use:
>
>     echo -n 255 > /sys/devices/platform/i8042/serio0/sensitivity
>     echo -n 100 > /sys/devices/platform/i8042/serio0/speed
>     echo -n 3 > /sys/devices/platform/i8042/serio0/inertia
>
> This provides a very light touch. Secondly, you can then add acceleration
> of about 2x, taking effect after 5 pixels. If you tweak *both* these
> numbers, it will be very nice to use.

Thanks for the tips.  I tried out your settings.  It's a different from what I 
settled on using, but addresses the problem with about the same 
effectiveness.  I still feel like something is missing.

> That said, if you actually do decide to write an exponential acceleration,
> it would be nice to have; especially with ordinary mice! If so, you need
> to patch the X mouse driver, rather than the trackpoint, and I'd suggest
> starting by raising an issue in the xorg bugzilla.

So I took a (slightly) closer look at Steven's trackpoint driver, and noticed 
that it's a very thin wrapper that literally feeds in hardware parameters as 
per the IBM spec 
(http://wwwcssrv.almaden.ibm.com/trackpoint/files/ykt3dext.pdf).  I'm 
beginning to realize that the driver doesn't really do any calculations for 
position or movement... that's done by the hardware, and the driver seems to 
expose all the parameters that the hardware uses.  If I'm reading this right 
(and I really don't have much experience reading kernel drivers), it's mostly 
just writing to the device file the data that's on the bus.  By now there's 
probably some convention for the format of such data, but the driver doesn't 
have any reason to abstract this data into movement data in the three axes 
(at least I didn't find anywhere in the drivers where this is done).  

So it doesn't seem to me that it's facile to calculate for acceleration in the 
kernel driver.  I'm not sure I want to parse through the raw data to figure 
out what's going on.  I don't even know its format.  Perhaps X.org /is/ the 
natural place for an acceleration algorithm because the parsing and 
abstraction has already been done by that point.

If I'm incorrect about anything above, though, please let me know.  My 
understanding of the kernel driver is far from thorough.

-Sukant