Two-finger scrolling with Ubuntu 9.10 (Samsung NC10)

Is it possible to configure Ubuntu 9.10 to use two-finger scrolling on a Samsung NC10 netbook? I tried to configure it, but I had no success.


Solution 1:

Most of the snippets online fail to explain the how and only state the why. Here's what you need to know about the synaptics driver:

  1. The driver detects pressure, width of the touch zone, and number of fingers.
  2. Not all devices, however, clearly state that there multiple fingers on the touchpad. Sometimes, they either claim an extremely high pressure or unusually wide touch zone.
  3. Synaptics is a wonderful driver and can deal with those misbehaving devices.

In particular, the command synclient -m 0 will start a very useful tool that lists realtime output of the driver (you're going to need SHMConfig defined in one way or another for this to work). The output would look like this:

 time     x    y   z f  w  l r u d m     multi  gl gm gr gdx gdy
0.000     1 5855   0 0  0  0 0 0 0 0  00000000   0  0  0   0   0
1.465  2562 2450  10 1  5  0 0 0 0 0  00000000   0  0  0   0   0

You're interested in the z (pressure), f (number of fingers), and w (width of touch zone) columns.

Play with the touchpad a bit to figure out how (if at all) it represents multiple fingers. In my case, I get higher than usual W values (>7 for multiple fingers).

Now, luckily, the synaptics devs are smart people and have included the directives EmulateTwoFingerMinW and EmulateTwoFingerMinZ which should be self-explanatory - one treats all touches with W greater than a certain value as two fingers while the other does the same for the Z value.

Adding one of these to the hal policy, however, will not fix things. The GNOME devs, in their infinite wisdom, decided that gnome-settings-daemon should rewrite all touchpad settings. Therefore, I resorted to having a script full of synclient commands run as part of the GNOME session (I added it to Preferences->Startup Applications).

Below is part of my script to help you start. Save it anywhere, add +x to the permissions and add it to your session. You might have to rerun it after a suspend or hibernate.

#!/bin/bash
export DISPLAY=:0.0

synclient EmulateTwoFingerMinZ=0
synclient EmulateTwoFingerMinW=6
synclient VertTwoFingerScroll=1
synclient HorizTwoFingerScroll=1
synclient VertScrollDelta=75
synclient HorizScrollDelta=100

In conclusion, learn synclient (through man synaptics) and ignore outdated advice on the Internet.

Good luck!