[gpm]New Synaptic patch

Troy Schultz tschultz@canada.com
09 Apr 2002 08:14:29 -0400


On Sun, 2002-04-07 at 16:27, Peter Berg Larsen wrote:
> 
> 
> Hey,
> 
> This patch is a test to take care of some problems:
> 
> I have added edge definition options to the config file.
> 
> I have added some 4-way button code. Turn off stick_enable and turn on
> four_way_button_enable. (Until I get a better way of descriminating 
> the packets.)  
The 4-way key mostly works, here is what I got on my Compaq Presario
2710;

Direction	Data(from driver)	event (in xev)
UP		80 00 00 C0 01 00	Button 4
RIGHT		80 00 00 C2 00 02	nothing
DOWN		80 00 00 C2 00 01	Button 5
LEFT		80 00 00 C2 02 00	Button 2


> 
> I have added an option to reset the synaptics (reset_on_error_enabled) if
> a faulty packet is detected. This should be default off, because it is
> better to detect the reset ack from the touchpad in gpm.c or finding out
> why the touchpad changes mode in the first place.
> 
> I have added a new corner action: reset. This is intended as testing. My
> touchpad sometimes sends reset ack and id code after a disable stream
> command, and I do not understand at all why. Could someone test whether
> their touchpad also do that?
I am not sure if it is the same, but when testing things I did get this
logged to /var/log/messages when I tried to restart gpm.
"Invalid ACK to synps2 send byte E6, got 18"

> 
> And finally some cleaning of the code.
I am not sure since I haven't had time to see what is going on but the
new patch broke my startup script.  My script starts gpm using
"daemon gpm -Rimps2 -t synps2 -m /dev/mouse" and it appears to work the
first time according to /var/log/messages, but when finished there is no
process running.  When I try to restart the gpm service I get an error
that it is already running with a PID and will not restart.

It seems that the code cleanup makes use of a built-in lockout mechanism
where gpm keeps the PID of the last running version, and then using "gpm
-k" it kills that one and remove the stored PID.  This process I was
doing with a lockout file "/var/lock/subsys/gpm" which was maintained my
my script, start,stop, and restart were supported by the script.

I looked quickly and could change my script to use the built-in gpm
control mechanism but I can not get gpm started with my script, the
process seems to dissapear when the script is done.

For now I have reverted back to your patch level 3 so things work with
my scripts.  The new change also looks like it only works when the
synaptics protocol is used, so testing with just ps/2 would require a
different lockout mechanism in the startup script.
> 
> 
> Peter


When I get a chance I will take a closer look at things and try to get
the lockout mechanism working.

Best Regards