Touchpad accel, spirals and xset
james.zaki at gmail.com
Wed Jan 20 19:30:06 EST 2010
With some help from the people at #olpc-devel such as pgf, I was able to
look at where I needed to to test some theories.
Looking at the code in hgpk.c that runs on the xo-1 I'm testing on,
The first thing I suspect most people do while waiting for the gui to become
responsive is try to move the curser. The init of the psmouse module
triggers a calibration.
Perhaps this is already clear to all but for completeness, calibrating the
capacitive display with a finger on the pad is a (the?) cause of
jumpyness/weirdness in control.
To prove, first turn off how the existing module triggers recalibrations (I
will explain the problem with one of them in a moment)
echo 0 > jumpy_delay; echo 0 >spew_delay
Now give your xo a 5-finger-salut. The regular 4-finger-salut is
here<http://wiki.laptop.org/go/Recalibrating_Touchpad>but just before
hitting that final fn key, try rest a finger on the touchpad
(the nose squished a bit also works too). The bigger the touch, the greater
areas are miscalibrated.
(useful link1 <http://www.alps.com/e/csr/value/val_new.html>,
To regain control, just do the regular 4-finger-salut for recalibration.
Without a recalibration, the touchpad rests consistantly miscalibrated
I believe the spew_delay (originally 1ms) is our saviour.
* We have no idea why this particular hardware bug occurs. The touchpad
* will randomly start spewing packets without anything touching the
* pad. This wouldn't necessarily be bad, but it's indicative of a
* severely miscalibrated pad; attempting to use the touchpad while it's
* spewing means the cursor will jump all over the place, and act "drunk".
* The packets that are spewed tend to all have deltas between -2 and 2, and
* the cursor will move around without really going very far. It will
* tend to end up in the same location; if we tally up the changes over
* 100 packets, we end up w/ a final delta of close to 0. This happens
* pretty regularly when the touchpad is spewing, and is pretty hard to
* manually trigger (at least for *my* fingers). So, it makes a perfect
* scheme for detecting spews.
I've not read the spec (at a guess I'd say touchpad self tuning) but the
spew sounds perfect to trigger a recal! So probably not a bug, nor
miscalibrated pad, especially with such stable deltas.
echo 1 > spew_delay
After a moment of not touching, the recalibrate is triggered and the cursor
responds as expected.
I believe that the recalibration after detecting jumpyness (x/y deltas >
discard_threshold) is causing more problems than its solves, since jumpyness
happens when fingers are on/near the touchpad.
One way to reproduce was with a finger in one corner tap the other corner
whilst lifting the first finger. Doing something like this a few times
(basically triggering the recalibrate by imperfect use) will cause the
calibration to occur whilst your fingers are there.
Another (more difficult) way was to have ones index finger touching
normally, but the adjacent middle finger parallel and close to the touch
surface. This also causes deltas greater than discard_threshold, and
triggeres touchpad-recalibration avec fingers.
It is probably that under ideal use with dodgy hardware, this would be a
good thing. But from what I have seen and read, I think the touchpad
firmware should not be assumed to need too many hacks.
So i'm not sure if spew or jumpyness came first, but with no jumpy_delay
(ie. bypass jumpyness recalibration) and default spew_delay of 1, I dont
have any "weirdness" with the touchpad.
Tomorrow I'll take a look at the xset commands and such, but for now I hope
2010/1/20 Martin Langhoff <martin.langhoff at gmail.com>
> On Wed, Jan 20, 2010 at 6:29 PM, James Zaki <james.zaki at gmail.com> wrote:
> > I've just setup my xo-1 with os11 and updated to near-latest (within a
> > off the top of my head) kernel + kernel-firmware.
> > I'd like to do some touchpad testing if its of any help, but will need do
> > bit of a mental download to understand the pieces at play here.
> Cool -- welcome to the fray! See the thread about testing 802B1, and
> the suggested "spirals" test.
> You will want to declare which touchpad hardware you have (see thread
> above), and do some comparative testing between the 802B1 build and
> Additionally, you may want to test, on os11, whether tuning the tp
> acceleration makes it better or worse.
> To tweak acceleration, open Terminal.xo and try the following settings
> xset m 7/4 0 # this is what we ship now on 802 images
> xset m 165/100 0 # this should be a tad slower
> xset m 7/4 N # (where N is a number between 1 and 7)
> martin.langhoff at gmail.com
> martin at laptop.org -- School Server Architect
> - ask interesting questions
> - don't get distracted with shiny stuff - working code first
> - http://wiki.laptop.org/go/User:Martinlanghoff
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Devel