Fixing rectangular touchpad with square coordinates

Finally I gave in to the netbook trend and got a Lenovo S10-2. I couldn’t get a linux version, but sure enough Debian was running on it few hours after unpacking.

There was one problem however, the touchpad is rectangular but apparently return square coordinates. That translates into a very fast vertical motion and a slow horizontal motion which makes the navigation quite painful.

Quickly found a fix (thanks google) but took it as an opportunity to play with the Debian package system.

Here is how to fix this neatly. First, get the source for the package:

apt-get source xserver-xorg-input-synaptics

In the folder xfree86-driver-synaptics-0.14.7~git20070706/debian/patches, add the file 06-lenovo-trackpad.patch, which should contains:

diff --git a/synaptics.c b/synaptics.c
index 802132c..5f7ba6d 100644
--- a/synaptics.c
+++ b/synaptics.c
@@ -867,6 +869,7 @@
     while (SynapticsGetHwState(local, priv, &hw)) {
        hw.millis = GetTimeInMillis();
+       hw.y *= 0.60;//FIXME for lenovo S10
        priv->hwState = hw;
        delay = HandleState(local, &hw);
        newDelay = TRUE;

Add the reference to 06-lenovo-trackpad.patch into the file series.

Return to the xfree86-driver-synaptics-0.14.7~git20070706 folder and run

debuild -uc -us

Once the package is created, just install it with dpkg -i. You have to lock the version of the package to prevent the update while the bug is not fixed.

Sure there are some steps which can be improved, let me know.

Leave a Reply

Your email address will not be published. Required fields are marked *