From: Gunther.Mayer@t-online.de (Gunther Mayer)
To: linas@linas.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: mouse problems in 2.4.2 -> lost byte
Date: Tue, 27 Mar 2001 22:15:17 +0200 [thread overview]
Message-ID: <3AC0F4D5.9E45E60C@t-online.de> (raw)
In-Reply-To: <20010325223358.71E5F1B7A4@backlot.linas.org>
[-- Attachment #1: Type: text/plain, Size: 1687 bytes --]
linas@linas.org wrote:
>
> I am experiencing debilitating intermittent mouse problems & was about
...
> Symptoms:
> After a long time of flawless operation (ranging from nearly a week to
> as little as five minutes), the X11 pointer flies up to top-right corner,
^^^^^^^^^^^^^^^^
> and mostly wants to stay there. Moving the mouse causes a cascade of
> spurious button-press events get generated.
This is easily explained: some byte of the mouse protocol was lost.
(Some mouse protocols are even designed to allow
easy resync/recovery by fixed bit patterns!)
Write an intelligent mouse driver for XFree86 to compensate for
lost bytes.
Regards, Gunther
APPENDIX
========
Output ot litte test program:
> a.out
Simulating 1 lost byte
1 -- ff 00 08 --- -256 : -248 Buttons=MRL Overflow/errors:XY
2 -- 00 04 08 --- 4 : 8 Buttons= Overflow/errors: T
3 -- 00 04 08 --- 4 : 8 Buttons= Overflow/errors: T
4 -- 00 03 08 --- 3 : 8 Buttons= Overflow/errors: T
5 -- 00 03 18 --- 3 : 24 Buttons= Overflow/errors: T
6 -- ff 02 08 --- -254 : -248 Buttons=MRL Overflow/errors:XY
7 -- 00 02 08 --- 2 : 8 Buttons= Overflow/errors: T
8 -- 00 03 18 --- 3 : 24 Buttons= Overflow/errors: T
9 -- ff 03 18 --- -253 : -232 Buttons=MRL Overflow/errors:XY
10 -- ff 03 08 --- -253 : -248 Buttons=MRL Overflow/errors:XY
...
Probably XFree ignores data packets with XY overflow set. All other
packets move you to top-right corner.
Moving your mouse will quickly show button mania, as described by your post.
[-- Attachment #2: gm_psauxprint.c --]
[-- Type: application/octet-stream, Size: 771 bytes --]
// show effects of lost bytes on ps/2 mouse protocol
#include <stdio.h>
#include <errno.h>
int main(void)
{
FILE *f;
int i=0,x,a,y, xo,yo,xs,ys,r,m,l,t,dx,dy;
f=fopen("/dev/psaux","r");
if(f==NULL) strerror(errno);
//printf("Simulating 2 lost bytes\n");
//a=fgetc(f); a=fgetc(f);
printf("Simulating 1 lost byte\n");
a=fgetc(f);
while (1) {
a=fgetc(f);
x=fgetc(f);
y=fgetc(f);
i++;
printf("%5d -- %02x %02x %02x",i,a,x,y);
yo=a&0x80;
xo=a&0x40;
ys=a&0x20;
xs=a&0x10;
t=a&0x08;
m=a&0x04;
r=a&0x02;
l=a&0x01;
dx=x;
dy=y;
if(xs) dx=x-256;
if(ys) dy=y-256;
printf(" --- %4d : %4d Buttons=%s%s%s Overflow/errors:%s%s%s\n",
dx,dy,m?"M":" ", r?"R":" ", l?"L":" ",
xo?"X":" ", yo?"Y":" ", t?" ":"T");
}
return 0;
}
next prev parent reply other threads:[~2001-03-27 20:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-25 22:33 mouse problems in 2.4.2 linas
2001-03-26 0:27 ` Stephen Satchell
2001-03-26 0:47 ` Keith Owens
2001-03-26 3:22 ` linas
2001-03-27 20:15 ` Gunther Mayer [this message]
2001-03-27 20:45 ` mouse problems in 2.4.2 -> lost byte linas
2001-03-28 18:31 ` Gunther Mayer
2001-03-28 21:59 ` Vojtech Pavlik
2001-03-28 23:19 ` linas
2001-03-29 5:45 ` Vojtech Pavlik
2001-04-08 20:23 ` mouse problems in 2.4.2 -> lost byte -> Patch(2.4.3)! Gunther Mayer
-- strict thread matches above, loose matches on Subject: below --
2001-03-27 20:29 mouse problems in 2.4.2 -> lost byte James Simmons
2001-03-27 20:48 ` Gunther Mayer
2001-03-27 20:50 ` linas
2001-03-28 15:22 James Simmons
2001-03-28 15:32 James Simmons
2001-03-28 18:21 ` Gunther Mayer
2001-03-29 3:47 James Simmons
2001-03-29 4:43 James Simmons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3AC0F4D5.9E45E60C@t-online.de \
--to=gunther.mayer@t-online.de \
--cc=linas@linas.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox