2004-06-22 07:53:32

by Marc Waeckerlin

[permalink] [raw]
Subject: Continue: psmouse.c - synaptics touchpad driver sync problem

In May there was a posting Thorsten Hirsch and a patch reply by Dmitry
Torokhov that did not help Thorsten.

I have exactely the same problem, and other people too. There's a thread on
this topic with a more detailed problem description at:
http://www.linuxquestions.org/questions/showthread.php?s=&postid=1004645#post1004645

The problem was pested regarding to Kernel 2.6.6, but an upgrade to Kernel
2.6.7 did not help me. My problem is even much worse:
- The touchpad sometimes hangs and jumps.
- Hitting on the touchpad does no more click the first button.
- When I connect an external keyboard, the cursor somtimes jumps
around like crazy and clicks around like fool, even if I don't
click anything, but only move. When I then touch the keyboard,
the mouse becomes normal for a while - on SuSE kernel 2.6.5,
since. Since upgrade to kernel 2.6.7, does not become normal
any more.
- Sometimes the keyboard fails too, that means the without touching
any key, a character is continually written, e.g. hundreds of "5"
appear on the xterm. If i hit a key, a completely other character
is printed, but not once but endlessly repeated.
- Killing and restarting the X Server does not resolve the problem,
reboot is the only thing that works!

It's really bad, I can't work anymore since I upgraded to SuSE 9.1 and kernel
2.6...

Kernel messages:

A lot of during use of touch pad:
- psmouse.c: TouchPad at isa0060/serio2/input0 lost sync at byte 1
- psmouse.c: TouchPad at isa0060/serio2/input0 lost sync at byte 4

When using the external mouse and the mouse jumps around (repeated 2-3 times):
- atkbd.c: Spurious ACK on isa0060/serio0. Some program like XFree86, might be
trying access hardware directly
- psmoouse.c: bad data from KBC - timeout


I'm not subscribed to the kernel mailing list due to the heavy traffic. Please
CC me in your reply (marc dot waeckerlin at siemens dot com). Thank's.

Regards
Marc Wäckerlin
marc.waeckerlin.org


2004-06-22 13:07:52

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: Continue: psmouse.c - synaptics touchpad driver sync problem

On Tuesday 22 June 2004 02:52 am, Marc Waeckerlin wrote:
> In May there was a posting Thorsten Hirsch and a patch reply by Dmitry
> Torokhov that did not help Thorsten.
>
> I have exactely the same problem, and other people too. There's a thread on
> this topic with a more detailed problem description at:
> http://www.linuxquestions.org/questions/showthread.php?s=&postid=1004645#post1004645
>
> The problem was pested regarding to Kernel 2.6.6, but an upgrade to Kernel
> 2.6.7 did not help me. My problem is even much worse:
> - The touchpad sometimes hangs and jumps.
> - Hitting on the touchpad does no more click the first button.
> - When I connect an external keyboard, the cursor somtimes jumps
> around like crazy and clicks around like fool, even if I don't
> click anything, but only move. When I then touch the keyboard,
> the mouse becomes normal for a while - on SuSE kernel 2.6.5,
> since. Since upgrade to kernel 2.6.7, does not become normal
> any more.

Here your touchpad can be rest back to relative mode. Does passing
psmouse.resetafter=3 to the kernel helps things a bit?

--
Dmitry

2004-06-23 09:37:16

by Marc Waeckerlin

[permalink] [raw]
Subject: Re: Continue: psmouse.c - synaptics touchpad driver sync problem

I CC this mail to laflipas and t.hirsch because they have the same problem.

Am Dienstag, 22. Juni 2004 16.18 schrieben Sie unter "RE: Touchpad on Kernel
Mailinglist: Question":
> Marc Waeckerlin wrote:

> > > Here your touchpad can be rest back to relative mode.
> > How?
> What I meant is that act of plugging in your keyboard may cause
> the touchpad revert back in relative mode and we _do not_ want
> this happening. Hence the option psmouse.resetafter to try to
> re-initialize the touchpad after so many bad packets.

> > > Does passing psmouse.resetafter=3 to the kernel helps things a bit?
> >
> > Do you mean as boot-prompt parameter to GRUB/LILO?
>
> If your psmouse module is compiled it then use "psmouse.resetafter=3"
> as a boot parameter. If psmouse is a module then put
> "options psmouse resetafer=3" in your /etc/modprobe.conf

I am sorry, both options do not help at all - well, perhaps the jumping of the
cursor when using the touchpad without external keyboard/mouse disconnected
may be slightly better. But as soon as I plug in the external keyboard, the
old problem occurs.

Also I have a problem not yet mentioned, but it happened again this morning:
Sometimes - without external keyboard/mouse, only using touchpad and internal
keyboard -, sometimes the keyboard does not work anymore. If I hit any
arbitrary key, nothing happens anymore. The mouse still works with the
touchpad. Since I am often mobile, I can't acces the notebook through LAN and
sice keynoard does not work anymore, I cant hit ctrl-alt-f1 or so to switch
to a terminal or to watch the syslog on ctrl-alt-f10. The only thing I can do
is to reboot using the mouse only.


> You know, could you send me your dmesg so I get a feeling of your
> laptop. What make/model is that?

It's a Pentium III, SIS-Chipset noname (the only notebook I could buy without
Microsoft tax), as you can see in the attached dmesg.

I have my notebook for 2 1/2 years now and I never had similar problem with
the previous 2.4.x kernels. Also there are other people with the same
problem, so I think it's no hardware defect.


> Also, if you don't use any external
> devices do you still have touchpad troubles?

Doesn't help.


> Do they go away if you
> boot with acpi=off boot parameter?

No, that's one of the first things I tried. SuSE sets up a "Failsafe" boot
parameter, that disables ACPI, APM, ISE-SCSI and other things. But it still
does not work.


> I wish I could provide you with a canned solution, there just too
> many unknowns.

There are other with the same problem, e.g. Thorsten on the kernel mailing
list in Mai and the one on the link I posted in my first mail. Also, there's
another similar thread in linuxquetions.org:
http://www.linuxquestions.org/questions/showthread.php?s=&threadid=182363&highlight=mouse+jumps+around
Do a search on Google to find more victims (possible keywords: "mouse jumps
linux" or the syslog messages). Here's one reporting the same in spanish:
http://lists.debian.org/debian-user-spanish/2004/02/msg00127.html


Is there any alternative driver I could try? How is synaptics related to a
PS/2 mouse and can it be disabled? Can I do something in the kernel
configuration (please describe the xconfig menu path)?

Can I assist you somehow? I am an experienced C++ programmer, but I have never
done kernel development or debugging.

If you send me a patch, if possible diff it against 2.6.7, that's my actual
kernel.


Thank you
Regards
Marc


Attachments:
(No filename) (3.40 kB)
dmesg (14.32 kB)
Download all attachments

2004-06-23 16:00:55

by Dmitry Torokhov

[permalink] [raw]
Subject: RE: Continue: psmouse.c - synaptics touchpad driver sync problem

Marc Waeckerlin wrote:
> >
> > If your psmouse module is compiled it then use "psmouse.resetafter=3"
> > as a boot parameter. If psmouse is a module then put
> > "options psmouse resetafer=3" in your /etc/modprobe.conf
>
> I am sorry, both options do not help at all - well, perhaps the jumping of
> the
> cursor when using the touchpad without external keyboard/mouse
> disconnected
> may be slightly better. But as soon as I plug in the external keyboard,
> the
> old problem occurs.
>

Hmm... OK, I see that you have an active multiplexing controller.
I wonder if it gets reset back to legacy mode when you plug your
external keyboard. (btw, it it just a keyboard or a docking station/
port replicator?). Try passing i8042.nomux to the kernel and try using
your touchpad/keyboard. If nomux does not help you may try to use
psmouse.proto=bare or psmouse.proto=imps to disable Synaptics-specific
extensions.

Also, if you have time, please change #undef DEBUG to #define DEBUG in
drivers/input/serio/i8042.c, reboot, play a bit with touchpad; plug
external keyboard and send me output of "dmesg -s 100000".

> Also I have a problem not yet mentioned, but it happened again this
> morning:
> Sometimes - without external keyboard/mouse, only using touchpad and
> internal
> keyboard -, sometimes the keyboard does not work anymore. If I hit any
> arbitrary key, nothing happens anymore. The mouse still works with the
> touchpad. Since I am often mobile, I can't acces the notebook through LAN
> and
> sice keynoard does not work anymore, I cant hit ctrl-alt-f1 or so to
> switch
> to a terminal or to watch the syslog on ctrl-alt-f10. The only thing I can
> do
> is to reboot using the mouse only.
>

Ok, we were getting reports about this happening with Toshibas, no
resolution yet...

--
Dmitry

2004-06-24 09:35:48

by Marc Waeckerlin

[permalink] [raw]
Subject: Re: Continue: psmouse.c - synaptics touchpad driver sync problem

Am Mittwoch, 23. Juni 2004 17.59 schrieb Dmitry Torokhov unter "RE: Continue:
psmouse.c - synaptics touchpad driver sync problem":
> Try passing i8042.nomux to the kernel and try using your touchpad/keyboard.

External mouse does not move anymore. External keyboard still works, so that's
not the solution...

Well, I can do a long-run test with the internal touchpad/keyboard only, to
see if at least this works now better. "Unfortunately" the problems with
internal keyboard/touchpad are less frequent and less reproducible.


> If nomux does not help you may try to use
> psmouse.proto=bare

No, does not help. :-(


> or psmouse.proto=imps to disable Synaptics-specific
> extensions.

Well, IMPS seems to be completely incompatible to normal PS/2, so as expected
things get worse, means now the internal mouse jumps around like crazy.

Please note, that one of the external mice, the one I am actually testing, is
not a scroll mouse, but a normal PS/2 mouse.

Regards
Marc

2004-06-24 15:21:15

by Marc Waeckerlin

[permalink] [raw]
Subject: Re: Continue: psmouse.c - synaptics touchpad driver sync problem

Am Mittwoch, 23. Juni 2004 17.59 schrieb Dmitry Torokhov unter "RE: Continue:
psmouse.c - synaptics touchpad driver sync problem":
> Also, if you have time, please change #undef DEBUG to #define DEBUG in
> drivers/input/serio/i8042.c, reboot, play a bit with touchpad; plug
> external keyboard and send me output of "dmesg -s 100000".

dmesg looks like this, even with a log_buf_len=131072 boot-parameter, there's
nothiung else left. These are the interesting parts:

[dmesg starts here, this is first line]
erio/i8042.c: 80 <- i8042 (interrupt, aux1, 12) [158589]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158592]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158593]
drivers/input/serio/i8042.c: c0 <- i8042 (interrupt, aux1, 12) [158595]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158596]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158598]
drivers/input/serio/i8042.c: 80 <- i8042 (interrupt, aux1, 12) [158602]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158603]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158605]
drivers/input/serio/i8042.c: c0 <- i8042 (interrupt, aux1, 12) [158606]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158608]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158609]
drivers/input/serio/i8042.c: 80 <- i8042 (interrupt, aux1, 12) [158614]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158617]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158619]
drivers/input/serio/i8042.c: c0 <- i8042 (interrupt, aux1, 12) [158622]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158623]
[...]
drivers/input/serio/i8042.c: c0 <- i8042 (interrupt, aux1, 12) [158974]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158977]
psmouse.c: TouchPad at isa0060/serio2/input0 lost sync at byte 4
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158978]
psmouse.c: TouchPad at isa0060/serio2/input0 lost sync at byte 1
drivers/input/serio/i8042.c: 80 <- i8042 (interrupt, aux1, 12) [158980]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158981]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158983]
drivers/input/serio/i8042.c: c0 <- i8042 (interrupt, aux1, 12) [158985]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158987]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158988]
psmouse.c: TouchPad at isa0060/serio2/input0 - driver resynched.
drivers/input/serio/i8042.c: 80 <- i8042 (interrupt, aux1, 12) [158990]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158991]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158993]
[...]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [159396]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [159398]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, kbd, 1) [162523]
atkbd.c: Spurious ACK on isa0060/serio0. Some program, like XFree86, might be
trying access hardware directly.
drivers/input/serio/i8042.c: aa <- i8042 (interrupt, aux3, 12) [162765]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux3, 12) [162765]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162765]
drivers/input/serio/i8042.c: f2 -> i8042 (parameter) [162765]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162769]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux3, 12) [162771]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162771]
drivers/input/serio/i8042.c: f2 -> i8042 (parameter) [162771]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162774]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux3, 12) [162776]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162776]
drivers/input/serio/i8042.c: f6 -> i8042 (parameter) [162776]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162779]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162779]
drivers/input/serio/i8042.c: e8 -> i8042 (parameter) [162779]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162782]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162782]
drivers/input/serio/i8042.c: 00 -> i8042 (parameter) [162782]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162785]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162785]
drivers/input/serio/i8042.c: e8 -> i8042 (parameter) [162785]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162788]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162788]
drivers/input/serio/i8042.c: 00 -> i8042 (parameter) [162788]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162791]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162791]
drivers/input/serio/i8042.c: e8 -> i8042 (parameter) [162791]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162794]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162794]
drivers/input/serio/i8042.c: 00 -> i8042 (parameter) [162794]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162797]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162797]
drivers/input/serio/i8042.c: e8 -> i8042 (parameter) [162797]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162800]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162800]
drivers/input/serio/i8042.c: 00 -> i8042 (parameter) [162800]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162804]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162804]
drivers/input/serio/i8042.c: e9 -> i8042 (parameter) [162804]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162807]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux3, 12) [162809]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux3, 12) [162810]
drivers/input/serio/i8042.c: 64 <- i8042 (interrupt, aux3, 12) [162812]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162812]
drivers/input/serio/i8042.c: e8 -> i8042 (parameter) [162812]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162816]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162816]
drivers/input/serio/i8042.c: 03 -> i8042 (parameter) [162816]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162819]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162819]
drivers/input/serio/i8042.c: e6 -> i8042 (parameter) [162819]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162822]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162822]
drivers/input/serio/i8042.c: e6 -> i8042 (parameter) [162822]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162825]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162825]
drivers/input/serio/i8042.c: e6 -> i8042 (parameter) [162825]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162828]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162828]
drivers/input/serio/i8042.c: e9 -> i8042 (parameter) [162828]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162831]
drivers/input/serio/i8042.c: b1 <- i8042 (interrupt, aux3, 12) [162833]
drivers/input/serio/i8042.c: 03 <- i8042 (interrupt, aux3, 12) [162835]
drivers/input/serio/i8042.c: c8 <- i8042 (interrupt, aux3, 12) [162839]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162839]
drivers/input/serio/i8042.c: e8 -> i8042 (parameter) [162839]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162842]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162842]
drivers/input/serio/i8042.c: 00 -> i8042 (parameter) [162842]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162845]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162845]
drivers/input/serio/i8042.c: e6 -> i8042 (parameter) [162845]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162848]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162848]
drivers/input/serio/i8042.c: e6 -> i8042 (parameter) [162848]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162851]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162851]
drivers/input/serio/i8042.c: e6 -> i8042 (parameter) [162851]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162854]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162854]
drivers/input/serio/i8042.c: e9 -> i8042 (parameter) [162854]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162857]
drivers/input/serio/i8042.c: b1 <- i8042 (interrupt, aux3, 12) [162859]
drivers/input/serio/i8042.c: 03 <- i8042 (interrupt, aux3, 12) [162861]
drivers/input/serio/i8042.c: c8 <- i8042 (interrupt, aux3, 12) [162863]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162863]
drivers/input/serio/i8042.c: f3 -> i8042 (parameter) [162863]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162866]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162866]
drivers/input/serio/i8042.c: c8 -> i8042 (parameter) [162866]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162869]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162869]
drivers/input/serio/i8042.c: f3 -> i8042 (parameter) [162869]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162872]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162872]
drivers/input/serio/i8042.c: c8 -> i8042 (parameter) [162872]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162875]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162875]
drivers/input/serio/i8042.c: f3 -> i8042 (parameter) [162875]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162878]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162878]
drivers/input/serio/i8042.c: 50 -> i8042 (parameter) [162878]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162881]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162881]
drivers/input/serio/i8042.c: f2 -> i8042 (parameter) [162881]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162885]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux3, 12) [162887]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162887]
drivers/input/serio/i8042.c: f3 -> i8042 (parameter) [162887]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162890]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162890]
drivers/input/serio/i8042.c: c8 -> i8042 (parameter) [162890]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162893]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162893]
drivers/input/serio/i8042.c: f3 -> i8042 (parameter) [162893]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162896]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162896]
drivers/input/serio/i8042.c: 64 -> i8042 (parameter) [162896]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162899]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162899]
drivers/input/serio/i8042.c: f3 -> i8042 (parameter) [162899]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162902]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162902]
drivers/input/serio/i8042.c: 50 -> i8042 (parameter) [162902]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162905]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [162905]
drivers/input/serio/i8042.c: f2 -> i8042 (parameter) [162905]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [162908]
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux3, 12) [162910]
input: PS/2 Logitech Mouse on isa0060/serio4
drivers/input/serio/i8042.c: 93 -> i8042 (command) [163005]
drivers/input/serio/i8042.c: f3 -> i8042 (parameter) [163005]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [163008]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [163008]
drivers/input/serio/i8042.c: 64 -> i8042 (parameter) [163008]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [163011]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [163011]
drivers/input/serio/i8042.c: e8 -> i8042 (parameter) [163011]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [163015]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [163015]
drivers/input/serio/i8042.c: 03 -> i8042 (parameter) [163015]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [163018]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [163018]
drivers/input/serio/i8042.c: e6 -> i8042 (parameter) [163018]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [163021]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [163021]
drivers/input/serio/i8042.c: ea -> i8042 (parameter) [163021]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [163024]
drivers/input/serio/i8042.c: 93 -> i8042 (command) [163024]
drivers/input/serio/i8042.c: f4 -> i8042 (parameter) [163024]
drivers/input/serio/i8042.c: fa <- i8042 (interrupt, aux3, 12) [163027]
drivers/input/serio/i8042.c: 08 <- i8042 (interrupt, aux3, 12) [165329]
drivers/input/serio/i8042.c: 01 <- i8042 (interrupt, aux3, 12) [165331]
drivers/input/serio/i8042.c: 03 <- i8042 (interrupt, aux3, 12) [165332]
drivers/input/serio/i8042.c: 08 <- i8042 (interrupt, aux3, 12) [165342]
[...]
drivers/input/serio/i8042.c: 88 <- i8042 (interrupt, kbd, 1) [205896]
drivers/input/serio/i8042.c: aa <- i8042 (interrupt, kbd, 1) [205921]
drivers/input/serio/i8042.c: 32 <- i8042 (interrupt, kbd, 1) [206158]
drivers/input/serio/i8042.c: b2 <- i8042 (interrupt, kbd, 1) [206238]
drivers/input/serio/i8042.c: 31 <- i8042 (interrupt, kbd, 1) [206335]
drivers/input/serio/i8042.c: b1 <- i8042 (interrupt, kbd, 1) [206380]
drivers/input/serio/i8042.c: 14 <- i8042 (interrupt, kbd, 1) [206415]
drivers/input/serio/i8042.c: 94 <- i8042 (interrupt, kbd, 1) [206462]
drivers/input/serio/i8042.c: 2a <- i8042 (interrupt, kbd, 1) [206672]
drivers/input/serio/i8042.c: 08 <- i8042 (interrupt, kbd, 1) [206794]
drivers/input/serio/i8042.c: 88 <- i8042 (interrupt, kbd, 1) [206839]
drivers/input/serio/i8042.c: aa <- i8042 (interrupt, kbd, 1) [206892]
drivers/input/serio/i8042.c: 20 <- i8042 (interrupt, kbd, 1) [207131]
drivers/input/serio/i8042.c: a0 <- i8042 (interrupt, kbd, 1) [207196]
drivers/input/serio/i8042.c: 32 <- i8042 (interrupt, kbd, 1) [207317]
[...]
drivers/input/serio/i8042.c: a2 <- i8042 (interrupt, kbd, 1) [207951]
drivers/input/serio/i8042.c: 1c <- i8042 (interrupt, kbd, 1) [209407]
drivers/input/serio/i8042.c: 9c <- i8042 (interrupt, kbd, 1) [209458]
[end of dmesg, that was last line]

All the other lines look similar to:
drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158654]

There is no more left from the boot process. That means, the trace is so
frequent, that it overflows long before I can get the dmesg. I also tried
with 33554432 Bytes, but there seem to be a size limit?

I don't think it makes sense to attach the full trace (>100kB), I don't want
to send too large messages, what do you think?


Please tell me if you have any idea how to proceed.


Regards
Marc

2004-06-24 16:11:15

by Dmitry Torokhov

[permalink] [raw]
Subject: RE: Continue: psmouse.c - synaptics touchpad driver sync problem

> Am Mittwoch, 23. Juni 2004 17.59 schrieb Dmitry Torokhov unter "RE:
> Continue:
> psmouse.c - synaptics touchpad driver sync problem":
> > Also, if you have time, please change #undef DEBUG to #define DEBUG in
> > drivers/input/serio/i8042.c, reboot, play a bit with touchpad; plug
> > external keyboard and send me output of "dmesg -s 100000".
>
> dmesg looks like this, even with a log_buf_len=131072 boot-parameter,
> there's
> nothiung else left. These are the interesting parts:
>
> [dmesg starts here, this is first line]
> erio/i8042.c: 80 <- i8042 (interrupt, aux1, 12) [158589]
<skip>

> All the other lines look similar to:
> drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [158654]
>
> There is no more left from the boot process. That means, the trace is so
> frequent, that it overflows long before I can get the dmesg. I also tried
> with 33554432 Bytes, but there seem to be a size limit?
>
> I don't think it makes sense to attach the full trace (>100kB), I don't
> want
> to send too large messages, what do you think?

You still need to use "dmesg -s 100000" even if you specifie logbuf_len.
Anyway, the data probably goes into /var/log/messages as well... If it is
there please send it my way (not on the list). I should be able to handle
100K e-mail.

Thanks,

Dmitry

2004-06-25 14:02:17

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: Continue: psmouse.c - synaptics touchpad driver sync problem

diff -urN 2.6.7/drivers/input/serio/i8042.c linux-2.6.7/drivers/input/serio/i8042.c
--- 2.6.7/drivers/input/serio/i8042.c 2004-06-23 15:09:26.091494400 -0500
+++ linux-2.6.7/drivers/input/serio/i8042.c 2004-06-25 08:51:48.125136000 -0500
@@ -406,12 +406,12 @@
if (i8042_mux_values[0].exists && (str & I8042_STR_AUXDATA)) {

if (str & I8042_STR_MUXERR) {
+ printk(KERN_INFO "i8042.c: MUX reports error condition %02x\n", data);
switch (data) {
case 0xfd:
case 0xfe: dfl = SERIO_TIMEOUT; break;
case 0xff: dfl = SERIO_PARITY; break;
}
- data = 0xfe;
} else dfl = 0;

dbg("%02x <- i8042 (interrupt, aux%d, %d%s%s)",


Attachments:
i8042-muxerr.patch (653.00 B)
i8042-muxerr.patch

2004-06-29 14:23:39

by Marc Waeckerlin

[permalink] [raw]
Subject: Re: Continue: psmouse.c - synaptics touchpad driver sync problem

Am Freitag, 25. Juni 2004 16.02 schrieb Dmitry Torokhov unter "Re: Continue:
psmouse.c - synaptics touchpad driver sync problem":
> Anyway, I also have a tiy patch to try out (attached, not tested/
> not compiled). Please let me know how ifit makes any improvement.

Sorry for the delay.

No, unfortunately no improvement at all.

I tested with no special kernel option (no i8042.nodemux or similar).


Regards
Marc

2004-06-29 14:32:34

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: Continue: psmouse.c - synaptics touchpad driver sync problem

Marc Waeckerlin wrote:
> Am Freitag, 25. Juni 2004 16.02 schrieb Dmitry Torokhov unter "Re:
> Continue:
> psmouse.c - synaptics touchpad driver sync problem":
> > Anyway, I also have a tiy patch to try out (attached, not tested/
> > not compiled). Please let me know how ifit makes any improvement.
>
> Sorry for the delay.
>
> No, unfortunately no improvement at all.
>

Yeah, I figure there would not be any. Still I have a nagging suspicion
that the mux gets confused and I would like to see the full dmesg with
this patch applied and DEBUG enabled. Is there any change of getting it?

Actually, if you could change the patch so it would print not only data
but also str, like this:

printk(KERN_INFO "i8042.c: MUX reports error condition %02x (%02x)\n",
data, str);

it would be even better.

Thanks!

--
Dmitry

2004-06-29 17:53:33

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: Continue: psmouse.c - synaptics touchpad driver sync problem

On Tuesday 29 June 2004 11:08 am, Marc Waeckerlin wrote:
> Am Dienstag, 29. Juni 2004 16.32 schrieben Sie unter "Re: Continue: psmouse.c
> - synaptics touchpad driver sync problem":
> > Marc Waeckerlin wrote:
> > > Am Freitag, 25. Juni 2004 16.02 schrieb Dmitry Torokhov unter "Re:
> > > Continue:
> > > > Anyway, I also have a tiy patch to try out (attached, not tested/
> > > > not compiled). Please let me know how ifit makes any improvement.
> > > No, unfortunately no improvement at all.
> >
> > Yeah, I figure there would not be any. Still I have a nagging suspicion
> > that the mux gets confused and I would like to see the full dmesg with
> > this patch applied and DEBUG enabled.
>
> "dmesg" won't help, because the buffer gets filled too quickly. I send you the
> part from /var/log/messages since last boot. File size is 386KB, so I send it
> to you directly, not through the mailing list. You are free to forward it, if
> you think it's useful for others.
>

Ok, this is much better, it confirms my suspicions... It seems that your
keyboard controller gets confused where the data is coming from. Please
try the patch below (against vanilla 2.6.7, not compiled/tested).

>
> > Is there any change of getting it?
>
> What do you mean by this?
>

Nevermind ;)

--
Dmitry

--- 2.6.7/drivers/input/serio/i8042.c 2004-06-22 01:23:15.000000000 -0500
+++ linux-2.6.7/drivers/input/serio/i8042.c 2004-06-29 12:48:21.000000000 -0500
@@ -400,19 +400,35 @@
goto out;
}

- dfl = ((str & I8042_STR_PARITY) ? SERIO_PARITY : 0) |
- ((str & I8042_STR_TIMEOUT) ? SERIO_TIMEOUT : 0);
-
if (i8042_mux_values[0].exists && (str & I8042_STR_AUXDATA)) {
+ static unsigned long last_transmit;
+ static unsigned char last_str;

+ dfl = 0;
if (str & I8042_STR_MUXERR) {
+ printk(KERN_INFO "i8042.c: MUX reports error condition %02x, data is %02x\n", str, data);
switch (data) {
+ default:
+/*
+ * When MUXERR condition is signalled the data register can only contain
+ * 0xfd, 0xfe or 0xff if implementation follows the spec. Unfortunately
+ * it is not always the case. Some KBC just get confused which port the
+ * data came from and signal error leaving the data intact. They _do not_
+ * revert to legacy mode (actually I've never seen KBC reverting to legacy
+ * mode yet, when we see one we'll add proper handling).
+ * Anyway, we will assume that the data came from the same serio last byte
+ * was transmitted (if transmission happened not too long ago).
+ */
+ if (time_before(jiffies, last_transmit + HZ/10)) {
+ str = last_str;
+ break;
+ }
+ /* fall through - report timeout */
case 0xfd:
- case 0xfe: dfl = SERIO_TIMEOUT; break;
- case 0xff: dfl = SERIO_PARITY; break;
+ case 0xfe: dfl = SERIO_TIMEOUT; data = 0xfe; break;
+ case 0xff: dfl = SERIO_PARITY; data = 0xfe; break;
}
- data = 0xfe;
- } else dfl = 0;
+ }

dbg("%02x <- i8042 (interrupt, aux%d, %d%s%s)",
data, (str >> 6), irq,
@@ -421,9 +437,14 @@

serio_interrupt(i8042_mux_port + ((str >> 6) & 3), data, dfl, regs);

+ last_str = str;
+ last_transmit = jiffies;
goto irq_ret;
}

+ dfl = ((str & I8042_STR_PARITY) ? SERIO_PARITY : 0) |
+ ((str & I8042_STR_TIMEOUT) ? SERIO_TIMEOUT : 0);
+
dbg("%02x <- i8042 (interrupt, %s, %d%s%s)",
data, (str & I8042_STR_AUXDATA) ? "aux" : "kbd", irq,
dfl & SERIO_PARITY ? ", bad parity" : "",

2004-06-30 06:02:30

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: Continue: psmouse.c - synaptics touchpad driver sync problem

On Tuesday 29 June 2004 12:53 pm, Dmitry Torokhov wrote:
> On Tuesday 29 June 2004 11:08 am, Marc Waeckerlin wrote:
> > Am Dienstag, 29. Juni 2004 16.32 schrieben Sie unter "Re: Continue: psmouse.c
> > - synaptics touchpad driver sync problem":
> > > Marc Waeckerlin wrote:
> > > > Am Freitag, 25. Juni 2004 16.02 schrieb Dmitry Torokhov unter "Re:
> > > > Continue:
> > > > > Anyway, I also have a tiy patch to try out (attached, not tested/
> > > > > not compiled). Please let me know how ifit makes any improvement.
> > > > No, unfortunately no improvement at all.
> > >
> > > Yeah, I figure there would not be any. Still I have a nagging suspicion
> > > that the mux gets confused and I would like to see the full dmesg with
> > > this patch applied and DEBUG enabled.
> >
> > "dmesg" won't help, because the buffer gets filled too quickly. I send you the
> > part from /var/log/messages since last boot. File size is 386KB, so I send it
> > to you directly, not through the mailing list. You are free to forward it, if
> > you think it's useful for others.
> >
>
> Ok, this is much better, it confirms my suspicions... It seems that your
> keyboard controller gets confused where the data is coming from. Please
> try the patch below (against vanilla 2.6.7, not compiled/tested).
>

Ok, just to explain the problems that I see in the log you sent (I am also
CCing Vojtech Pavlik as he might be interested in some of the analysis):

> Jun 28 16:01:16 qingwa kernel: drivers/input/serio/i8042.c: fe <- i8042 (interrupt, aux3, 12) [178780]
> Jun 28 16:01:16 qingwa kernel: drivers/input/serio/i8042.c: 18 <- i8042 (interrupt, aux3, 12) [178792]
> Jun 28 16:01:16 qingwa kernel: drivers/input/serio/i8042.c: f2 <- i8042 (interrupt, aux3, 12) [178795]
> Jun 28 16:01:16 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux3, 12) [178797]
> Jun 28 16:01:16 qingwa kernel: drivers/input/serio/i8042.c: 18 <- i8042 (interrupt, aux3, 12) [178806]
> Jun 28 16:01:16 qingwa kernel: drivers/input/serio/i8042.c: f0 <- i8042 (interrupt, aux3, 12) [178808]
> Jun 28 16:01:16 qingwa kernel: drivers/input/serio/i8042.c: 09 <- i8042 (interrupt, aux3, 12) [178810]
> Jun 28 16:01:16 qingwa kernel: i8042.c: MUX reports error condition 18 (35)
> Jun 28 16:01:16 qingwa kernel: drivers/input/serio/i8042.c: 18 <- i8042 (interrupt, aux0, 12) [178822]
> Jun 28 16:01:16 qingwa kernel: drivers/input/serio/i8042.c: fb <- i8042 (interrupt, aux3, 12) [178825]
> Jun 28 16:01:16 qingwa kernel: drivers/input/serio/i8042.c: 0a <- i8042 (interrupt, aux3, 12) [178827]
> Jun 28 16:01:16 qingwa kernel: drivers/input/serio/i8042.c: 08 <- i8042 (interrupt, aux3, 12) [178835]

The mux got confused as to where the byte came from. They byte itself seems to
be in line with other data in the stream. At this moment your mouse has probably
started jumping around. The patch I send earlier should help with this kind of
problem.

> Jun 28 16:01:19 qingwa kernel: drivers/input/serio/i8042.c: 01 <- i8042 (interrupt, kbd, 1) [181671]
> Jun 28 16:01:19 qingwa kernel: drivers/input/serio/i8042.c: 81 <- i8042 (interrupt, kbd, 1) [181738]
> Jun 28 16:01:20 qingwa kernel: drivers/input/serio/i8042.c: 18 <- i8042 (interrupt, aux3, 12) [181815]
> Jun 28 16:01:20 qingwa kernel: psmouse.c: Mouse at isa0060/serio4/input0 lost synchronization, throwing 2 bytes away.
> Jun 28 16:01:20 qingwa kernel: drivers/input/serio/i8042.c: ff <- i8042 (interrupt, aux3, 12) [181818]
> Jun 28 16:01:20 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux3, 12) [181819]
> Jun 28 16:01:20 qingwa kernel: drivers/input/serio/i8042.c: 18 <- i8042 (interrupt, aux3, 12) [181828]
> Jun 28 16:01:20 qingwa kernel: drivers/input/serio/i8042.c: fe <- i8042 (interrupt, aux3, 12) [181830]
> Jun 28 16:01:20 qingwa kernel: drivers/input/serio/i8042.c: 01 <- i8042 (interrupt, kbd, 1) [181838]
> Jun 28 16:01:20 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux3, 12) [181840]
> Jun 28 16:01:20 qingwa kernel: drivers/input/serio/i8042.c: 38 <- i8042 (interrupt, aux3, 12) [181848]
> Jun 28 16:01:20 qingwa kernel: drivers/input/serio/i8042.c: fd <- i8042 (interrupt, aux3, 12) [181850]
> Jun 28 16:01:20 qingwa kernel: drivers/input/serio/i8042.c: 81 <- i8042 (interrupt, kbd, 1) [181860]
> Jun 28 16:01:20 qingwa kernel: drivers/input/serio/i8042.c: ff <- i8042 (interrupt, aux3, 12) [181862]
> Jun 28 16:01:20 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, kbd, 1) [181875]
> Jun 28 16:01:20 qingwa kernel: atkbd.c: Unknown key pressed (translated set 2, code 0x0 on isa0060/serio0).
> Jun 28 16:01:20 qingwa kernel: atkbd.c: Use 'setkeycodes 00 <keycode>' to make it known.
> Jun 28 16:01:20 qingwa kernel: drivers/input/serio/i8042.c: fe <- i8042 (interrupt, aux3, 12) [181878]
> Jun 28 16:01:20 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux3, 12) [181880]

Not quite sure what all this is about... Did you plug external keyboard here?

> Jun 28 16:01:20 qingwa kernel: drivers/input/serio/i8042.c: 28 <- i8042 (interrupt, aux3, 12) [182553]
> Jun 28 16:01:20 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux3, 12) [182555]
> Jun 28 16:01:20 qingwa kernel: drivers/input/serio/i8042.c: ff <- i8042 (interrupt, aux3, 12) [182558]
> Jun 28 16:01:22 qingwa kernel: drivers/input/serio/i8042.c: 18 <- i8042 (interrupt, aux3, 12) [184572]
> Jun 28 16:01:22 qingwa kernel: psmouse.c: Mouse at isa0060/serio4/input0 lost synchronization, throwing 2 bytes away.
> Jun 28 16:01:22 qingwa kernel: drivers/input/serio/i8042.c: ff <- i8042 (interrupt, aux3, 12) [184574]
> Jun 28 16:01:22 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux3, 12) [184576]
> Jun 28 16:01:22 qingwa kernel: drivers/input/serio/i8042.c: 18 <- i8042 (interrupt, aux3, 12) [184585]

It seems that we are missing a byte between ff and 18, delay between 2 bytes
is about a second... Where did the byte go? Do you have DMA turned on on your
hard driver? Anything polling battery status? Can't do anything here...

> Jun 28 16:01:26 qingwa kernel: drivers/input/serio/i8042.c: 80 <- i8042 (interrupt, aux1, 12) [188150]
> Jun 28 16:01:26 qingwa kernel: drivers/input/serio/i8042.c: 9c <- i8042 (interrupt, aux1, 12) [188152]
> Jun 28 16:01:26 qingwa kernel: drivers/input/serio/i8042.c: 05 <- i8042 (interrupt, aux1, 12) [188154]
> Jun 28 16:01:26 qingwa kernel: drivers/input/serio/i8042.c: c0 <- i8042 (interrupt, aux1, 12) [188155]
> Jun 28 16:01:26 qingwa kernel: drivers/input/serio/i8042.c: 8b <- i8042 (interrupt, aux1, 12) [188157]
> Jun 28 16:01:26 qingwa kernel: drivers/input/serio/i8042.c: 80 <- i8042 (interrupt, aux1, 12) [188474]
> Jun 28 16:01:26 qingwa kernel: drivers/input/serio/i8042.c: 9c <- i8042 (interrupt, aux1, 12) [188503]
> Jun 28 16:01:26 qingwa kernel: psmouse.c: TouchPad at isa0060/serio2/input0 lost sync at byte 1
> Jun 28 16:01:26 qingwa kernel: drivers/input/serio/i8042.c: 05 <- i8042 (interrupt, aux1, 12) [188503]
> Jun 28 16:01:26 qingwa kernel: psmouse.c: TouchPad at isa0060/serio2/input0 lost sync at byte 1
> Jun 28 16:01:26 qingwa kernel: drivers/input/serio/i8042.c: 85 <- i8042 (interrupt, aux1, 12) [188835]
> Jun 28 16:01:26 qingwa kernel: drivers/input/serio/i8042.c: 98 <- i8042 (interrupt, aux1, 12) [188835]
> Jun 28 16:01:26 qingwa kernel: drivers/input/serio/i8042.c: 80 <- i8042 (interrupt, aux1, 12) [188836]
> Jun 28 16:01:26 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [188838]
> Jun 28 16:01:26 qingwa kernel: psmouse.c: TouchPad at isa0060/serio2/input0 lost sync at byte 4
> Jun 28 16:01:26 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [188839]
> Jun 28 16:01:26 qingwa kernel: psmouse.c: TouchPad at isa0060/serio2/input0 lost sync at byte 1
> Jun 28 16:01:26 qingwa kernel: drivers/input/serio/i8042.c: c0 <- i8042 (interrupt, aux1, 12) [188841]
> Jun 28 16:01:26 qingwa kernel: psmouse.c: TouchPad at isa0060/serio2/input0 lost sync at byte 1
> Jun 28 16:01:26 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [188843]
> Jun 28 16:01:26 qingwa kernel: psmouse.c: TouchPad at isa0060/serio2/input0 lost sync at byte 1
> Jun 28 16:01:26 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [188844]
> Jun 28 16:01:26 qingwa kernel: psmouse.c: TouchPad at isa0060/serio2/input0 lost sync at byte 1

Ok, here we lost byte right after 8b before 80 so it took 80 as the last byte
of a packet instead of first byte of the next packet. The gap between bytes
is about 300ms so timeout was not detected. Because of that it had hard time
synching aftewards. This is a classic example when having too big timeout
actually hurts.

Could you change drivers/input/mouse/psmouse-base.c - psmouse_interrupt()
in call to time time_after HZ/2 to HZ/4. You may see more "lost x bytes"
messages but I bet touchpad handling will feel much better.

Vojtech, what is your opinion?

> Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: a0 <- i8042 (interrupt, aux1, 12) [191319]
> Jun 28 16:01:29 qingwa kernel: i8042.c: MUX reports error condition b3 (35)
> Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: b3 <- i8042 (interrupt, aux0, 12) [191325]
> Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: 52 <- i8042 (interrupt, aux1, 12) [191327]
> Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: d0 <- i8042 (interrupt, aux1, 12) [191328]
> Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: 2e <- i8042 (interrupt, aux1, 12) [191330]
> Jun 28 16:01:29 qingwa kernel: psmouse.c: TouchPad at isa0060/serio2/input0 lost sync at byte 4
> Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: 30 <- i8042 (interrupt, aux1, 12) [191331]
> Jun 28 16:01:29 qingwa kernel: psmouse.c: TouchPad at isa0060/serio2/input0 lost sync at byte 1
> Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: a0 <- i8042 (interrupt, aux1, 12) [191333]
> Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: b3 <- i8042 (interrupt, aux1, 12) [191335]
> Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: 50 <- i8042 (interrupt, aux1, 12) [191336]
> Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: d0 <- i8042 (interrupt, aux1, 12) [191338]
> Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: 29 <- i8042 (interrupt, aux1, 12) [191339]
> Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: 30 <- i8042 (interrupt, aux1, 12) [191342]
> Jun 28 16:01:29 qingwa kernel: psmouse.c: TouchPad at isa0060/serio2/input0 - driver resynched.
> Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: a0 <- i8042 (interrupt, aux1, 12) [191343]

Again MUX got confused momentarily, the patch should fix that.

> Jun 28 16:01:31 qingwa kernel: drivers/input/serio/i8042.c: b8 <- i8042 (interrupt, kbd, 1) [193334]
> Jun 28 16:01:31 qingwa kernel: drivers/input/serio/i8042.c: 9d <- i8042 (interrupt, kbd, 1) [193359]
> Jun 28 16:01:33 qingwa kernel: i8042.c: MUX reports error condition fd (f5)
> Jun 28 16:01:33 qingwa kernel: drivers/input/serio/i8042.c: fd <- i8042 (interrupt, aux3, 12, timeout) [195950]
> Jun 28 16:01:33 qingwa kernel: psmouse.c: bad data from KBC - timeout
> Jun 28 16:01:36 qingwa kernel: drivers/input/serio/i8042.c: 13 <- i8042 (interrupt, kbd, 1) [198170]
> Jun 28 16:01:36 qingwa kernel: drivers/input/serio/i8042.c: 93 <- i8042 (interrupt, kbd, 1) [198243]

This one seems to be legit and handled OK although I am not sure what caused
AUX3 to report timeout - it wasn't transmitting for quite some time.

> Jun 28 16:01:44 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [206317]
> Jun 28 16:01:44 qingwa kernel: drivers/input/serio/i8042.c: c0 <- i8042 (interrupt, aux1, 12) [206320]
> Jun 28 16:01:44 qingwa kernel: i8042.c: MUX reports error condition 00 (35)
> Jun 28 16:01:44 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux0, 12) [206326]
> Jun 28 16:01:44 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [206327]

Confused again...

Anyway, please try the patch and the change to the timeout in
psmouse_interrupt. I am anxiously awaiting result of your testing.

--
Dmitry

2004-06-30 08:24:23

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: Continue: psmouse.c - synaptics touchpad driver sync problem

On Wed, Jun 30, 2004 at 01:02:16AM -0500, Dmitry Torokhov wrote:

> Vojtech, what is your opinion?
>
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: a0 <- i8042 (interrupt, aux1, 12) [191319]
> > Jun 28 16:01:29 qingwa kernel: i8042.c: MUX reports error condition b3 (35)
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: b3 <- i8042 (interrupt, aux0, 12) [191325]
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: 52 <- i8042 (interrupt, aux1, 12) [191327]
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: d0 <- i8042 (interrupt, aux1, 12) [191328]
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: 2e <- i8042 (interrupt, aux1, 12) [191330]
> > Jun 28 16:01:29 qingwa kernel: psmouse.c: TouchPad at isa0060/serio2/input0 lost sync at byte 4
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: 30 <- i8042 (interrupt, aux1, 12) [191331]
> > Jun 28 16:01:29 qingwa kernel: psmouse.c: TouchPad at isa0060/serio2/input0 lost sync at byte 1
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: a0 <- i8042 (interrupt, aux1, 12) [191333]
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: b3 <- i8042 (interrupt, aux1, 12) [191335]
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: 50 <- i8042 (interrupt, aux1, 12) [191336]
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: d0 <- i8042 (interrupt, aux1, 12) [191338]
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: 29 <- i8042 (interrupt, aux1, 12) [191339]
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: 30 <- i8042 (interrupt, aux1, 12) [191342]
> > Jun 28 16:01:29 qingwa kernel: psmouse.c: TouchPad at isa0060/serio2/input0 - driver resynched.
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: a0 <- i8042 (interrupt, aux1, 12) [191343]
>
> Again MUX got confused momentarily, the patch should fix that.
>
> > Jun 28 16:01:31 qingwa kernel: drivers/input/serio/i8042.c: b8 <- i8042 (interrupt, kbd, 1) [193334]
> > Jun 28 16:01:31 qingwa kernel: drivers/input/serio/i8042.c: 9d <- i8042 (interrupt, kbd, 1) [193359]
> > Jun 28 16:01:33 qingwa kernel: i8042.c: MUX reports error condition fd (f5)
> > Jun 28 16:01:33 qingwa kernel: drivers/input/serio/i8042.c: fd <- i8042 (interrupt, aux3, 12, timeout) [195950]
> > Jun 28 16:01:33 qingwa kernel: psmouse.c: bad data from KBC - timeout
> > Jun 28 16:01:36 qingwa kernel: drivers/input/serio/i8042.c: 13 <- i8042 (interrupt, kbd, 1) [198170]
> > Jun 28 16:01:36 qingwa kernel: drivers/input/serio/i8042.c: 93 <- i8042 (interrupt, kbd, 1) [198243]
>
> This one seems to be legit and handled OK although I am not sure what caused
> AUX3 to report timeout - it wasn't transmitting for quite some time.
>
> > Jun 28 16:01:44 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [206317]
> > Jun 28 16:01:44 qingwa kernel: drivers/input/serio/i8042.c: c0 <- i8042 (interrupt, aux1, 12) [206320]
> > Jun 28 16:01:44 qingwa kernel: i8042.c: MUX reports error condition 00 (35)
> > Jun 28 16:01:44 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux0, 12) [206326]
> > Jun 28 16:01:44 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [206327]
>
> Confused again...
>
> Anyway, please try the patch and the change to the timeout in
> psmouse_interrupt. I am anxiously awaiting result of your testing.

This looks like the i8042 chip is busy with something else than getting
the touchpad data to us.

This could, for example, be getting battery/thermal data to ACPI,
because it's commonly used as an ACPI EC (Embedded Controller) as well
as for handling the keyboard/mouse. I'd suggest disabling ACPI
completely (not just ACPI=off, but CONFIG_ACPI=n), same for APM,
frequency scaling, and everything else that could access the BIOS.

If that helps, then we'll need to find a way how to make sure we let
ACPI use the chip reasonably so that it doesn't cause these problems.

--
Vojtech Pavlik
SuSE Labs, SuSE CR

2004-06-30 08:43:39

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: Continue: psmouse.c - synaptics touchpad driver sync problem

On Wed, Jun 30, 2004 at 01:02:16AM -0500, Dmitry Torokhov wrote:

> Vojtech, what is your opinion?
>
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: a0 <- i8042 (interrupt, aux1, 12) [191319]
> > Jun 28 16:01:29 qingwa kernel: i8042.c: MUX reports error condition b3 (35)
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: b3 <- i8042 (interrupt, aux0, 12) [191325]
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: 52 <- i8042 (interrupt, aux1, 12) [191327]
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: d0 <- i8042 (interrupt, aux1, 12) [191328]
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: 2e <- i8042 (interrupt, aux1, 12) [191330]
> > Jun 28 16:01:29 qingwa kernel: psmouse.c: TouchPad at isa0060/serio2/input0 lost sync at byte 4
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: 30 <- i8042 (interrupt, aux1, 12) [191331]
> > Jun 28 16:01:29 qingwa kernel: psmouse.c: TouchPad at isa0060/serio2/input0 lost sync at byte 1
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: a0 <- i8042 (interrupt, aux1, 12) [191333]
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: b3 <- i8042 (interrupt, aux1, 12) [191335]
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: 50 <- i8042 (interrupt, aux1, 12) [191336]
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: d0 <- i8042 (interrupt, aux1, 12) [191338]
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: 29 <- i8042 (interrupt, aux1, 12) [191339]
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: 30 <- i8042 (interrupt, aux1, 12) [191342]
> > Jun 28 16:01:29 qingwa kernel: psmouse.c: TouchPad at isa0060/serio2/input0 - driver resynched.
> > Jun 28 16:01:29 qingwa kernel: drivers/input/serio/i8042.c: a0 <- i8042 (interrupt, aux1, 12) [191343]
>
> Again MUX got confused momentarily, the patch should fix that.
>
> > Jun 28 16:01:31 qingwa kernel: drivers/input/serio/i8042.c: b8 <- i8042 (interrupt, kbd, 1) [193334]
> > Jun 28 16:01:31 qingwa kernel: drivers/input/serio/i8042.c: 9d <- i8042 (interrupt, kbd, 1) [193359]
> > Jun 28 16:01:33 qingwa kernel: i8042.c: MUX reports error condition fd (f5)
> > Jun 28 16:01:33 qingwa kernel: drivers/input/serio/i8042.c: fd <- i8042 (interrupt, aux3, 12, timeout) [195950]
> > Jun 28 16:01:33 qingwa kernel: psmouse.c: bad data from KBC - timeout
> > Jun 28 16:01:36 qingwa kernel: drivers/input/serio/i8042.c: 13 <- i8042 (interrupt, kbd, 1) [198170]
> > Jun 28 16:01:36 qingwa kernel: drivers/input/serio/i8042.c: 93 <- i8042 (interrupt, kbd, 1) [198243]
>
> This one seems to be legit and handled OK although I am not sure what caused
> AUX3 to report timeout - it wasn't transmitting for quite some time.
>
> > Jun 28 16:01:44 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [206317]
> > Jun 28 16:01:44 qingwa kernel: drivers/input/serio/i8042.c: c0 <- i8042 (interrupt, aux1, 12) [206320]
> > Jun 28 16:01:44 qingwa kernel: i8042.c: MUX reports error condition 00 (35)
> > Jun 28 16:01:44 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux0, 12) [206326]
> > Jun 28 16:01:44 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042 (interrupt, aux1, 12) [206327]
>
> Confused again...
>
> Anyway, please try the patch and the change to the timeout in
> psmouse_interrupt. I am anxiously awaiting result of your testing.

We may also want to disable the timer polling the chip - that might be
confusing it as well.

--
Vojtech Pavlik
SuSE Labs, SuSE CR

2004-06-30 12:58:37

by Marc Waeckerlin

[permalink] [raw]
Subject: Re: Continue: psmouse.c - synaptics touchpad driver sync problem

Am Mittwoch, 30. Juni 2004 08.02 schrieb Dmitry Torokhov unter "Re: Continue:
psmouse.c - synaptics touchpad driver sync problem":
> The mux got confused as to where the byte came from. They byte itself seems
> to be in line with other data in the stream. At this moment your mouse has
> probably started jumping around. The patch I send earlier should help with
> this kind of problem.

Well, there are several things:
1) Cursor hangs on system load with internal mousepad
(no external mouse connected)
2) Cursor jumps a bit with internal mousepad
(no external mouse connected)
3) Cursor jumps like crazy when moving external mouse
4) Cursor randomly clicks when moving external mouse
5) Hitting the mouse pad does not do a button1-click
6) Sometimes the keyboard does not work anymore or
sends neverending random events - even with no
external mouse/keyboard

I did not recognize that the previous patch helped in any of these problems,
but No. 2 is the hardest to check, because I have to work for a while until
it occurs.

The second patch does not help either.

The i8042.nodemux option only "resolved" No. 3 and No. 4, because the external
mouse was no more available. Until now, nothing makes anything better.


> > drivers/input/serio/i8042.c: fe <- i8042 (interrupt, aux3, 12) [181878]
> > Jun 28 16:01:20 qingwa kernel: drivers/input/serio/i8042.c: 00 <- i8042
> > (interrupt, aux3, 12) [181880]

> Not quite sure what all this is about... Did you plug external keyboard
> here?

Possible.


> > [184574] Jun 28 16:01:22 qingwa kernel: drivers/input/serio/i8042.c: 00
> > <- i8042 (interrupt, aux3, 12) [184576] Jun 28 16:01:22 qingwa kernel:
> > drivers/input/serio/i8042.c: 18 <- i8042 (interrupt, aux3, 12) [184585]

> It seems that we are missing a byte between ff and 18, delay between 2
> bytes is about a second... Where did the byte go? Do you have DMA turned on
> on your hard driver? Anything polling battery status? Can't do anything
> here...

Do you mean hard disk DMA? Then Yes for DMA and yes for polling.


> Could you change drivers/input/mouse/psmouse-base.c - psmouse_interrupt()
> in call to time time_after HZ/2 to HZ/4. You may see more "lost x bytes"
> messages but I bet touchpad handling will feel much better.

I'll try if I can find out what you mean...
...ok, did the change.

As far as I understand, it has only effect on internal touchpad. I will
therefore need some time for long time check. You'll hear from me later, but
this surely won't resolve problems No. 2 - 6.

It is now together with your second patch, you first patch is no more in my
sources. Is this good? (I understand that by "Vanilla" you mean the original
source without your first patch?)


Regards
Marc

2004-06-30 13:23:13

by Dmitry Torokhov

[permalink] [raw]
Subject: RE: Continue: psmouse.c - synaptics touchpad driver sync problem

> Am Mittwoch, 30. Juni 2004 08.02 schrieb Dmitry Torokhov unter "Re:
> Continue:
> psmouse.c - synaptics touchpad driver sync problem":
> > The mux got confused as to where the byte came from. They byte itself
> > seems to be in line with other data in the stream. At this moment your
> > mouse has probably started jumping around. The patch I send earlier
> > should help with this kind of problem.
>
> Well, there are several things:
> 1) Cursor hangs on system load with internal mousepad
> (no external mouse connected)

You mean when the system load is high? Yes, that can happen..

> 2) Cursor jumps a bit with internal mousepad
> (no external mouse connected)
> 3) Cursor jumps like crazy when moving external mouse
> 4) Cursor randomly clicks when moving external mouse

Has the external mouse ever worked in 2.6? Or is it always
just randomly clickng stuff? Have you tried connecting another
mouse?

> 5) Hitting the mouse pad does not do a button1-click

I gather you do not have the X Synaptis driver installed?
Check out http://w1.894.telia.com/~u89404340/touchpad/index.html

> 6) Sometimes the keyboard does not work anymore or
> sends neverending random events - even with no
> external mouse/keyboard
>
> I did not recognize that the previous patch helped in any of these
> problems, but No. 2 is the hardest to check, because I have to work
> for a while until it occurs.
>
> The second patch does not help either.
>
> The i8042.nodemux option only "resolved" No. 3 and No. 4, because the
> external mouse was no more available. Until now, nothing makes anything
> better.
>

Just to confirm - you are saying that the touchpad + external mouse
worked together fine in 2.4 but in 2.6 with i8042.nomux the external
mouse does not work, correct?

>
> > > drivers/input/serio/i8042.c: fe <- i8042 (interrupt, aux3, 12)
> [181878]
> > > Jun 28 16:01:20 qingwa kernel: drivers/input/serio/i8042.c: 00 <-
> i8042
> > > (interrupt, aux3, 12) [181880]
>
> > Not quite sure what all this is about... Did you plug external keyboard
> > here?
>
> Possible.
>
>
> > > [184574] Jun 28 16:01:22 qingwa kernel: drivers/input/serio/i8042.c:
> 00
> > > <- i8042 (interrupt, aux3, 12) [184576] Jun 28 16:01:22 qingwa kernel:
> > > drivers/input/serio/i8042.c: 18 <- i8042 (interrupt, aux3, 12)
> [184585]
>
> > It seems that we are missing a byte between ff and 18, delay between 2
> > bytes is about a second... Where did the byte go? Do you have DMA turned
> > on on your hard driver? Anything polling battery status? Can't do
> > anything here...
>
> Do you mean hard disk DMA? Then Yes for DMA and yes for polling.
>

Ok, what program does the polling? What is the polling interval? Does
it help if you stop the program?

>
> > Could you change drivers/input/mouse/psmouse-base.c - psmouse_interrupt()
> > in call to time time_after HZ/2 to HZ/4. You may see more "lost x bytes"
> > messages but I bet touchpad handling will feel much better.
>
> I'll try if I can find out what you mean...
> ...ok, did the change.
>
> As far as I understand, it has only effect on internal touchpad. I will
> therefore need some time for long time check. You'll hear from me later,
> but this surely won't resolve problems No. 2 - 6.
>
> It is now together with your second patch, you first patch is no more in
> my sources. Is this good? (I understand that by "Vanilla" you mean the
> original source without your first patch?)

Yes.

--
Dmitry