[Gpm] Synaptics touchpad

Doug Walker dwalker@efortress.com
Tue, 24 Oct 2000 14:30:14 -0600


The synps2 module contained in GPM is for a synaptics touch pad
attached to the PC via a PS/2 style auxiliary port.  The module also
supports a synaptics touch pad attached to the serial port.  It even
supports a configuration file which can be loaded at runtime.

One of the things we did to help reduce the 'jumpy mouse problem' was
to add the following smoothing logic inside the mouse handler (gpm & kernel 
driver):

    Once a packet has been received from the touch pad
         (3 bytes in relative mode, 6 in absolute mode)
      - Decode packets and assemble mouse position (details deleted)
      - Once the dx & dy have been calculated:

           /*   smooth out dx & dy if below threshold */
           if( dx < |2|)    dx /= 2;
           if( dy < |2|)    dy /= 2;

      - Assemble PS/2 style packet in kernel driver
                  or
        Assemble GPM_Event structure in GPM.

Given the way that the Synaptics module is setup in GPM, it shouldn't be
too big a deal to add a threshold to the synaptics configuration file to 
configure
the threshold value.  Something like:

/* jitter 'jumpy mouse' threshold  */
[jitter_threshold]                   2


 From the kernel driver stand point.  The pc_keyb.c driver is not a kludge.
It's just directed towards a generic PS/2 style mouse running in relative
mode.  For the project referenced by Dr. Shub, I had to patch pc_keyb.c
to allow an alternative mouse driver to be used instead of the default
driver in pc_keyb.c (haven't submitted the diffs to Alan Cox yet, however).
Assuming you wish to write a kernel driver, you'll want my pc_keyb.c mods
and most definitely the documentation from Synaptic's site.

The Synaptics website has a wealth of information on how to interface
to the touch pad.  http://www.synaptics.com/prod-touchpad.cfm
Synaptics provides detailed information on how the touch pad operates,
including detailed descriptions of mouse packet contents.  They have
gone out of their way to provide clear, accurate, and complete documentation
of their product (as opposed to the makers of the VersaPad touch pad).


Hope this helps.


Doug Walker


At 12:41 PM 10/24/00 -0600, Charlie Shub wrote:
>Funny you should ask....  We are in mid project here in looking at
>some mouse issues, albeit with a versatech versapad rather than a
>synaptics touchpad.  We have attempted to add some functionality to
>the versapad (viz the ability to turn of the "tap implies button press"
>misfeature) and have done that both with modifying GPM and with modifying
>the kernel.
>
>one of the things we've observed is that we can add in "unjumpy" fixes
>to either gpm or the kernel. the most fruitful approach for us seemed
>to be to scale moves of a distance smaller than a threshhold.
>
> > From: Chris Collins <cmcollin@polymail.cpunix.calpoly.edu>
> > To: hdavies@ameritech.net, gpm@prosa.it
> > Date: Tue, 24 Oct 2000 10:24:14 PDT
> > Subject: [Gpm] Synaptics touchpad
> >
> > Hello,
> >
> >
> > I have a Compaq Presario 1685 laptop with a
> > synaptics touchpad.  I have been through a steep
> > learning curve with regards to this piece of cr**,
> > I mean piece of equipment.
> >
> > What does the latest gpm synps2 do to work with the famous
> > linux kernel synaptics 'jumpy mouse problem'.
> >
> > Does the poorly-functioning compiled kernel driver
> > for this mouse get overridden somehow with GPM?
> >
> > I have written one user who claims that using GPM
> > makes all perfect.   I have been trying to ping
> > the linux kernel writers to look at this.  The kernel
> > solution seems like a large task.
> >
> > I really don't get the details.  Something about 6-bit
> > scancodes vs 4-bit, and error handling should be removed
> > from the kernel and it currently resides compiled in.
> > The pc_keyb.c patch for the linux kernel is a kludge.
> >
> >
> > What does GPM do?  I havn't used it.  I have XDM running and
> > typically go straight for X, I thought GPM was only for
> > consoles, but now I have heard otherwise, and am investigating
> > weather this is a solution to my poorly functioning synaptics
> > touchpad.
> >
> >
> > --Chris
> >
> > __
> > Gpm mailing list at Gpm@lists.prosa.it
> > Send help as subject to gpm-request@lists.prosa.it for help
> > Archives at http://www.prosa.it/mailman/gpm
> >
>
>
>
>          charlie shub   University of Colorado at Colorado Springs
>cdash@cs.uccs.edu  -or-  cdash@mail.uccs.edu  -or-  cdash@ludell.uccs.edu
>(719) 262-3492        (fax) 262-3369            http://cs.uccs.edu/~cdash