touchpad tunables

pgf at laptop.org pgf at laptop.org
Sat Jan 10 12:29:57 EST 2009


current staging releases (9 and higher, i believe) contain some
new parameters which were added to the mouse driver.  these
settings allow tweaking various timeouts related to touchpad
recalibration.  (i'd appreciate it someone running an 8.2.1
staging candidate could verify these parameters really are present --
i'm running a development kernel.)

by default the timeouts related to various recalibration delays
are quite conservative, leading to a total delay of 3 or 4
seconds while the touchpad autodetects jumpiness, waits before
commencing recalibrating, recalibrates, and waits to be sure no
motion was detected during the recal.  i've been using the
following script on my own XO for several weeks -- it doesn't
keep the touchpad from going bonkers, but when it does, it
recovers quite a bit more quickly.  after choosing these initial
values, i didn't do any more tuning.  if someone would like to
further investigate/improve, i'd welcome the changes.  extra
brownie points if you can get the touchpad to quit needing
recalibration at all!  :-)

i'm not quite sure where/whether/when this should go into a
release, but figured i should at the very least publish it here.

paul

#!/bin/sh

# the available touchpad parameters are as follows.  many do not
# make sense and/or do nothing on the XO:

#    tpdebug:(int)
#    recalib_delta:packets containing a delta this large will
#       cause a recalibration. (int)
#    jumpy_delay:delay (ms) before recal after jumpiness detected (int)
#    spew_delay:delay (ms) before recal after packet spew detected (int)
#    recal_guard_time:interval (ms) during which recal will be
#       restarted if packet received (int)
#    post_interrupt_delay:delay (ms) before recal after recal
#       interrupt detected (int)
#    autorecal:enable recalibration in the driver? (int)
#    proto:Highest protocol extension to probe (bare, imps, exps, any).
#       Useful for KVM switches. (proto_abbrev)
#    resolution:Resolution, in dpi. (uint)
#    rate:Report rate, in reports per second. (uint)
#    smartscroll:Logitech Smartscroll autorepeat, 1 = enabled (default),
#       0 = disabled. (bool)
#    resetafter:Reset device after so many bad packets (0 = never). (uint)
#    resync_time:How long can mouse stay idle before forcing resync
#       (in seconds, 0 = never). (uint)

p=/sys/module/psmouse/parameters

if [ $(whoami) = root ]
then
    echo must be root >&2
    exit 1
fi


( echo Before: ; grep ^ $p/* ) >/tmp/cur_psmouse_params

if [ "$1" = show ]
then
        cat /tmp/cur_psmouse_params
        exit
fi

echo Setting mouse parameters:

# all values in milliseconds

echo 200 >$p/jumpy_delay
echo 200 >$p/spew_delay
echo 400 >$p/recal_guard_time
echo 100 >$p/post_interrupt_delay

( echo After: ; grep ^ $p/* ) | diff /tmp/cur_psmouse_params -

exit

=---------------------
 paul fox, pgf at laptop.org


More information about the Devel mailing list