Bug 779 - psmouse.c: Lost synchronization, throwing 1 bytes away.
Summary: psmouse.c: Lost synchronization, throwing 1 bytes away.
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Dmitry Torokhov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-06 07:09 UTC by Arnaud Quette
Modified: 2006-05-10 12:03 UTC (History)
8 users (show)

See Also:
Kernel Version: 2.5.69+
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
remove packet reset (524 bytes, text/plain)
2005-01-12 05:00 UTC, Daniele Cruciani
Details

Description Arnaud Quette 2003-06-06 07:09:24 UTC
Distribution: Debian Unstable (sid)
Hardware Environment: Celeron i810 board, MS intellimouse optical USB with PS2
adapter, belkin Omni View Pro (4 ports automatic Data switch)
Software Environment: XFree 4.2.1
Problem Description:
when switching back to linux using the data switch, the mouse does all wrong
(same as if I was moving the mouse in all ways while clicking like a fool but
I've only moved by 2 cm !)

Steps to reproduce: not sure if it comes from the data switch or anything else.
The problem doesn't exist in 2.4 tree. I think that a test with another switch
of another brand might be interesting.
Comment 1 Vojtech Pavlik 2003-06-07 03:04:55 UTC
The problem is that when you switch the switch the mouse gets reset to
standard PS/2 mode. If the psmouse.c driver operates it in ImPS/2 or ExPS/2 mode,
it'll have troubles, because PS/2 have 3 bytes per packets and the others have
4 bytes per packet.

To make sure both the systems use the mouse in PS/2 mode, use the 'psmouse_noext'
kernel command line options.
Comment 2 Arnaud Quette 2003-06-10 08:20:30 UTC
ok, appending "psmouse_noext" solves the problem. Thanks Vojtech.

Sadly, I've lost a feature in the battle: the wheel mouse. Forcing pure PS/2
mode make loosing it...

Do you see any way to have the problem solved, and the wheel working
again ? (seems not as it come from the data switch, but this is working in
2.4 ! so I ask the question ;-)
Comment 3 Attila Kesmarki 2003-07-22 12:15:23 UTC
Distribution: gentoo  
Hardware: Gigabyte GA-7VAXP motherboard+athlonXP2000 CPU 
Normal PS/2 mouse ( Genius, Netscroll+ )  
Software: Linux 2.6.0-test1 + XFree 4.3.0 using IMPS/2 protocol in XF86Config 
 
I don't use any data switch, the Mouse and keyboard uses normal PS/2 ports 
directly, but I have a similar (same?) problem. 
Sometimes (about once in 1-2 hours) when I switch back from normal terminal to X, I 
get the following messages in the log: 
 
agpgart: Found an AGP 2.0 compliant device at 00 
00:00:00.0. 
Jul 21 21:44:29 danhome kernel: agpgart: Putting AGP V2 device at 0000:00:00.0 i 
nto 4x mode 
Jul 21 21:44:29 danhome kernel: agpgart: Putting AGP V2 device at 0000:01:00.0 i 
nto 4x mode 
Jul 21 21:44:29 danhome kernel: [drm] Loading R200 Microcode 
Jul 21 22:04:33 danhome kernel: psmouse.c: Lost synchronization, throwing 3 byte 
s away. 
 
The last message is sometimes mentions throwing 1,2, or 3 bytes. 
 
Comment 4 Attila Kesmarki 2003-07-24 09:22:00 UTC
An additional note to my previous comment:
The same error occures when I leave my computer idle for some time (example: 
for 30 seconds), and then want to continue my work by using the mouse. (under X 
environment)
Comment 5 Miernik 2004-01-20 08:16:29 UTC
I get this bug too, on a Sony PCG-C1MV laptop, kernel 2.6.0-2 from Debian. 
Sometimes the mouse just starts jumping around, and I get these 
psmouse.c mouse at (here some random characters) lost synchronization
thrown 2 bytes away
Comment 6 Duncan 2004-02-13 08:48:14 UTC
I got this bug too, the mouse went crazy for a second - it moved very quickly to
the edge of the screen and clicked randomly. I wasn't doing anything specific
like changing virtual console, I was just using a web browser in X.

Syslog said:
Feb 13 03:39:25 localhost kernel: psmouse.c: Mouse at isa0060/serio1/input0 lost
synchronization, throwing 2 bytes away.

I was using 2.6.2, XFree 4.3.0 on Gentoo with an ordinary 3 button PS/2 mouse.

I've been using 2.6.2 for about a week now and it's only happened once. It never
happened in 2.4.2x - ie I don't think the mouse is dodgy.
Comment 7 Vojtech Pavlik 2004-02-13 09:00:28 UTC
The byte-lost issue was fixed in 2.6.3-rc1. The KVM issue is not fixed
yet, and I'll probably have to get me a KVM to test with.
Comment 8 Andr 2004-06-11 16:06:29 UTC
I have the same problem that http://bugzilla.kernel.org/show_bug.cgi?id=779#c5
has, but with a 2.6.6 kernel
Comment 9 Zak Wilson 2004-11-12 14:11:07 UTC
I am having the same problem with 2.6.9 on an IBM Thinkpad T20 with the built in
trackpoint. It occurs frequently, especially with high CPU load. Trying to move
the mouse when the CPU load is high is almost certain to trigger the problem. It
seems to happen more frequently on a preemptible kernel.
Comment 10 Daniele Cruciani 2005-01-12 05:00:55 UTC
Created attachment 4377 [details]
remove packet reset

do not throw bytes away
Comment 11 Daniele Cruciani 2005-01-12 05:04:57 UTC
patch 4377 do not solve bug, but I see that strange things do not happen: mouse
just stop and consume cpu as usual, but no spurious input go in.

This is just an idea on which to investigate.. why this happen?

BTW, is better a mouse that block than a mouse which do strange thing
Comment 12 Nishanth Aravamudan 2005-02-17 10:59:23 UTC
Hi Daniele, Dmitry posted some patches on LKML ([RFC/RFT] Better handling of bad
xfers/interrupt delays in psmouse), which may affect this bug? Can anyone test
this to see if it helps with these errors? Thanks, Nish.
Comment 13 Dmitry Torokhov 2005-02-17 11:08:20 UTC
No that patch is unlikely to help with protocol reset problem that often 
happens when switching KVM... It should help in case you have a bad cable or 
something (like disk activity) delays delivery of mouse interrupt.

I still can't come up with a reliable way to detect that mouse has been reset.
Comment 14 Vojtech Pavlik 2005-02-17 11:19:33 UTC
Well, we could be running the mouse completely in polling mode. That'd
take care of the protocol change problems.
Comment 15 Dmitry Torokhov 2005-02-17 11:23:26 UTC
Ok, re-reading all the comments to this bug I see that 2 issues have been mixed 
here. One is that mice are reset when switching KVM and this issue is not fixed 
yet. The second issue is that mouse starts misbehaving under load or when KBC 
reports a timeout or a parity error. For that issue I have a patch that I would 
like people to test. The version for 2.6.10 can be found here:  

     http://www.geocities.com/dt_or/input/2_6_10/

I am very interested in results. Thanks in advance!
Comment 16 Dmitry Torokhov 2005-02-17 11:27:19 UTC
Re: polling mode - Synaptics immediately reverts into PS/2 compat mode if you 
poll it. I wonder what ALPS does. And not very efficient. Plus some people like 
to run notebook + KVM on a boxes without an active MUX and I have no idea who 
will reply to poll in this case. 
Comment 17 Vojtech Pavlik 2005-02-17 11:33:42 UTC
Can't the target of subsequent commands be selected by some ALPS commands?
I remember some comments in that direction in the source code.
Comment 18 Dmitry Torokhov 2005-02-17 11:41:36 UTC
That's for switching between the touchpad and trackpoint and on ALPS only. You 
need to know that you are talking to an ALPS. But on many notebooks (Dell for 
exaple) there is no active MUX and they deliver data from an external PS/2 port 
and from the touchpad to the same serio port and there is no way to determine 
where the data is coming from. Well, actually on my Inspiron 8100 if I plug 
external mouse it completely shadows the touchpad so it stops even responding 
to synaptics queries. 
Comment 19 Daniele Cruciani 2005-02-24 10:49:21 UTC
(replay to #c15)
I found there are at least two open bugs for this issue, which actually speak
about 2 issue.

I think KVM issue should be discussed in
http://bugzilla.kernel.org/show_bug.cgi?id=2082

Dmitry, I'll try your patch soon (actually tomorrow)
Comment 20 Nishanth Aravamudan 2005-07-16 19:44:17 UTC
Any progress with this bug?

Thanks,
Nish
Comment 21 Andr 2005-07-17 02:33:33 UTC
I'm with kernel 2.6.12.2, and still I get:

psmouse.c: TouchPad at isa0060/serio4/input0 lost sync at byte 1
psmouse.c: TouchPad at isa0060/serio4/input0 lost sync at byte 1
psmouse.c: TouchPad at isa0060/serio4/input0 - driver resynched.

esgrovas@lapy ~ $ dmesg | grep psmouse.c | wc -l
171

from like... 5 minutes of usage
Comment 22 Nishanth Aravamudan 2005-10-30 16:28:07 UTC
Where do we stand on this bug with the latest releases? The last comment is from
2.6.12, two full releases ago. Dmitry / Vojtech, do you have any ideas on how to
resolve this one?

Thanks,
Nish
Comment 23 Michael Stiller 2006-01-23 13:23:40 UTC
Still get this problem with 2.6.15.1 on IBM Thinkpad R51. 
Tried the psmouse_noext kernel command line option and various 
CONFIG_PREEMPT and HZ values. Very reproducible under IO load.
Comment 24 Michael Stiller 2006-01-26 02:33:10 UTC
This seems not to happen in 2.6.16-rc1 anymore.

Comment 25 Nishanth Aravamudan 2006-01-26 07:35:30 UTC
Well, since nobody else (beyond Michael) responded to the bug when I asked if it
was still present in current kernels, and since Michael's issues seem to be gone
in 2.6.16-rc1, shall I close the bug? It can of course be reopened if the
problem resurfaces.
Comment 26 Nishanth Aravamudan 2006-05-10 12:03:56 UTC
Closing the bug. Can be reopened, of course.

Thanks, Nish

Note You need to log in before you can comment on or make changes to this bug.