Debian Bug report logs - #607242
psmouse: work around dying mouse by dropping invalid packets (mouse jumping all over the place, many events without EV_SYN)

Package: linux-2.6; Maintainer for linux-2.6 is Debian Kernel Team <debian-kernel@lists.debian.org>;

Reported by: shirish शिरीष <shirishag75@gmail.com>

Date: Thu, 16 Dec 2010 05:06:02 UTC

Severity: wishlist

Tags: upstream

Done: Moritz Muehlenhoff <jmm@inutil.org>

Bug is archived. No further changes may be made.

Forwarded to http://thread.gmane.org/gmane.linux.kernel.input/17591

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#607242; Package xserver-xorg-input-all. (Thu, 16 Dec 2010 05:06:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to shirish शिरीष <shirishag75@gmail.com>:
New Bug report received and forwarded. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Thu, 16 Dec 2010 05:06:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: shirish शिरीष <shirishag75@gmail.com>
To: debian-bts <submit@bugs.debian.org>
Subject: xserver-xorg-input-all: my mouse behaves strangely. I get "dropping event due to full queue!" in my X.org.log
Date: Thu, 16 Dec 2010 10:33:27 +0530
[Message part 1 (text/plain, inline)]
Package: xserver-xorg-input-all
Version: 1:7.5+8
Severity: important

*** Please type your report below this line ***
My mouse behaves very strangely. It jumps and does all sorts of
things. I looked at /var/log/Xorg.0.log and it showed me the 'dropping
events due to full queue!" statements. Now I don't know why its
dropping them.

The only thing I run besides my browser is BOINC for grid computing
and on this dual-core desktop I have given it only one SMP to run and
that too at 25% of the time. Please lemme know if something is wrong
at my end as well. Attaching the Xorg.0.log as well.

Note :- I did try google search as well with the keywords "dropping
event due to full queue!" and saw quite a few on ubuntu having the
same issue. For e.g. http://ubuntuforums.org/showthread.php?t=1640002
which is similar to my issue and no resolution or answer given.

Looking forward for reply.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_IN, LC_CTYPE=en_IN (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages xserver-xorg-input-all depends on:
ii  xserver-xorg-input-evd 1:2.3.2-6         X.Org X server -- evdev input driv
ii  xserver-xorg-input-syn 1.2.2-2           Synaptics TouchPad driver for X.Or
ii  xserver-xorg-input-wac 0.10.5+20100416-1 X.Org X server -- Wacom input driv

xserver-xorg-input-all recommends no packages.

xserver-xorg-input-all suggests no packages.

-- no debconf information

-- 
          Regards,
          Shirish Agarwal  शिरीष अग्रवाल
  My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
065C 6D79 A68C E7EA 52B3  8D70 950D 53FB 729A 8B17
[Xorg.0.log (text/x-log, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#607242; Package xserver-xorg-input-all. (Wed, 22 Dec 2010 09:09:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julien Viard de Galbert <julien@vdg.blogsite.org>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Wed, 22 Dec 2010 09:09:03 GMT) Full text and rfc822 format available.

Message #10 received at 607242@bugs.debian.org (full text, mbox):

From: Julien Viard de Galbert <julien@vdg.blogsite.org>
To: shirish शिरीष <shirishag75@gmail.com>, 607242@bugs.debian.org
Subject: Re: Bug#607242: xserver-xorg-input-all: my mouse behaves strangely. I get "dropping event due to full queue!" in my X.org.log
Date: Wed, 22 Dec 2010 10:06:58 +0100
reassign 607242 xserver-xorg-input-evdev 1:2.3.2-6

thanks

On Thu, Dec 16, 2010 at 10:33:27AM +0530, shirish शिरीष wrote:
> Package: xserver-xorg-input-all
> Version: 1:7.5+8
> Severity: important
> 
> *** Please type your report below this line ***
> My mouse behaves very strangely. It jumps and does all sorts of
> things. I looked at /var/log/Xorg.0.log and it showed me the 'dropping
> events due to full queue!" statements. Now I don't know why its
> dropping them.
> 
According to your log, it's using the evdev driver (which is normal) so
I'm reassigning the bug.

> The only thing I run besides my browser is BOINC for grid computing
> and on this dual-core desktop I have given it only one SMP to run and
> that too at 25% of the time. Please lemme know if something is wrong
> at my end as well. Attaching the Xorg.0.log as well.
I don't think that the problem, but you could try not running BOINC and
see if it works better.

Also you could try testing with a different mouse.

I'm not an input expert, so I don't have much idea on that.

For some reason (maybe the size it's more than 32k, which is huge for an
email) your report did not make it to the debian-x mailing list, so
maybe now that I'm replying an expert will see it ;)

[...]
> -- 
>           Regards,
>           Shirish Agarwal  शिरीष अग्रवाल
>   My quotes in this email licensed under CC 3.0
> http://creativecommons.org/licenses/by-nc/3.0/

You know that the nc part of this license make it non-free right ?
but that's a different topic ;)

> http://flossexperiences.wordpress.com
> 065C 6D79 A68C E7EA 52B3  8D70 950D 53FB 729A 8B17

Best Regards,

-- 
Julien Viard de Galbert                        <julien@vdg.blogsite.org>
http://silicone.homelinux.org/           <julien@silicone.homelinux.org>




Bug reassigned from package 'xserver-xorg-input-all' to 'xserver-xorg-input-evdev'. Request was from Julien Viard de Galbert <julien@vdg.blogsite.org> to control@bugs.debian.org. (Wed, 22 Dec 2010 09:12:03 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions xorg/1:7.5+8. Request was from Julien Viard de Galbert <julien@vdg.blogsite.org> to control@bugs.debian.org. (Wed, 22 Dec 2010 09:12:04 GMT) Full text and rfc822 format available.

Bug Marked as found in versions xserver-xorg-input-evdev/1:2.3.2-6. Request was from Julien Viard de Galbert <julien@vdg.blogsite.org> to control@bugs.debian.org. (Wed, 22 Dec 2010 09:12:04 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#607242; Package xserver-xorg-input-evdev. (Wed, 22 Dec 2010 10:57:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julien Viard de Galbert <julien@vdg.blogsite.org>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Wed, 22 Dec 2010 10:57:03 GMT) Full text and rfc822 format available.

Message #21 received at 607242@bugs.debian.org (full text, mbox):

From: Julien Viard de Galbert <julien@vdg.blogsite.org>
To: shirish शिरीष <shirishag75@gmail.com>, 607242@bugs.debian.org
Subject: Re: Bug#607242: xserver-xorg-input-all: my mouse behaves strangely. I get "dropping event due to full queue!" in my X.org.log
Date: Wed, 22 Dec 2010 11:55:06 +0100
tags 607242 + moreinfo
thanks

On Wed, Dec 22, 2010 at 10:06:58AM +0100, Julien Viard de Galbert wrote:
> [...]
> I'm not an input expert, so I don't have much idea on that.
> 
> For some reason (maybe the size it's more than 32k, which is huge for an
> email) your report did not make it to the debian-x mailing list, so
> maybe now that I'm replying an expert will see it ;)

Got an expert advice ;)

Apparently "dropping event due to full queue" indicates that the kernel
never sends EV_SYN for this device. The driver queue the button and
motion events until it gets the sync, so with no sync, the queue gets
full...

You should install evtest, and launch it once your mouse start to behave
wrong. (to find the device you have to give in parameter you can look at
your Xorg.0.log, it was /dev/input/event5 in the log you sent.
so launch
# evtest /dev/input/event5
move your mouse a little, and send us the output.

That would help understanding what's wrong.

Thanks for your time,

-- 
Julien Viard de Galbert                        <julien@vdg.blogsite.org>
http://silicone.homelinux.org/           <julien@silicone.homelinux.org>




Added tag(s) moreinfo. Request was from Julien Viard de Galbert <julien@vdg.blogsite.org> to control@bugs.debian.org. (Wed, 22 Dec 2010 10:57:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#607242; Package xserver-xorg-input-evdev. (Wed, 22 Dec 2010 13:21:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to shirish शिरीष <shirishag75@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Wed, 22 Dec 2010 13:21:06 GMT) Full text and rfc822 format available.

Message #28 received at 607242@bugs.debian.org (full text, mbox):

From: shirish शिरीष <shirishag75@gmail.com>
To: Julien Viard de Galbert <julien@vdg.blogsite.org>, shirish शिरीष <shirishag75@gmail.com>, 607242@bugs.debian.org
Subject: Re: Bug#607242: xserver-xorg-input-all: my mouse behaves strangely. I get "dropping event due to full queue!" in my X.org.log
Date: Wed, 22 Dec 2010 18:50:25 +0530
In-line :-

On Wed, Dec 22, 2010 at 16:25, Julien Viard de Galbert
<julien@vdg.blogsite.org> wrote:
> tags 607242 + moreinfo
> thanks
>
> On Wed, Dec 22, 2010 at 10:06:58AM +0100, Julien Viard de Galbert wrote:
>> [...]
>> I'm not an input expert, so I don't have much idea on that.
>>
>> For some reason (maybe the size it's more than 32k, which is huge for an
>> email) your report did not make it to the debian-x mailing list, so
>> maybe now that I'm replying an expert will see it ;)


Thank you. Didn't understand the bit about 32kb thing. Do you mean I
write a lot or did the font-size make the bug-report big. More clarity
here would be good .

> Got an expert advice ;)
>
> Apparently "dropping event due to full queue" indicates that the kernel
> never sends EV_SYN for this device. The driver queue the button and
> motion events until it gets the sync, so with no sync, the queue gets
> full...
>
> You should install evtest, and launch it once your mouse start to behave
> wrong. (to find the device you have to give in parameter you can look at
> your Xorg.0.log, it was /dev/input/event5 in the log you sent.
> so launch
> # evtest /dev/input/event5
> move your mouse a little, and send us the output.

Thank you, already installed evtest and now waiting for the mouse to
behave as it behaves :P , would try to send the data as and when it
becomes possible. Would you say below is a good idea

$evtest /dev/input/event5 > mouse.txt

Just wondering, because when that happens sometimes the desktop also
freezes or some other things happen. I could go to VT1 (CTRL+TAB+1)and
fire that up from there and let it do it work. Also after firing it
up, when I'm sure the data is captured how do I make it stop, do I do
a CTRL+C or some other keyboard combo so the data is safe and
pristine. A better set of instructions would go a long way in helping
me deliver the data that would be needed to pin-point what is wrong. I
wanna be in a position to be able to generate the data, if desktop
freezes or anything else, save that data, shutdown the system and
restart and still the data is there. Then will send you. Because of
the freakishness of the mouse, I'm not able to trust the GUI and the
system as much as I would like.

> That would help understanding what's wrong.

Yup.

> Thanks for your time,



Lastly
> --
> Julien Viard de Galbert                        <julien@vdg.blogsite.org>
> http://silicone.homelinux.org/           <julien@silicone.homelinux.org>

Lastly, NC is my signature means non-commercial, I don't know why
people think  of non-commercial as non-free. I have seen many an
art-work and literature under the non-free license and nobody raises
an eyebrow. But as you said that's an entirely different matter so let
it rest. :)

-- 
          Regards,
          Shirish Agarwal  शिरीष अग्रवाल
  My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
065C 6D79 A68C E7EA 52B3  8D70 950D 53FB 729A 8B17




Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#607242; Package xserver-xorg-input-evdev. (Wed, 22 Dec 2010 15:06:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julien Viard de Galbert <julien@vdg.blogsite.org>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Wed, 22 Dec 2010 15:06:03 GMT) Full text and rfc822 format available.

Message #33 received at 607242@bugs.debian.org (full text, mbox):

From: Julien Viard de Galbert <julien@vdg.blogsite.org>
To: shirish शिरीष <shirishag75@gmail.com>, 607242@bugs.debian.org
Subject: Re: Bug#607242: xserver-xorg-input-all: my mouse behaves strangely. I get "dropping event due to full queue!" in my X.org.log
Date: Wed, 22 Dec 2010 16:03:42 +0100
[Message part 1 (text/plain, inline)]
On Wed, Dec 22, 2010 at 06:50:25PM +0530, shirish शिरीष wrote:
> In-line :-
> 
> On Wed, Dec 22, 2010 at 16:25, Julien Viard de Galbert
> <julien@vdg.blogsite.org> wrote:
> > tags 607242 + moreinfo
> > thanks
> >
> > On Wed, Dec 22, 2010 at 10:06:58AM +0100, Julien Viard de Galbert wrote:
> >> [...]
> >> I'm not an input expert, so I don't have much idea on that.
> >>
> >> For some reason (maybe the size it's more than 32k, which is huge for an
> >> email) your report did not make it to the debian-x mailing list, so
> >> maybe now that I'm replying an expert will see it ;)
> 
> 
> Thank you. Didn't understand the bit about 32kb thing. Do you mean I
> write a lot or did the font-size make the bug-report big. More clarity
> here would be good .
> 
It's mainly the size of the Xorg.0.log file, you could have removed a
few of the repeated lines at the end.
> > Got an expert advice ;)
> >
> > Apparently "dropping event due to full queue" indicates that the kernel
> > never sends EV_SYN for this device. The driver queue the button and
> > motion events until it gets the sync, so with no sync, the queue gets
> > full...
> >
> > You should install evtest, and launch it once your mouse start to behave
> > wrong. (to find the device you have to give in parameter you can look at
> > your Xorg.0.log, it was /dev/input/event5 in the log you sent.
> > so launch
> > # evtest /dev/input/event5
> > move your mouse a little, and send us the output.
> 
> Thank you, already installed evtest and now waiting for the mouse to
> behave as it behaves :P , would try to send the data as and when it
> becomes possible. Would you say below is a good idea
> 
> $evtest /dev/input/event5 > mouse.txt
> 
> Just wondering, because when that happens sometimes the desktop also
> freezes or some other things happen. I could go to VT1 (CTRL+TAB+1)and
> fire that up from there and let it do it work. Also after firing it
> up, when I'm sure the data is captured how do I make it stop, do I do
> a CTRL+C or some other keyboard combo so the data is safe and
> pristine. A better set of instructions would go a long way in helping
> me deliver the data that would be needed to pin-point what is wrong. I
> wanna be in a position to be able to generate the data, if desktop
> freezes or anything else, save that data, shutdown the system and
> restart and still the data is there. Then will send you. Because of
> the freakishness of the mouse, I'm not able to trust the GUI and the
> system as much as I would like.
> 
Yes, launching evtest form a VT should do it. but then you're going to
have a huge file were all the firsts lines will be normal, basically
what we are trying to find is if the EV_SYN event is still send. This
event is displayed as "-------------- Report Sync ------------" so
you should probably cut the file and remove the middle part where the
sync events look normal.
> > That would help understanding what's wrong.
> 
> Yup.
> 
> > Thanks for your time,
> 
> 
> 
> Lastly
> > --
> > Julien Viard de Galbert                        <julien@vdg.blogsite.org>
> > http://silicone.homelinux.org/           <julien@silicone.homelinux.org>
> 
> Lastly, NC is my signature means non-commercial, I don't know why
> people think  of non-commercial as non-free. I have seen many an
> art-work and literature under the non-free license and nobody raises
> an eyebrow. But as you said that's an entirely different matter so let
> it rest. :)
> 
Just because non-commercial is a restriction, so it's non-free with
regards to debian criteria at least, and some other agrees with that ;)

But of course you are perfectly free to use it for your signature :)

-- 
Julien Viard de Galbert                        <julien@vdg.blogsite.org>
http://silicone.homelinux.org/           <julien@silicone.homelinux.org>
GPG Key ID: D00E52B6                  Published on: hkp://keys.gnupg.net
Key Fingerprint: E312 A31D BEC3 74CC C49E  6D69 8B30 6538 D00E 52B6
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#607242; Package xserver-xorg-input-evdev. (Wed, 22 Dec 2010 15:15:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to shirish शिरीष <shirishag75@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Wed, 22 Dec 2010 15:15:04 GMT) Full text and rfc822 format available.

Message #38 received at 607242@bugs.debian.org (full text, mbox):

From: shirish शिरीष <shirishag75@gmail.com>
To: Julien Viard de Galbert <julien@vdg.blogsite.org>, shirish शिरीष <shirishag75@gmail.com>, 607242@bugs.debian.org
Subject: Re: Bug#607242: xserver-xorg-input-all: my mouse behaves strangely. I get "dropping event due to full queue!" in my X.org.log
Date: Wed, 22 Dec 2010 20:44:10 +0530
In-line :-

On Wed, Dec 22, 2010 at 20:33, Julien Viard de Galbert
<julien@vdg.blogsite.org> wrote:

<snipped>
> Yes, launching evtest form a VT should do it. but then you're going to
> have a huge file were all the firsts lines will be normal, basically
> what we are trying to find is if the EV_SYN event is still send. This
> event is displayed as "-------------- Report Sync ------------" so
> you should probably cut the file and remove the middle part where the
> sync events look normal.
>> > That would help understanding what's wrong.

wish I had known this an hour ago. My mother was playing solitaire and
the mouse started acting strange. I did the

$ sudo evtest /dev/input/event5 and there was lots of stuff on stdout
i.e. terminal. I'm guessing that's gone now, right. In fact the whole
desktop had freezed sort of and the mouse was being crazy.

What I had to do later is to use htop and kill solitaire and then
could finally get back control of the desktop. I will get it now for
sure in few hours and atleast know whether the mouse is responsible
for these things or its just an effect of something else.

Thank you for your help. I would not be really aware which part of the
file would be good or not to you so will send it to you in its
entirety as a reply to the bug-report and if that fails put it up on
rapidshare or whatever upload site is available/convenient to you.

<snipped>

> --
> Julien Viard de Galbert                        <julien@vdg.blogsite.org>
> http://silicone.homelinux.org/           <julien@silicone.homelinux.org>
> GPG Key ID: D00E52B6                  Published on: hkp://keys.gnupg.net
> Key Fingerprint: E312 A31D BEC3 74CC C49E  6D69 8B30 6538 D00E 52B6
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iQIcBAEBCAAGBQJNEhNOAAoJEIswZTjQDlK2pjYQAMBPLbPZ4qMcw5BZdIkPWkq7
> AW/Bl4gy4wX30z0IXn5njGRhqbzEb1k++zJfiKAlwi0to9aXNYOGNJiO6FI6o/B0
> KLP036urnnKtYWoVTJiSMTWUAmYTM2DvO+7zGAPIlBy6T5yfkRiRQG0R5laJkvSz
> adR0BVtuhY7+18GeqkvndUdEuBvrV0CqLvmvzN5ZsOKBMuPVfnDNrXc909D6y17Z
> ouZhG6cGjmoGJq3cDVGaWHf9Q9ik7fVRZbqKLMptqsU2+lV0MaAp8lp5MTZ8M5nw
> 6no2GO8x6kEBBUglWm34cs9pUOAaZVVj9NmqPwSK8NonyMl2gC7wtgV3fMbveMWJ
> 6PNBfu35mf7IWuTPaE96gMQjkjfRKkd8VEb4IqfUhpxfnLUVFpjgcQu2Z4GQRUm5
> Vqsn10hMwPdD/4TT+4QPBW1HvvGrkwlUFezUm8ciIwUU9WiuXSXVfcVa0H2U3OmH
> s0Hn2+pMVI2zkmC8laD4jHmV72aZQx+EahEREbnz19PFGYyXLZcUE8h/zzxJ+Dc6
> 4klgCkcxRl2MH86Ku9NuIKMVHOAo71X494jOgVLbdDP8sOrjZXXiblty8LJxUQFy
> E+qrsenMCuooN/ps0F2HDshuQ1k/9FGdOzpRln3i4ZZMFGgLCRuUnXbhMm2CQLm4
> akefGW4xyLftUlBdbQQg
> =P2Pv
> -----END PGP SIGNATURE-----
>
>



-- 
          Regards,
          Shirish Agarwal  शिरीष अग्रवाल
  My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
065C 6D79 A68C E7EA 52B3  8D70 950D 53FB 729A 8B17




Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#607242; Package xserver-xorg-input-evdev. (Thu, 23 Dec 2010 16:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to shirish शिरीष <shirishag75@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Thu, 23 Dec 2010 16:30:03 GMT) Full text and rfc822 format available.

Message #43 received at 607242@bugs.debian.org (full text, mbox):

From: shirish शिरीष <shirishag75@gmail.com>
To: 607242@bugs.debian.org
Subject: Re: Bug#607242: xserver-xorg-input-all: my mouse behaves strangely. I get "dropping event due to full queue!" in my X.org.log
Date: Thu, 23 Dec 2010 21:56:49 +0530
[Message part 1 (text/plain, inline)]
Finally got the mouse doing something irrational and was able to catch
it in the act. Now don't know if it indeed got caught in the file or
not but here's it anyway.
-- 
          Regards,
          Shirish Agarwal  शिरीष अग्रवाल
  My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
065C 6D79 A68C E7EA 52B3  8D70 950D 53FB 729A 8B17
[mouse.txt (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#607242; Package xserver-xorg-input-evdev. (Thu, 23 Dec 2010 17:39:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jim Hill <gjthill@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Thu, 23 Dec 2010 17:39:04 GMT) Full text and rfc822 format available.

Message #48 received at 607242@bugs.debian.org (full text, mbox):

From: Jim Hill <gjthill@gmail.com>
To: 607242@bugs.debian.org
Subject: syslog shows messages from psmouse.c
Date: Thu, 23 Dec 2010 09:35:28 -0800
I'm getting this too.  Here's the tail of my syslog.  The parity messages make me kinda suspect failing hardware.


Dec 23 08:08:42 gadabout kernel: [  889.790156] psmouse.c: bad data from KBC - bad parity
Dec 23 08:08:46 gadabout kernel: [  893.077036] psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 2 bytes away.
Dec 23 08:17:00 gadabout kernel: [ 1386.920047] ACPI Error: Illegal I/O port address/length above 64K: 0x0000000000400020/4 (20090903/hwvalid-154)
Dec 23 08:17:00 gadabout kernel: [ 1386.920055] ACPI Exception: AE_LIMIT, Returned by Handler for [SystemIO] (20090903/evregion-424)
Dec 23 08:17:00 gadabout kernel: [ 1386.920061] ACPI Error (psparse-0537): Method parse/execution failed [\_GPE._L09] (Node ffff88007fb2a540), AE_LIMIT
Dec 23 08:17:00 gadabout kernel: [ 1386.920087] ACPI Exception: AE_LIMIT, while evaluating GPE method [_L09] (20090903/evgpe-568)
Dec 23 08:17:01 gadabout /USR/SBIN/CRON[2811]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Dec 23 08:23:05 gadabout kernel: [ 1752.594091] psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 2 bytes away.
Dec 23 08:23:23 gadabout kernel: [ 1770.043507] psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
Dec 23 08:23:24 gadabout kernel: [ 1771.675493] psmouse.c: bad data from KBC - bad parity
Dec 23 08:23:26 gadabout kernel: [ 1773.153695] psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
Dec 23 08:24:58 gadabout kernel: [ 1865.426208] psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
Dec 23 08:28:56 gadabout kernel: [ 2103.834864] psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 1 bytes away.
Dec 23 08:29:19 gadabout kernel: [ 2125.964244] psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
Dec 23 08:41:14 gadabout kernel: [ 2840.974187] psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 2 bytes away.
Dec 23 08:45:40 gadabout kernel: [ 3107.126259] psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
Dec 23 08:45:46 gadabout kernel: [ 3113.574329] psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 1 bytes away.
Dec 23 08:45:58 gadabout kernel: [ 3125.319904] psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
Dec 23 08:50:04 gadabout kernel: [ 3371.504141] psmouse.c: bad data from KBC - bad parity
Dec 23 08:50:06 gadabout kernel: [ 3372.979298] psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
Dec 23 08:50:09 gadabout kernel: [ 3376.725902] psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
Dec 23 08:50:13 gadabout kernel: [ 3380.301314] psmouse.c: bad data from KBC - bad parity
Dec 23 08:50:14 gadabout kernel: [ 3381.271533] psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
Dec 23 08:56:18 gadabout kernel: [ 3745.092206] psmouse.c: bad data from KBC - bad parity
Dec 23 08:56:19 gadabout kernel: [ 3746.510556] psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
Dec 23 09:04:56 gadabout kernel: [ 4263.062278] psmouse.c: bad data from KBC - bad parity
Dec 23 09:04:58 gadabout kernel: [ 4264.912181] psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
Dec 23 09:16:22 gadabout kernel: [ 4949.744285] psmouse.c: bad data from KBC - bad parity
Dec 23 09:16:23 gadabout kernel: [ 4950.616985] psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
Dec 23 09:17:01 gadabout /USR/SBIN/CRON[4828]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)

$ sudo lshw
gadabout                  
    description: Desktop Computer
    product: EL445AA-ABA SR1750NX NA650
    vendor: Compaq Presario 061
    version: 0nx1411RE101AMBEM00
[...]

$ uname -a
Linux gadabout 2.6.32-5-amd64 #1 SMP Fri Dec 10 15:35:08 UTC 2010 x86_64 GNU/Linux




Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#607242; Package xserver-xorg-input-evdev. (Thu, 23 Dec 2010 18:09:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to shirish शिरीष <shirishag75@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Thu, 23 Dec 2010 18:09:06 GMT) Full text and rfc822 format available.

Message #53 received at 607242@bugs.debian.org (full text, mbox):

From: shirish शिरीष <shirishag75@gmail.com>
To: Jim Hill <gjthill@gmail.com>, 607242@bugs.debian.org
Subject: Re: Bug#607242: syslog shows messages from psmouse.c
Date: Thu, 23 Dec 2010 23:34:48 +0530
In-line :-

On Thu, Dec 23, 2010 at 23:05, Jim Hill <gjthill@gmail.com> wrote:
> I'm getting this too.  Here's the tail of my syslog.  The parity messages make me kinda suspect failing hardware.

<snipped>
Thank you gjthill for also giving me one place to look. I also took a
look there and found this out.

Dec 23 19:07:48 deb-home kernel: [ 1354.471364] psmouse.c: Wheel Mouse
at isa0060/serio1/input0 lost synchronization, throwing 2 bytes away.

Dec 23 20:11:26 deb-home kernel: [ 5172.509267] psmouse.c: Wheel Mouse
at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.

Dec 23 21:51:15 deb-home kernel: [11161.670849] psmouse.c: Wheel Mouse
at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.

Dec 23 22:15:34 deb-home kernel: [12620.856362] psmouse.c: Wheel Mouse
at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.

Dec 23 22:42:55 deb-home kernel: [14261.187782] psmouse.c: Wheel Mouse
at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.

Although there are no bad parity statements in my syslog. If needed
can attach the syslog as well.

Mine is an assembled system.

I don't know from where Jim got a gadabout kernel and what's that I've no idea.

Mine is whatever I have got from Debian.

$ uname -a
Linux deb-home 2.6.32-5-amd64 #1 SMP Fri Dec 10 15:35:08 UTC 2010
x86_64 GNU/Linux
-- 
          Regards,
          Shirish Agarwal  शिरीष अग्रवाल
  My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
065C 6D79 A68C E7EA 52B3  8D70 950D 53FB 729A 8B17




Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#607242; Package xserver-xorg-input-evdev. (Thu, 23 Dec 2010 18:24:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to shirish शिरीष <shirishag75@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Thu, 23 Dec 2010 18:24:03 GMT) Full text and rfc822 format available.

Message #58 received at 607242@bugs.debian.org (full text, mbox):

From: shirish शिरीष <shirishag75@gmail.com>
To: Jim Hill <gjthill@gmail.com>, 607242@bugs.debian.org
Subject: Re: Bug#607242: syslog shows messages from psmouse.c
Date: Thu, 23 Dec 2010 23:52:48 +0530
Did a little bit more looking into it and atleast one thing I found
puzzling. It may be something or not, dunno.

$ sudo grep mouse /var/log/syslog
Dec 23 18:45:21 deb-home kernel: [    0.455573] input: Macintosh mouse
button emulation as /devices/virtual/input/input0
Dec 23 18:45:21 deb-home kernel: [    0.456117] mice: PS/2 mouse
device common for all mice
Dec 23 19:07:48 deb-home kernel: [ 1354.471364] psmouse.c: Wheel Mouse
at isa0060/serio1/input0 lost synchronization, throwing 2 bytes away.
Dec 23 20:11:26 deb-home kernel: [ 5172.509267] psmouse.c: Wheel Mouse
at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
Dec 23 21:51:15 deb-home kernel: [11161.670849] psmouse.c: Wheel Mouse
at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
Dec 23 22:15:34 deb-home kernel: [12620.856362] psmouse.c: Wheel Mouse
at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
Dec 23 22:42:55 deb-home kernel: [14261.187782] psmouse.c: Wheel Mouse
at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.

Why is it taking as a Macintosh mouse ?

[quote]
Dec 23 18:45:21 deb-home kernel: [    0.455573] input: Macintosh mouse
button emulation as /devices/virtual/input/input0
[/quote]

Is this good or not, no idea .
-- 
          Regards,
          Shirish Agarwal  शिरीष अग्रवाल
  My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
065C 6D79 A68C E7EA 52B3  8D70 950D 53FB 729A 8B17




Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#607242; Package xserver-xorg-input-evdev. (Thu, 23 Dec 2010 18:36:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julien Cristau <jcristau@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Thu, 23 Dec 2010 18:36:06 GMT) Full text and rfc822 format available.

Message #63 received at 607242@bugs.debian.org (full text, mbox):

From: Julien Cristau <jcristau@debian.org>
To: shirish शिरीष <shirishag75@gmail.com>, 607242@bugs.debian.org
Cc: Jim Hill <gjthill@gmail.com>
Subject: Re: Bug#607242: syslog shows messages from psmouse.c
Date: Thu, 23 Dec 2010 19:32:19 +0100
[Message part 1 (text/plain, inline)]
On Thu, Dec 23, 2010 at 23:52:48 +0530, shirish शिरीष wrote:

> Why is it taking as a Macintosh mouse ?
> 
> [quote]
> Dec 23 18:45:21 deb-home kernel: [    0.455573] input: Macintosh mouse
> button emulation as /devices/virtual/input/input0
> [/quote]
> 
> Is this good or not, no idea .

It's irrelevant, that's a virtual device created by the kernel, it
doesn't do anything on your machine.

Cheers,
Julien
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#607242; Package xserver-xorg-input-evdev. (Thu, 23 Dec 2010 18:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jim Hill <gjthill@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Thu, 23 Dec 2010 18:39:02 GMT) Full text and rfc822 format available.

Message #68 received at 607242@bugs.debian.org (full text, mbox):

From: Jim Hill <gjthill@gmail.com>
To: 607242@bugs.debian.org
Subject: Re: syslog shows messages from psmouse.c
Date: Thu, 23 Dec 2010 10:36:20 -0800
Okay, digging it seems this is a common hardware problem that Windows
solves by ignoring: https://bugzilla.kernel.org/show_bug.cgi?id=6105

Linux does too since 2.6.34:

$ git describe 6b9d363c49d22395d0cf8729c5963f83cfbb6d69
v2.6.34-rc1-31-g6b9d363




Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#607242; Package xserver-xorg-input-evdev. (Thu, 23 Dec 2010 19:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julien Cristau <jcristau@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Thu, 23 Dec 2010 19:03:03 GMT) Full text and rfc822 format available.

Message #73 received at 607242@bugs.debian.org (full text, mbox):

From: Julien Cristau <jcristau@debian.org>
To: shirish शिरीष <shirishag75@gmail.com>, 607242@bugs.debian.org, Jim Hill <gjthill@gmail.com>
Cc: linux-2.6@packages.debian.org
Subject: Re: Bug#607242: syslog shows messages from psmouse.c
Date: Thu, 23 Dec 2010 20:00:23 +0100
[Message part 1 (text/plain, inline)]
reassign 607242 linux-2.6
kthxbye

Reassigning to the kernel as this doesn't look like an X bug in any
case.

On Thu, Dec 23, 2010 at 23:34:48 +0530, shirish शिरीष wrote:

> In-line :-
> 
> On Thu, Dec 23, 2010 at 23:05, Jim Hill <gjthill@gmail.com> wrote:
> > I'm getting this too.  Here's the tail of my syslog.  The parity messages make me kinda suspect failing hardware.
> 
> <snipped>
> Thank you gjthill for also giving me one place to look. I also took a
> look there and found this out.
> 
> Dec 23 19:07:48 deb-home kernel: [ 1354.471364] psmouse.c: Wheel Mouse
> at isa0060/serio1/input0 lost synchronization, throwing 2 bytes away.
> 
> Dec 23 20:11:26 deb-home kernel: [ 5172.509267] psmouse.c: Wheel Mouse
> at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
> 
> Dec 23 21:51:15 deb-home kernel: [11161.670849] psmouse.c: Wheel Mouse
> at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
> 
> Dec 23 22:15:34 deb-home kernel: [12620.856362] psmouse.c: Wheel Mouse
> at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
> 
> Dec 23 22:42:55 deb-home kernel: [14261.187782] psmouse.c: Wheel Mouse
> at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
> 
> Although there are no bad parity statements in my syslog. If needed
> can attach the syslog as well.
> 

On Thu, Dec 23, 2010 at 10:36:20 -0800, Jim Hill wrote:

> Okay, digging it seems this is a common hardware problem that Windows
> solves by ignoring: https://bugzilla.kernel.org/show_bug.cgi?id=6105
> 
> Linux does too since 2.6.34:
> 
> $ git describe 6b9d363c49d22395d0cf8729c5963f83cfbb6d69
> v2.6.34-rc1-31-g6b9d363
> 
Not sure this is what shirish is seeing since he doesn't get the parity
error message, but it's either a kernel bug or hardware fail as far as I
can tell.  Thanks for digging this up though.

Cheers,
Julien
[signature.asc (application/pgp-signature, inline)]

Bug reassigned from package 'xserver-xorg-input-evdev' to 'linux-2.6'. Request was from Julien Cristau <jcristau@debian.org> to control@bugs.debian.org. (Thu, 23 Dec 2010 19:03:05 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions xserver-xorg-input-evdev/1:2.3.2-6. Request was from Julien Cristau <jcristau@debian.org> to control@bugs.debian.org. (Thu, 23 Dec 2010 19:03:06 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#607242; Package linux-2.6. (Thu, 23 Dec 2010 22:48:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jim Hill <gjthill@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Thu, 23 Dec 2010 22:48:03 GMT) Full text and rfc822 format available.

Message #82 received at 607242@bugs.debian.org (full text, mbox):

From: Jim Hill <gjthill@gmail.com>
Cc: shirish शिरीष <shirishag75@gmail.com>, 607242@bugs.debian.org
Subject: Re: Bug#607242: syslog shows messages from psmouse.c
Date: Thu, 23 Dec 2010 14:43:58 -0800
I made it stop on my squeeze beta 2.6.32 with a driver parameter change 
I found on the net.and played with to strip unnecessary stuff:

This-boot workaround:

$ sudo rmmod psmouse && sudo modprobe psmouse rate=80

Every-boot workaround:

$ sudo sh
# cat >> /etc/modprobe.d/psmouse.conf <<EOF
options psmouse rate=80
EOF
# exit

(info note: psmouse.conf didn't exist on my fresh install, I made it up)

The default rate in the source is 100, so backing off one step seems to 
have been enough to stop my desyncs and parity errors. I removed 
proto=imps from the net solution on the theory that if you're gaming 
you'll be fixing your hardware soonish and either way until you do a few 
ms responsiveness is a better sacrifice than features.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#607242; Package linux-2.6. (Fri, 24 Dec 2010 05:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to shirish शिरीष <shirishag75@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Fri, 24 Dec 2010 05:00:03 GMT) Full text and rfc822 format available.

Message #87 received at 607242@bugs.debian.org (full text, mbox):

From: shirish शिरीष <shirishag75@gmail.com>
To: Jim Hill <gjthill@gmail.com>
Cc: 607242@bugs.debian.org, jcristau@debian.org
Subject: Re: Bug#607242: syslog shows messages from psmouse.c
Date: Fri, 24 Dec 2010 10:27:51 +0530
In-line :-

On Fri, Dec 24, 2010 at 04:13, Jim Hill <gjthill@gmail.com> wrote:
> I made it stop on my squeeze beta 2.6.32 with a driver parameter change I
> found on the net.and played with to strip unnecessary stuff:

Hi Jim,
        Thank you for your work but I really don't know. Call me dumb
if you will but I don't know how and what the command does. Let's just
pass this to Julien so he can tell/share if its ok .

> This-boot workaround:
>
> $ sudo rmmod psmouse && sudo modprobe psmouse rate=80

The reason I said the above are two, the first part of the command is
rmmod and if nothing else would have been better to have the verbose
output stuck at the end.

From the man page http://linux.die.net/man/8/rmmod

Also you haven't mentioned what sort of output you got when you ran
that command.

I also saw the modprobe man page as well

http://linux.die.net/man/8/modprobe

One of the options seem to say possibility to view the configuration
file of the module.

-c --showconfig
Dump out the configuration file and exit

although the manpage isn't clear which configuration file it is going to be.

Even if I were interested to, I would require to know what was before
and after doing the above command what changes.

From the man-page it seems the modules live in /lib/modules/ . I am
going to see that and see if I can see/read the psmouse module or
atleast see if there is some place where the default rate 100 as you
say is.

I don't mind putting the mouse rate little bit slower if it stops the
desyncing.

> Every-boot workaround:
>
> $ sudo sh
> # cat >> /etc/modprobe.d/psmouse.conf <<EOF
> options psmouse rate=80
> EOF
> # exit
>
> (info note: psmouse.conf didn't exist on my fresh install, I made it up)
>
> The default rate in the source is 100, so backing off one step seems to have
> been enough to stop my desyncs and parity errors. I removed proto=imps from
> the net solution on the theory that if you're gaming you'll be fixing your
> hardware soonish and either way until you do a few ms responsiveness is a
> better sacrifice than features.

Cool in all, wait for Julien to respond, thank you again for your time
and hard work :)

-- 
          Regards,
          Shirish Agarwal  शिरीष अग्रवाल
  My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
065C 6D79 A68C E7EA 52B3  8D70 950D 53FB 729A 8B17




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#607242; Package linux-2.6. (Fri, 24 Dec 2010 23:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jim Hill <gjthill@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Fri, 24 Dec 2010 23:21:03 GMT) Full text and rfc822 format available.

Message #92 received at 607242@bugs.debian.org (full text, mbox):

From: Jim Hill <gjthill@gmail.com>
To: shirish शिरीष <shirishag75@gmail.com>
Cc: 607242@bugs.debian.org, jcristau@debian.org
Subject: Re: Bug#607242: syslog shows messages from psmouse.c
Date: Fri, 24 Dec 2010 15:18:51 -0800
For my part I'm certain of it: this is a failing mouse overloading
some part of the link. The mouse now misbehaves rarely  but  it's
plainly my middle mouse button sizzling briefly and everything
recovers fine, no desyncs or parity errors at all after I backed off
further  to rate=40.

shirish, if you'd rather not have your mouse driver unloaded however
briefly you can do

$ sudo sh
# echo 40 >/sys/module/psmouse/parameters/rate
# exit

and see if it doesn't do the same for you.  If it works, don't forget
to stick "options psmouse rate=40"" in /etc/modprobe.d/psmouse.conf
so it gets restored on reboot.  If you'd like to see for yourself what
that file does, do "man 5 modprobe.conf` at any shell prompt.

Merry Christmas, Happy New Year, all that good stuff.   :-)
Jim




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#607242; Package linux-2.6. (Mon, 27 Dec 2010 15:33:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jim Hill <gjthill@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Mon, 27 Dec 2010 15:33:06 GMT) Full text and rfc822 format available.

Message #97 received at 607242@bugs.debian.org (full text, mbox):

From: Jim Hill <gjthill@gmail.com>
To: 607242@bugs.debian.org
Subject: so much for certainty
Date: Mon, 27 Dec 2010 07:31:13 -0800
So much for certainty. I thought rate=40 fixed the desyncs and freezing 
but it's back, no more frequent, just the same as before.

The question remains what XP is doing different that the problem
doesn't occur there.  I can reboot into XP and it runs fine for much 
longer than it takes the problem to show up under squeeze.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#607242; Package linux-2.6. (Mon, 27 Dec 2010 15:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to shirish शिरीष <shirishag75@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Mon, 27 Dec 2010 15:45:02 GMT) Full text and rfc822 format available.

Message #102 received at 607242@bugs.debian.org (full text, mbox):

From: shirish शिरीष <shirishag75@gmail.com>
To: Jim Hill <gjthill@gmail.com>, 607242@bugs.debian.org
Subject: Re: Bug#607242: so much for certainty
Date: Mon, 27 Dec 2010 21:12:05 +0530
at bottom :-

On Mon, Dec 27, 2010 at 21:01, Jim Hill <gjthill@gmail.com> wrote:
> So much for certainty. I thought rate=40 fixed the desyncs and freezing but
> it's back, no more frequent, just the same as before.
>
> The question remains what XP is doing different that the problem
> doesn't occur there.  I can reboot into XP and it runs fine for much longer
> than it takes the problem to show up under squeeze.
>

concur with your observations.

-- 
          Regards,
          Shirish Agarwal  शिरीष अग्रवाल
  My quotes in this email licensed under CC 3.0
http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
065C 6D79 A68C E7EA 52B3  8D70 950D 53FB 729A 8B17




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#607242; Package linux-2.6. (Fri, 07 Jan 2011 10:00:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jim Hill <gjthill@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Fri, 07 Jan 2011 10:00:06 GMT) Full text and rfc822 format available.

Message #107 received at 607242@bugs.debian.org (full text, mbox):

From: Jim Hill <gjthill@gmail.com>
To: 607242@bugs.debian.org, shirish शिरीष <shirishag75@gmail.com>
Subject: [PATCH] psmouse: mitigate failing-mouse symptoms
Date: Fri, 07 Jan 2011 01:57:57 -0800
This kernel mouse driver patch fixes it.  Also submitted upstream.

Keep a failing ps/2 mouse usable until you can replace it conveniently.

It's a filter on incoming packets that makes a simple attempt at 
recovering from dropped bytes.  Controlled by /sys/module/psmouse/parameters/filter
set it to 0 to effectively disable the patch.

Tested on AMD64, full coverage - syslog is a good argument for
replacing my mouse soon, but it's quirky not intolerable.

Signed-off-by: Jim Hill <gjthill@gmail.com>

---

Hi, this is my first patch, I hope I got the procedures right, apologies in
advance if I goofed something.

Happy New Year and all,
Jim
---
 drivers/input/mouse/psmouse-base.c |  122 ++++++++++++++++++++++++++++++++++++
 drivers/input/mouse/psmouse.h      |    8 +++
 2 files changed, 130 insertions(+), 0 deletions(-)

diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index cd9d0c9..3664c68 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -69,6 +69,22 @@ static unsigned int psmouse_resync_time;
 module_param_named(resync_time, psmouse_resync_time, uint, 0644);
 MODULE_PARM_DESC(resync_time, "How long can mouse stay idle before forcing resync (in seconds, 0 = never).");
 
+enum {
+	DROP_BAD = 1,
+	SUMMARIZE_ERRORS = 2,
+	LOG_REJECTS = 4,
+	LOG_ALL	 = 8,
+	ATTEMPT_RECOVERY = 16,
+	DROP_CLAMPED = 32,
+	DROP_PACKET = DROP_CLAMPED | DROP_BAD
+};
+static unsigned int psmouse_filter = DROP_BAD | SUMMARIZE_ERRORS |
+						ATTEMPT_RECOVERY | DROP_CLAMPED;
+module_param_named(filter, psmouse_filter, uint, 0644);
+MODULE_PARM_DESC(filter, "1 = drop invalid or hotio packets, +2=summary-log, "
+		"+4=log-rejected, +8=log-all, +16=attempt-recovery, "
+		"+32=drop-clamped.");
+
 PSMOUSE_DEFINE_ATTR(protocol, S_IWUSR | S_IRUGO,
 			NULL,
 			psmouse_attr_show_protocol, psmouse_attr_set_protocol);
@@ -119,6 +135,99 @@ struct psmouse_protocol {
 	int (*init)(struct psmouse *);
 };
 
+static int psmouse_filter_packet(struct psmouse *m)
+{
+	int todo = 0;
+
+	int xoflow = m->packet[0]>>6 & 1;
+	int yoflow = m->packet[0]>>7 & 1;
+
+	if ((m->packet[0] & 0x08) != 0x08)
+		todo |= DROP_BAD + ATTEMPT_RECOVERY;
+	else if ((xoflow | yoflow) && psmouse_filter & DROP_CLAMPED)
+		todo |= DROP_CLAMPED;
+
+	if (todo & DROP_PACKET) {
+		todo |= LOG_REJECTS;
+		if (m->err_log_counter == 0)
+			m->err_log_base = m->last;
+		++m->err_log_counter;
+	}
+
+	if (time_after(m->last, m->interval_base + HZ/m->rate)) {
+		m->interval_pkts = 0;
+		m->interval_base = m->last;
+	}
+	if (m->interval_pkts > m->rate/HZ + 1) {
+		if (m->hotio_log_counter == 0)
+			m->hotio_log_base = m->last;
+		++m->hotio_log_counter;
+		todo |= DROP_BAD;
+	}
+	++m->interval_pkts;
+
+	if ((todo & psmouse_filter & LOG_REJECTS) |
+			(psmouse_filter & LOG_ALL)) {
+		unsigned long long packet = 0;
+		int p;
+		for (p = 0; p < m->pktcnt; ++p)
+			packet = packet<<8 | m->packet[p];
+		printk(KERN_INFO "psmouse.c: packet %0*llx%s\n", p*2, packet,
+				todo & DROP_BAD ? " rejected" : "");
+	}
+
+	if (m->err_log_counter && time_after(m->last, m->err_log_base + HZ) &&
+			psmouse_filter & (SUMMARIZE_ERRORS | LOG_ALL)) {
+		if (m->err_log_counter && psmouse_filter &
+				(SUMMARIZE_ERRORS | LOG_ALL)) {
+			printk(KERN_WARNING "psmouse.c: %s at %s "
+					"%lu rejected packets%s\n",
+					m->name, m->phys, m->err_log_counter,
+					psmouse_filter & ATTEMPT_RECOVERY ?
+						" recovery attempted" :
+					psmouse_filter & DROP_BAD ?
+						" ignored" :
+						"");
+		}
+		m->err_log_counter = 0;
+		m->err_log_base = 0;
+	}
+
+	if (m->hotio_log_counter && time_after(m->last, m->hotio_log_base + HZ)
+			&& psmouse_filter & (SUMMARIZE_ERRORS | LOG_ALL)) {
+		printk(KERN_WARNING "psmouse.c: %s at %s "
+				"%lu excess packets%s\n",
+				m->name, m->phys, m->hotio_log_counter,
+				psmouse_filter & DROP_BAD ?
+					" ignored" : "");
+		m->hotio_log_counter = 0;
+		m->hotio_log_base = 0;
+	}
+
+	/*
+	 * Take a flyer on recovery, works ok on dropped bytes. Work backwards
+	 * from end looking for a byte that could be a valid start-byte with
+	 * the same buttons down as the last valid packet.
+	 */
+	if (todo & psmouse_filter & ATTEMPT_RECOVERY) {
+		int p = m->pktcnt;
+		while (--p) {
+			if ((m->packet[p] & 0xcf) == m->last_mbstate) {
+				m->pktcnt -= p;
+				memmove(m->packet, m->packet+p, m->pktcnt);
+				return todo; /* <-- */
+			}
+		}
+		todo &= ~ATTEMPT_RECOVERY;
+	}
+
+	if (todo & psmouse_filter & DROP_PACKET)
+		return todo & psmouse_filter;
+	if (!(todo & DROP_PACKET))
+		m->last_mbstate = m->packet[0] & 0x0f;
+	return 0;
+}
+
 /*
  * psmouse_process_byte() analyzes the PS/2 data stream and reports
  * relevant events to the input module once full packet has arrived.
@@ -135,6 +244,13 @@ static psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse)
 /*
  * Full packet accumulated, process it
  */
+	{
+		int check = psmouse_filter_packet(psmouse);
+		if (check & ATTEMPT_RECOVERY)
+			return PSMOUSE_GOOD_DATA;
+		if (check & DROP_PACKET)
+			return PSMOUSE_FULL_PACKET;
+	}
 
 /*
  * Scroll wheel on IntelliMice, scroll buttons on NetMice
@@ -223,6 +339,12 @@ static inline void __psmouse_set_state(struct psmouse *psmouse, enum psmouse_sta
 	psmouse->pktcnt = psmouse->out_of_sync_cnt = 0;
 	psmouse->ps2dev.flags = 0;
 	psmouse->last = jiffies;
+	psmouse->err_log_base = 0;
+	psmouse->interval_base = 0;
+	psmouse->hotio_log_base = 0;
+	psmouse->err_log_counter = 0;
+	psmouse->interval_pkts = 0;
+	psmouse->hotio_log_counter = 0;
 }
 
 
diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h
index 593e910..9d90417 100644
--- a/drivers/input/mouse/psmouse.h
+++ b/drivers/input/mouse/psmouse.h
@@ -47,12 +47,19 @@ struct psmouse {
 	unsigned char pktcnt;
 	unsigned char pktsize;
 	unsigned char type;
+	unsigned char last_mbstate;
 	bool ignore_parity;
 	bool acks_disable_command;
 	unsigned int model;
 	unsigned long last;
 	unsigned long out_of_sync_cnt;
 	unsigned long num_resyncs;
+	unsigned long interval_base;
+	unsigned long interval_pkts;
+	unsigned long hotio_log_base;
+	unsigned long hotio_log_counter;
+	unsigned long err_log_base;
+	unsigned long err_log_counter;
 	enum psmouse_state state;
 	char devname[64];
 	char phys[32];
@@ -61,6 +68,7 @@ struct psmouse {
 	unsigned int resolution;
 	unsigned int resetafter;
 	unsigned int resync_time;
+
 	bool smartscroll;	/* Logitech only */
 
 	psmouse_ret_t (*protocol_handler)(struct psmouse *psmouse);
-- 
1.7.2.3





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#607242; Package linux-2.6. (Fri, 07 Jan 2011 13:24:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Fri, 07 Jan 2011 13:24:12 GMT) Full text and rfc822 format available.

Message #112 received at 607242@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: Jim Hill <gjthill@gmail.com>, 607242@bugs.debian.org
Subject: Re: Bug#607242: [PATCH] psmouse: mitigate failing-mouse symptoms
Date: Fri, 07 Jan 2011 13:23:51 +0000
[Message part 1 (text/plain, inline)]
On Fri, 2011-01-07 at 01:57 -0800, Jim Hill wrote:
> This kernel mouse driver patch fixes it.  Also submitted upstream.
> 
> Keep a failing ps/2 mouse usable until you can replace it conveniently.
> 
> It's a filter on incoming packets that makes a simple attempt at 
> recovering from dropped bytes.  Controlled by /sys/module/psmouse/parameters/filter
> set it to 0 to effectively disable the patch.
> 
> Tested on AMD64, full coverage - syslog is a good argument for
> replacing my mouse soon, but it's quirky not intolerable.
> 
> Signed-off-by: Jim Hill <gjthill@gmail.com>
> 
> ---
> 
> Hi, this is my first patch, I hope I got the procedures right, apologies in
> advance if I goofed something.
[...]

This needs to be submitted upstream first.

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#607242; Package linux-2.6. (Fri, 07 Jan 2011 13:45:26 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Fri, 07 Jan 2011 13:45:26 GMT) Full text and rfc822 format available.

Message #117 received at 607242@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: 607242@bugs.debian.org
Cc: Jim Hill <gjthill@gmail.com>
Subject: Re: Bug#607242: [PATCH] psmouse: mitigate failing-mouse symptoms
Date: Fri, 07 Jan 2011 13:41:54 +0000
[Message part 1 (text/plain, inline)]
On Fri, 2011-01-07 at 13:23 +0000, Ben Hutchings wrote:
> On Fri, 2011-01-07 at 01:57 -0800, Jim Hill wrote:
> > This kernel mouse driver patch fixes it.  Also submitted upstream.
[...]
> > Hi, this is my first patch, I hope I got the procedures right, apologies in
> > advance if I goofed something.
> [...]
> 
> This needs to be submitted upstream first.

Oh, yeah, I can read, really. :-)

Let us know if and when this is accepted upstream.

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#607242; Package linux-2.6. (Sun, 09 Jan 2011 22:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jim Hill <gjthill@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Sun, 09 Jan 2011 22:03:03 GMT) Full text and rfc822 format available.

Message #122 received at 607242@bugs.debian.org (full text, mbox):

From: Jim Hill <gjthill@gmail.com>
To: Alessandro Rubini <rubini@ipvvis.unipv.it>, Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, 607242@bugs.debian.org
Subject: [PATCH v2] psmouse: mitigate failing-mouse symptoms
Date: Sun, 09 Jan 2011 14:00:40 -0800
Keep a failing PS/2 mouse usable until it's convenient to replace it.
Filter incoming packets: drop invalid ones and attempt to correct for
dropped bytes.

New parameter 'filter' makes filtering and logging selectable, set to 0
to shut off all effects.

Tested on AMD64, full coverage. No one else has tried this yet.

Signed-off-by: Jim Hill <gjthill@gmail.com>

---

This is a second version, choosier about accepting apparently-valid
start bytes, no redundant test and more concise syslog and changelog
text.

This is my first patch, I hope I got the procedures right, apologies in
advance if I goofed something.

My mouse failed while in XP, but I didn't know it - it seemed it'd need
cleaning soon. On booting into Linux, it was dangerous, wild slews and
random clicks.  The difference was consistent, making it seem the
problem wasn't the mouse.

Jim
---
 drivers/input/mouse/psmouse-base.c |  108 ++++++++++++++++++++++++++++++++++++
 drivers/input/mouse/psmouse.h      |    7 ++
 2 files changed, 115 insertions(+), 0 deletions(-)

diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index cd9d0c9..f7421ea 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -69,6 +69,22 @@ static unsigned int psmouse_resync_time;
 module_param_named(resync_time, psmouse_resync_time, uint, 0644);
 MODULE_PARM_DESC(resync_time, "How long can mouse stay idle before forcing resync (in seconds, 0 = never).");
 
+enum {
+	DROP_BAD = 1,
+	SUMMARIZE_ERRORS = 2,
+	LOG_REJECTS = 4,
+	LOG_ALL	 = 8,
+	ATTEMPT_RECOVERY = 16,
+	DROP_CLAMPED = 32,
+	DROP_PACKET = DROP_CLAMPED | DROP_BAD
+};
+static unsigned int psmouse_filter = DROP_BAD | SUMMARIZE_ERRORS |
+						ATTEMPT_RECOVERY | DROP_CLAMPED;
+module_param_named(filter, psmouse_filter, uint, 0644);
+MODULE_PARM_DESC(filter, "1 = drop invalid or hotio packets, +2=summary-log, "
+		"+4=log-rejected, +8=log-all, +16=attempt-recovery, "
+		"+32=drop-clamped.");
+
 PSMOUSE_DEFINE_ATTR(protocol, S_IWUSR | S_IRUGO,
 			NULL,
 			psmouse_attr_show_protocol, psmouse_attr_set_protocol);
@@ -119,6 +135,85 @@ struct psmouse_protocol {
 	int (*init)(struct psmouse *);
 };
 
+static int psmouse_filter_packet(struct psmouse *m)
+{
+	int todo = 0;
+
+	int xoflow = m->packet[0]>>6 & 1;
+	int yoflow = m->packet[0]>>7 & 1;
+
+	if ((m->packet[0] & 0x08) != 0x08)
+		todo |= DROP_BAD + ATTEMPT_RECOVERY;
+	else if ((xoflow | yoflow) && psmouse_filter & DROP_CLAMPED)
+		todo |= DROP_CLAMPED;
+
+	if (todo & DROP_PACKET) {
+		todo |= LOG_REJECTS;
+		if (m->err_log_counter == 0)
+			m->err_log_base = m->last;
+		++m->err_log_counter;
+	}
+
+	if (time_after(m->last, m->interval_base + HZ/m->rate)) {
+		m->interval_pkts = 0;
+		m->interval_base = m->last;
+	}
+	if (m->interval_pkts > m->rate/HZ + 1) {
+		if (m->hotio_log_counter == 0)
+			m->hotio_log_base = m->last;
+		++m->hotio_log_counter;
+		todo |= DROP_BAD;
+	}
+	++m->interval_pkts;
+
+	if ((todo & psmouse_filter & LOG_REJECTS) |
+			(psmouse_filter & LOG_ALL)) {
+		unsigned long long packet = 0;
+		int p;
+		for (p = 0; p < m->pktcnt; ++p)
+			packet = packet<<8 | m->packet[p];
+		printk(KERN_INFO "psmouse.c: packet %0*llx%s\n", p*2, packet,
+				todo & DROP_PACKET ? " bad" : "");
+	}
+
+	if (m->err_log_counter && time_after(m->last, m->err_log_base + HZ) &&
+		psmouse_filter & (SUMMARIZE_ERRORS | LOG_ALL)) {
+		printk(KERN_WARNING "psmouse.c: %s at %s %lu bad packets\n",
+				m->name, m->phys, m->err_log_counter);
+		m->err_log_counter = m->err_log_base = 0;
+	}
+
+	if (m->hotio_log_counter && time_after(m->last, m->hotio_log_base + HZ)
+			&& psmouse_filter & (SUMMARIZE_ERRORS | LOG_ALL)) {
+		printk(KERN_WARNING "psmouse.c: %s at %s %lu excess packets\n",
+				m->name, m->phys, m->hotio_log_counter);
+		m->hotio_log_counter = m->hotio_log_base = 0;
+	}
+
+	/*
+	 * Take a flyer on recovery, works ok on dropped bytes. Work backwards
+	 * from end looking for a byte that could be a valid start-byte with
+	 * the same buttons down and general direction as the last good packet.
+	 */
+	if (todo & psmouse_filter & ATTEMPT_RECOVERY) {
+		int p = m->pktcnt;
+		while (--p) {
+			if (m->packet[p] == m->last_mbstate) {
+				m->pktcnt -= p;
+				memmove(m->packet, m->packet+p, m->pktcnt);
+				return todo; /* <-- */
+			}
+		}
+		todo &= ~ATTEMPT_RECOVERY;
+	}
+
+	if (todo & psmouse_filter & DROP_PACKET)
+		return todo & psmouse_filter;
+	if (!(todo & DROP_PACKET))
+		m->last_mbstate = m->packet[0] & 0x3f;
+	return 0;
+}
+
 /*
  * psmouse_process_byte() analyzes the PS/2 data stream and reports
  * relevant events to the input module once full packet has arrived.
@@ -135,6 +230,13 @@ static psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse)
 /*
  * Full packet accumulated, process it
  */
+	{
+		int check = psmouse_filter_packet(psmouse);
+		if (check & ATTEMPT_RECOVERY)
+			return PSMOUSE_GOOD_DATA;
+		if (check & DROP_PACKET)
+			return PSMOUSE_FULL_PACKET;
+	}
 
 /*
  * Scroll wheel on IntelliMice, scroll buttons on NetMice
@@ -223,6 +325,12 @@ static inline void __psmouse_set_state(struct psmouse *psmouse, enum psmouse_sta
 	psmouse->pktcnt = psmouse->out_of_sync_cnt = 0;
 	psmouse->ps2dev.flags = 0;
 	psmouse->last = jiffies;
+	psmouse->err_log_base = 0;
+	psmouse->interval_base = 0;
+	psmouse->hotio_log_base = 0;
+	psmouse->err_log_counter = 0;
+	psmouse->interval_pkts = 0;
+	psmouse->hotio_log_counter = 0;
 }
 
 
diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h
index 593e910..fc4a939 100644
--- a/drivers/input/mouse/psmouse.h
+++ b/drivers/input/mouse/psmouse.h
@@ -47,12 +47,19 @@ struct psmouse {
 	unsigned char pktcnt;
 	unsigned char pktsize;
 	unsigned char type;
+	unsigned char last_mbstate;
 	bool ignore_parity;
 	bool acks_disable_command;
 	unsigned int model;
 	unsigned long last;
 	unsigned long out_of_sync_cnt;
 	unsigned long num_resyncs;
+	unsigned long interval_base;
+	unsigned long interval_pkts;
+	unsigned long hotio_log_base;
+	unsigned long hotio_log_counter;
+	unsigned long err_log_base;
+	unsigned long err_log_counter;
 	enum psmouse_state state;
 	char devname[64];
 	char phys[32];
-- 
1.7.2.3





Changed Bug title to 'psmouse: work around dying mouse by dropping invalid packets (mouse jumping all over the place, many events without EV_SYN)' from 'xserver-xorg-input-all: my mouse behaves strangely. I get "dropping event due to full queue!" in my X.org.log' Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Sat, 26 Nov 2011 09:57:03 GMT) Full text and rfc822 format available.

Severity set to 'wishlist' from 'important' Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Sat, 26 Nov 2011 09:57:04 GMT) Full text and rfc822 format available.

Added tag(s) upstream. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Sat, 26 Nov 2011 09:57:05 GMT) Full text and rfc822 format available.

Set Bug forwarded-to-address to 'http://thread.gmane.org/gmane.linux.kernel.input/17591'. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Sat, 26 Nov 2011 09:57:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#607242; Package linux-2.6. (Sun, 30 Sep 2012 17:48:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Sun, 30 Sep 2012 17:48:03 GMT) Full text and rfc822 format available.

Message #135 received at 607242@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Jim Hill <gjthill@gmail.com>
Cc: Alessandro Rubini <rubini@ipvvis.unipv.it>, Dmitry Torokhov <dmitry.torokhov@gmail.com>, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, 607242@bugs.debian.org
Subject: Re: [PATCH v2] psmouse: mitigate failing-mouse symptoms
Date: Sun, 30 Sep 2012 10:43:53 -0700
Hi Jim,

In January, 2011, Jim Hill wrote:

> Keep a failing PS/2 mouse usable until it's convenient to replace it.
> Filter incoming packets: drop invalid ones and attempt to correct for
> dropped bytes.
>
> New parameter 'filter' makes filtering and logging selectable, set to 0
> to shut off all effects.
[...]
> My mouse failed while in XP, but I didn't know it - it seemed it'd need
> cleaning soon. On booting into Linux, it was dangerous, wild slews and
> random clicks.  The difference was consistent, making it seem the
> problem wasn't the mouse.

I think this would be less controversial if the run-time default were
to disable the feature.  Then if lots of people are setting the
parameter and the idea proves itself, the default could change, and in
the meantime, people with broken setups would know about the breakage
and get a chance to look for other problems.

What do you think?

Thanks for your work,
Jonathan



Removed tag(s) moreinfo. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Sun, 30 Sep 2012 17:48:07 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#607242; Package linux-2.6. (Sun, 30 Sep 2012 18:27:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alessandro Rubini <rubini@unipv.it>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Sun, 30 Sep 2012 18:27:06 GMT) Full text and rfc822 format available.

Message #142 received at 607242@bugs.debian.org (full text, mbox):

From: Alessandro Rubini <rubini@unipv.it>
To: jrnieder@gmail.com
Cc: gjthill@gmail.com, dmitry.torokhov@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, 607242@bugs.debian.org
Subject: Re: [PATCH v2] psmouse: mitigate failing-mouse symptoms
Date: Sun, 30 Sep 2012 20:02:40 +0200
> I think this would be less controversial if the run-time default were
> to disable the feature.

Yes, that's the common sensible path to new little-tested features.
As you say, it may become enabled by default over time.

Then, I think it would be good to have a specific sub-structure for
this stuff. It would allow this:

  +       psmouse->err_log_base = 0;
  +       psmouse->interval_base = 0;
  +       psmouse->hotio_log_base = 0;
  +       psmouse->err_log_counter = 0;
  +       psmouse->interval_pkts = 0;
  +       psmouse->hotio_log_counter = 0;

to be replaced with a memset. I also think it would make it clearer
what these are:

  +       unsigned long interval_base;
  +       unsigned long interval_pkts;
  +       unsigned long hotio_log_base;
  +       unsigned long hotio_log_counter;
  +       unsigned long err_log_base;
  +       unsigned long err_log_counter;

to the casual reader.

This is only a suggestion, though.

thanks
/alessandro



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Kernel Team <debian-kernel@lists.debian.org>:
Bug#607242; Package linux-2.6. (Wed, 03 Oct 2012 05:21:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jim Hill <gjthill@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Kernel Team <debian-kernel@lists.debian.org>. (Wed, 03 Oct 2012 05:21:05 GMT) Full text and rfc822 format available.

Message #147 received at 607242@bugs.debian.org (full text, mbox):

From: Jim Hill <gjthill@gmail.com>
To: Alessandro Rubini <rubini@unipv.it>
Cc: jrnieder@gmail.com, dmitry.torokhov@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, 607242@bugs.debian.org
Subject: Re: [PATCH v2] psmouse: mitigate failing-mouse symptoms
Date: Tue, 02 Oct 2012 22:19:42 -0700
On 09/30/2012 11:02 AM, Alessandro Rubini wrote:
>> I think this would be less controversial if the run-time default were
>> to disable the feature.
>
> Yes, that's the common sensible path

Fixed, there's no way I can test it well enough for anything more widespread.

> Then, I think it would be good to have a specific sub-structure for
> this stuff.

I don't care much either way, though I think I'm missing the point of subbing
in a memset -- only reason I can think of is efficiency which doesn't make
sense to me here.  Ask and I'll add one or both.

> I also think it would make it clearer what these are:

I did de-jargonize the names some,  "interval_start" for "base" makes it
clearer which as you say it could use.

I encountered one other person with this problem and he ran it for a long while
and was happy to have it.  I'm appending the latest version, which is a good
bit improved and what I've been running for the last year amended with the name
and default-filter changes above.

But of course I upgraded a month ago to a box with no PS/2 mouse port, so at
this point all I can do is hope someone finds it helpful.  The reorg'd code 
kinda highlights how incomplete it is, there's lots of mouse models out there.

So if it looks good or almost-good to you and there's anything else I can do,
tell me and I'll be glad to do it.

Thanks,
Jim

From 2681957a610191cb5d7b7f65be11ea2be06df00f Mon Sep 17 00:00:00 2001
From: Jim Hill <gjthill@gmail.com>
Date: Mon, 28 Mar 2011 13:10:36 -0700
Subject: [PATCH]     Input: psmouse - further improve error handling for
 basic protocols

  Keep a failing PS/2 mouse usable until it's convenient to replace it.
  Filter incoming packets: drop invalid ones and attempt to correct for
  dropped bytes.
 
  New parameter 'filter' makes filtering and logging selectable, leave at 0
  to shut off all effects, 3 to work silently.
--
 drivers/input/mouse/psmouse-base.c | 197 +++++++++++++++++++++++++++++++++++++
 drivers/input/mouse/psmouse.h      |   7 ++
 2 files changed, 204 insertions(+)

diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mous/psmouse-base.c
index 22fe254..4a3a95f 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -72,6 +72,25 @@ static unsigned int psmouse_resync_time;
 module_param_named(resync_time, psmouse_resync_time, uint, 0644);
 MODULE_PARM_DESC(resync_time, "How long can mouse stay idle before forcing resync (in seconds, 0 = never).");

+enum {
+	DROP_BAD_PACKET = 1,
+	ATTEMPT_SYNC = 2,
+	LOG_SUMMARIES = 4,
+	LOG_MALFORMED = 8,
+	LOG_ALL	 = 16,
+	REPORT_SYNC_FAILURE = 32,
+
+	DEFAULT_FILTER = 0
+};
+static int psmouse_filter = DEFAULT_FILTER;
+module_param_named(filter, psmouse_filter, int, 0644);
+MODULE_PARM_DESC(filter, "1 = drop invalid or hotio packets"
+		", +2 = attempt-sync"
+		", +4 = summary logs"
+		", +8 = log-malformed"
+		",+16 = log-all"
+		",+32 = use hard resets");
+
 PSMOUSE_DEFINE_ATTR(protocol, S_IWUSR | S_IRUGO,
 			NULL,
 			psmouse_attr_show_protocol, psmouse_attr_set_protocol);
@@ -123,6 +142,169 @@ struct psmouse_protocol {
 };

 /*
+ * psmouse_filter_*: diagnose bad data, recover what we can, drop the rest, log
+ * selected events. See input_report_*()s in psmouse_process_byte below, and
+ * <http://www.computer-engineering.org/ps2mouse/>
+ */
+
+static int psmouse_filter_header_byte(enum psmouse_type type, int byte)
+{
+	int todo = 0;
+	if ((byte & 0xc0) &&
+			type != PSMOUSE_THINKPS &&
+			type != PSMOUSE_GENPS)
+		todo |= DROP_BAD_PACKET+ATTEMPT_SYNC;
+	if ((byte & 0x08) == 0 &&
+			type != PSMOUSE_THINKPS &&
+			type != PSMOUSE_CORTRON)
+		todo |= DROP_BAD_PACKET+ATTEMPT_SYNC;
+	return todo;
+}
+
+static int psmouse_filter_wheel_byte(enum psmouse_type type, int byte)
+{
+	int todo = 0;
+	if (type == PSMOUSE_IMPS || type == PSMOUSE_GENPS)
+		if (abs(byte) > 3)
+			todo = DROP_BAD_PACKET+ATTEMPT_SYNC;
+	if (type == PSMOUSE_IMEX)
+		if (((byte&0xC0) == 0) || ((byte&0XC0) == 0xC0))
+			if (abs((byte&0x08)-(byte&0x07)) > 3)
+				todo = DROP_BAD_PACKET+ATTEMPT_SYNC;
+	return todo;
+}
+
+static int psmouse_filter_motion(struct psmouse *m)
+{	/*
+	 * Hunt for implausible accelerations here if it ever seems necessary.
+	 * Header/wheel sniffing seems to detect everything recoverable so far.
+	 */
+	return 0;
+}
+
+static int psmouse_filter_hotio(struct psmouse *m)
+{
+	int ret = 0;
+	if (time_after(m->last, m->hotio_interval_start + HZ/m->rate)) {
+		m->hotio_interval_pkts = 0;
+		m->hotio_interval_start = m->last;
+	}
+	if (m->hotio_interval_pkts++ > m->rate/HZ + 1) {
+		if (m->hotio_log_counter == 0)
+			m->hotio_log_interval_start = m->last;
+		++m->hotio_log_counter;
+		ret = DROP_BAD_PACKET;
+	}
+	return ret;
+}
+
+static void psmouse_filter_packet_logger(struct psmouse *m, int todo,
+		const char *tag)
+{
+	if ((todo & psmouse_filter & LOG_MALFORMED) ||
+			(psmouse_filter & LOG_ALL)) {
+		unsigned long long packet = 0;
+		int p;
+		for (p = 0; p < m->pktcnt; ++p)
+			packet = packet<<8 | m->packet[p];
+		printk(KERN_INFO "psmouse.c: packet %0*llx%s\n", p*2, packet,
+			tag ? tag : "");
+	}
+}
+
+static int psmouse_filter_inspect_packet(struct psmouse *m)
+{
+	int todo = 0;
+	todo |= psmouse_filter_header_byte(m->type, m->packet[0]);
+	todo |= psmouse_filter_motion(m);
+	todo |= psmouse_filter_wheel_byte(m->type, (signed char)m->packet[3]);
+	if (todo & DROP_BAD_PACKET) {
+		todo |= LOG_MALFORMED;
+		if (m->err_log_counter == 0)
+			m->err_log_interval_start = m->last;
+		++m->err_log_counter;
+	}
+	return todo;
+}
+
+/*
+ * find-sync: if the mouse dropped one or more bytes the next packet start
+ * byte's almost certainly in this buffer. Return its offset if we can find it.
+ */
+static unsigned psmouse_filter_find_sync(struct psmouse *m)
+{
+	int p;
+
+	/* same buttons, same general direction as last report? Seems best */
+	for (p = m->pktcnt; --p ; )
+		if (m->packet[p] == m->last_good_packet[0])
+			return p;
+
+	/* same or no buttons, plausible direction from what we can see? */
+	for (p = m->pktcnt; --p ; ) {
+		signed char test0 = (signed char)m->packet[p];
+		signed char last0 = (signed char)m->last_good_packet[0];
+		signed char test1 = (signed char)m->packet[(p+1)%m->pktcnt];
+		signed char test2 = (signed char)m->packet[(p+2)%m->pktcnt];
+		if (((test0&7) == 0 || (test0&7) == (last0&7)) &&
+				(test0>>4&1) == (test1>>7&1) &&
+				(test0>>5&1) == (test2>>7&1) &&
+				!psmouse_filter_header_byte(m->type, test0))
+			return p;
+	}
+	/* nothing looks good */
+	return 0;
+}
+
+static void psmouse_filter_write_summary_logs(struct psmouse *m)
+{
+	if (m->err_log_counter && time_after(m->last, m->err_log_interval_start+HZ)) {
+		printk(KERN_WARNING "psmouse.c: %s at %s %lu bad packets\n",
+				m->name, m->phys, m->err_log_counter);
+		m->err_log_counter = m->err_log_interval_start = 0;
+	}
+	if (m->hotio_log_counter && time_after(m->last, m->hotio_log_interval_start+HZ)) {
+		printk(KERN_WARNING "psmouse.c: %s at %s %lu excess packets\n",
+				m->name, m->phys, m->hotio_log_counter);
+		m->hotio_log_counter = m->hotio_log_interval_start = 0;
+	}
+}
+
+static int psmouse_filter_packet(struct psmouse *m)
+{
+	int todo;
+
+	if (psmouse_filter < 0)
+		psmouse_filter = DEFAULT_FILTER;
+
+	todo = psmouse_filter_inspect_packet(m);
+
+	if (!(todo & DROP_BAD_PACKET))
+		todo |= psmouse_filter_hotio(m);
+
+	psmouse_filter_packet_logger(m, todo, todo&LOG_MALFORMED ? " bad" : 0);
+	if (psmouse_filter & (LOG_SUMMARIES | LOG_ALL))
+		psmouse_filter_write_summary_logs(m);
+
+	if (todo & psmouse_filter & ATTEMPT_SYNC) {
+		unsigned p = psmouse_filter_find_sync(m);
+		if (p) {
+			m->pktcnt -= p;
+			memmove(m->packet, m->packet+p, m->pktcnt);
+			psmouse_filter_packet_logger(m, todo, " sync");
+		} else {
+			todo |= REPORT_SYNC_FAILURE;
+			todo &= ~ATTEMPT_SYNC;
+		}
+	}
+
+	if (!(todo & DROP_BAD_PACKET))
+		memcpy(m->last_good_packet, m->packet, sizeof m->packet);
+
+	return todo & psmouse_filter;
+}
+
+/*
  * psmouse_process_byte() analyzes the PS/2 data stream and reports
  * relevant events to the input module once full packet has arrived.
  */
@@ -135,6 +317,15 @@ psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse)
 	if (psmouse->pktcnt < psmouse->pktsize)
 		return PSMOUSE_GOOD_DATA;

+	{
+		int filter = psmouse_filter_packet(psmouse);
+		if (filter & ATTEMPT_SYNC)
+			return PSMOUSE_GOOD_DATA;
+		if (filter & REPORT_SYNC_FAILURE)
+			return PSMOUSE_BAD_DATA;
+		if (filter & DROP_BAD_PACKET)
+			return PSMOUSE_FULL_PACKET;
+	}
 /*
  * Full packet accumulated, process it
  */
@@ -226,6 +417,12 @@ static inline void __psmouse_set_state(struct psmouse *psmouse, enum psmouse_sta
 	psmouse->pktcnt = psmouse->out_of_sync_cnt = 0;
 	psmouse->ps2dev.flags = 0;
 	psmouse->last = jiffies;
+	psmouse->err_log_interval_start = 0;
+	psmouse->err_log_counter = 0;
+	psmouse->hotio_interval_start = 0;
+	psmouse->hotio_interval_pkts = 0;
+	psmouse->hotio_log_interval_start = 0;
+	psmouse->hotio_log_counter = 0;
 }


diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h
index fe1df23..7d8817e7 100644
--- a/drivers/input/mouse/psmouse.h
+++ b/drivers/input/mouse/psmouse.h
@@ -44,6 +44,7 @@ struct psmouse {
 	char *vendor;
 	char *name;
 	unsigned char packet[8];
+	unsigned char last_good_packet[8];
 	unsigned char badbyte;
 	unsigned char pktcnt;
 	unsigned char pktsize;
@@ -54,6 +55,12 @@ struct psmouse {
 	unsigned long last;
 	unsigned long out_of_sync_cnt;
 	unsigned long num_resyncs;
+	unsigned long hotio_interval_start;
+	unsigned long hotio_interval_pkts;
+	unsigned long hotio_log_interval_start;
+	unsigned long hotio_log_counter;
+	unsigned long err_log_interval_start;
+	unsigned long err_log_counter;
 	enum psmouse_state state;
 	char devname[64];
 	char phys[32];
-- 
1.7.11.rc2.220.g2b5a256




Reply sent to Moritz Muehlenhoff <jmm@inutil.org>:
You have taken responsibility. (Mon, 15 Jul 2013 15:36:29 GMT) Full text and rfc822 format available.

Notification sent to shirish शिरीष <shirishag75@gmail.com>:
Bug acknowledged by developer. (Mon, 15 Jul 2013 15:36:29 GMT) Full text and rfc822 format available.

Message #152 received at 607242-done@bugs.debian.org (full text, mbox):

From: Moritz Muehlenhoff <jmm@inutil.org>
To: Jim Hill <gjthill@gmail.com>
Cc: 607242-done@bugs.debian.org
Subject: Re: [PATCH v2] psmouse: mitigate failing-mouse symptoms
Date: Mon, 15 Jul 2013 17:30:28 +0200
On Tue, Oct 02, 2012 at 10:19:42PM -0700, Jim Hill wrote:
> On 09/30/2012 11:02 AM, Alessandro Rubini wrote:
> >> I think this would be less controversial if the run-time default were
> >> to disable the feature.
> >
> > Yes, that's the common sensible path
> 
> Fixed, there's no way I can test it well enough for anything more widespread.

Your patch wasn't merged upstream and I don't think it would if you repush
for a merge, such workarounds for broken are better addressed by replacing
faulty hardware.

Closing, since we don't carry changes not merged upstream.

Cheers,
        Moritz



Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 13 Aug 2013 07:31:12 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 07:48:26 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.