2003-06-26 21:46:12

by Mike Keehan

[permalink] [raw]
Subject: Synaptics driver on HP6100 and 2.5.73

Hi,

The touchpad is recognised OK when the kernel boots,
and my usb
connected mouse works fine. But I get the following
message in
the syslog when I try to use the mousepad or any of
the buttons :-

... kernel: Synaptics driver lost sync at 1st byte

It worked alright in previous kernels before the
Synaptic driver was
added.

Relevant /var/log/dmesg content:-

drivers/usb/core/usb.c: registered new driver hid
drivers/usb/input/hid-core.c: v2.0:USB HID core
driver
mice: PS/2 mouse device common for all mice
synaptics reset failed
synaptics reset failed
synaptics reset failed
Synaptics Touchpad, model: 1
Firware: 5.8
180 degree mounted touchpad
Sensor: 27
new absolute packet format
Touchpad has extended capability bits
-> four buttons
-> multifinger detection
-> palm detection
input: Synaptics Synaptics TouchPad on isa0060/serio1
serio: i8042 AUX port at 0x60,0x64 irq 12
input: AT Set 2 keyboard on isa0060/serio0
serio: i8042 KBD port at 0x60,0x64 irq 1

and /var/log/XFree86.0.log bits:-

(II) LoadModule: "synaptics"
(II) Loading
/usr/X11R6/lib/modules/input/synaptics_drv.o
(II) Module synaptics: vendor="The XFree86 Project"
compiled for 4.2.0, module version = 1.0.0
Module class: XFree86 XInput Driver
ABI class: XFree86 XInput driver, version 0.3
...
(II) LoadModule: "mouse"
(II) Loading /usr/X11R6/lib/modules/input/mouse_drv.o
(II) Module mouse: vendor="The XFree86 Project"
compiled for 4.2.1.1, module version = 1.0.0
Module class: XFree86 XInput Driver
ABI class: XFree86 XInput driver, version 0.3
(II) LoadModule: "synaptics"
(II) Reloading
/usr/X11R6/lib/modules/input/synaptics_drv.o
...
(II) Initializing built-in extension RENDER
(**) Option "Protocol" "imps/2"
(**) Mouse0: Protocol: "imps/2"
(**) Option "CorePointer"
(**) Mouse0: Core Pointer
(**) Option "Device" "/dev/input/mouse0"
(**) Option "ZAxisMapping" "4 5"
(**) Mouse0: ZAxisMapping: buttons 4 and 5
(**) Mouse0: Buttons: 5
(**) Option "Device" "/dev/input/mouse1"
(EE) xf86OpenSerial: Cannot open device
/dev/input/mouse1
No such device.
Synaptics driver unable to open device
(EE) PreInit failed for input device "Mouse1"
(II) UnloadModule: "synaptics"

Other device names I tries were /dev/input/mice,
/dev/event/event0
and /dev/psaux, but none of them work.

Mike.

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


2003-06-27 21:03:52

by Mike Keehan

[permalink] [raw]
Subject: Re: Synaptics driver on HP6100 and 2.5.73

Some progress.

I added a "%#x" to the printk for the "..driver lost sync.." message,
and got these results logged:-

kernel: Synaptics driver lost sync at 1st byte(0x18)
kernel: Synaptics driver lost sync at 1st byte(0xff)
kernel: Synaptics driver lost sync at 1st byte(0x0)
kernel: Synaptics driver lost sync at 1st byte(0x18)
kernel: Synaptics driver lost sync at 1st byte(0xff)
kernel: Synaptics driver lost sync at 1st byte(0x0)
kernel: Synaptics driver lost sync at 1st byte(0x18)
kernel: Synaptics driver lost sync at 1st byte(0xfe)
kernel: Synaptics driver lost sync at 1st byte(0x0)

Pressing one of the left buttons gives:-
kernel: Synaptics driver lost sync at 1st byte(0x9)
kernel: Synaptics driver lost sync at 1st byte(0x0)
kernel: Synaptics driver lost sync at 1st byte(0x0)

and releasing it:-
kernel: Synaptics driver lost sync at 1st byte(0x8)
kernel: Synaptics driver lost sync at 1st byte(0x0)
kernel: Synaptics driver lost sync at 1st byte(0x0)

while wiping a finger across the pad:-
kernel: Synaptics driver lost sync at 1st byte(0x8)
kernel: Synaptics driver lost sync at 1st byte(0x1)
kernel: Synaptics driver lost sync at 1st byte(0x0)
kernel: Synaptics driver lost sync at 1st byte(0x8)
kernel: Synaptics driver lost sync at 1st byte(0x3)
kernel: Synaptics driver lost sync at 1st byte(0x1)
kernel: Synaptics driver lost sync at 1st byte(0x8)
kernel: Synaptics driver lost sync at 1st byte(0x2)
kernel: Synaptics driver lost sync at 1st byte(0x0)
kernel: Synaptics driver lost sync at 1st byte(0x8)
kernel: Synaptics driver lost sync at 1st byte(0x2)
kernel: Synaptics driver lost sync at 1st byte(0x0)
kernel: Synaptics driver lost sync at 1st byte(0x28)
kernel: Synaptics driver lost sync at 1st byte(0x3)
kernel: Synaptics driver lost sync at 1st byte(0xff)
kernel: Synaptics driver lost sync at 1st byte(0x28)
kernel: Synaptics driver lost sync at 1st byte(0x2)
kernel: Synaptics driver lost sync at 1st byte(0xff)
kernel: Synaptics driver lost sync at 1st byte(0x8)
kernel: Synaptics driver lost sync at 1st byte(0x4)
kernel: Synaptics driver lost sync at 1st byte(0x0)
... (lots more)

It looks like the protocol is three bytes per 'event' and the nibbles
have been swapped in the bytes from this touchpad!

Mike.


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

2003-07-03 22:04:30

by Peter Osterlund

[permalink] [raw]
Subject: Re: Synaptics driver on HP6100 and 2.5.73

Mike Keehan <[email protected]> writes:

> The touchpad is recognised OK when the kernel boots,
> and my usb
> connected mouse works fine. But I get the following
> message in
> the syslog when I try to use the mousepad or any of
> the buttons :-
>
> ... kernel: Synaptics driver lost sync at 1st byte
>
> It worked alright in previous kernels before the
> Synaptic driver was
> added.
>
> Relevant /var/log/dmesg content:-
>
> drivers/usb/core/usb.c: registered new driver hid
> drivers/usb/input/hid-core.c: v2.0:USB HID core
> driver
> mice: PS/2 mouse device common for all mice
> synaptics reset failed
> synaptics reset failed
> synaptics reset failed

The logs from your other mail show that the touchpad is still in
relative mode (using 3 byte packets) instead of absolute mode (using 6
byte packets.) I don't know why this happens, but here are some things
to investigate:

* Does the touchpad work with the synaptics XFree driver and a 2.4
kernel?
* Does the Synaptics aware GPM version work?
(:pserver:[email protected]:/data/cvs)
* Can you add some printks to the synaptics_reset() function to see
why it fails?
* Maybe it helps to remove the call to synaptics_reset() in
query_hardware(). (I know this helped one user that used the user
space XFree driver with a 2.4 kernel.)

> (**) Option "Device" "/dev/input/mouse1"
> (EE) xf86OpenSerial: Cannot open device
> /dev/input/mouse1
> No such device.
> Synaptics driver unable to open device
> (EE) PreInit failed for input device "Mouse1"
> (II) UnloadModule: "synaptics"
>
> Other device names I tries were /dev/input/mice,
> /dev/event/event0
> and /dev/psaux, but none of them work.

You should use /dev/input/eventX, where X is a number that depends on
your hardware configuration. My config looks like this:

Section "InputDevice"
Identifier "TouchPad"
Driver "synaptics"
Option "Device" "/dev/input/event2"
Option "Protocol" "event"
Option "LeftEdge" "1800"
Option "RightEdge" "5400"
Option "TopEdge" "4200"
Option "BottomEdge" "1500"
Option "FingerLow" "25"
Option "FingerHigh" "30"
Option "MaxTapTime" "180"
Option "MaxTapMove" "220"
Option "VertScrollDelta" "100"
Option "HorizScrollDelta" "100"
Option "EdgeMotionSpeed" "40"
Option "MinSpeed" "0.08"
Option "MaxSpeed" "0.10"
Option "AccelFactor" "0.0010"
Option "SHMConfig" "on"
Option "EmulateMidButtonTime" "75"
# Option "UpDownScrolling" "off"
EndSection

--
Peter Osterlund - [email protected]
http://w1.894.telia.com/~u89404340

2003-07-05 22:28:35

by Peter Osterlund

[permalink] [raw]
Subject: Re: Synaptics driver on HP6100 and 2.5.73

Peter Osterlund <[email protected]> writes:

> Mike Keehan <[email protected]> writes:
>
> > The touchpad is recognised OK when the kernel boots,
> > and my usb
> > connected mouse works fine. But I get the following
> > message in
> > the syslog when I try to use the mousepad or any of
> > the buttons :-
> >
> > ... kernel: Synaptics driver lost sync at 1st byte
> >
> > Relevant /var/log/dmesg content:-
> >
> > drivers/usb/core/usb.c: registered new driver hid
> > drivers/usb/input/hid-core.c: v2.0:USB HID core
> > driver
> > mice: PS/2 mouse device common for all mice
> > synaptics reset failed
> > synaptics reset failed
> > synaptics reset failed
>
> The logs from your other mail show that the touchpad is still in
> relative mode (using 3 byte packets) instead of absolute mode (using 6
> byte packets.) I don't know why this happens, but ...

OK, the problem is that the touchpad needs a lot of time to wake up
after a reset command. As we found out in private conversation, 3
seconds is barely enough, so I suggest the following patch to fix the
problem:

--- linux/drivers/input/mouse.resume/psmouse-base.c Sat Jul 5 23:39:14 2003
+++ linux/drivers/input/mouse/psmouse-base.c Sun Jul 6 00:23:17 2003
@@ -201,7 +201,7 @@
psmouse->cmdcnt = receive;

if (command == PSMOUSE_CMD_RESET_BAT)
- timeout = 2000000; /* 2 sec */
+ timeout = 4000000; /* 4 sec */

if (command & 0xff)
if (psmouse_sendbyte(psmouse, command & 0xff))

--
Peter Osterlund - [email protected]
http://w1.894.telia.com/~u89404340