Original Problem: PS/2 mouse pointer goes upper right corner and stays there.
Diagnosis: one byte was lost and this is fatal for the mouse driver.
Various people wrote:
>
> On Wed, Mar 28, 2001 at 05:19:33PM -0600, linas@linas.org wrote:
..
> > > > > > > I am experiencing debilitating intermittent mouse problems & was about
> > > > > >
> > > > > > This is easily explained: some byte of the mouse protocol was lost.
>
> Plus, it's very likely the new PS/2 code will break on some systems that
> have not-so-compatible i8042 chips, so it is really something that can't
Losing bytes on psaux is a bug!
We must first understand, how bytes can be lost (most probable first):
- transmission error on the line can easily happen in noisy environments
and is _not_ handled correctly by linux (i.e. should do RESEND)
- 0xAA is always handled as reconnect, if the mouse generates this byte,
Linux will de-sync the mouse driver
- Mouse is defective or keyboard controller defective
- An error in the linux kbd/mouse driver (e.g. triggered by X11<->console switching)
This patch printk's necessary information on the first 2 cases and
should be applied to the stable kernel, as this will help to resolve a severe bug !
Regards, Gunther
P.S.
These messages can be generated:
Apr 8 21:49:23 linux kernel: psaux: reconnect 0xAA detected
Apr 8 21:49:42 linux kernel: pc_keyb: mouse error (0x75), byte ignored(ff).
Apr 8 21:49:43 linux kernel: psaux: reconnect 0xAA detected
--- linux-2.4.3-orig/drivers/char/pc_keyb.c Wed Apr 4 19:46:42 2001
+++ linux/drivers/char/pc_keyb.c Sun Apr 8 21:45:37 2001
@@ -404,6 +404,11 @@
mouse_reply_expected = 0;
}
else if(scancode == AUX_RECONNECT){
+ // Under normal operation most mice don't generate 0xAA.
+ // But, Other devices might be unusable with this policy.
+ // (My mouse easily generates 0xAAs on rapid movements,
+ // when set to 10 samples/sec.)
+ printk("psaux: reconnect detected(0xaa), sending AUX_ENABLE.\n");
queue->head = queue->tail = 0; /* Flush input queue */
__aux_write_ack(AUX_ENABLE_DEV); /* ping the mouse :) */
return;
@@ -420,6 +425,9 @@
kill_fasync(&queue->fasync, SIGIO, POLL_IN);
wake_up_interruptible(&queue->proc_list);
}
+ else
+ // 2K buffer is enough for about 10 sec under normal operations, here.
+ printk("psaux: buffer overflow, byte dropped.\n");
}
#endif
}
@@ -465,6 +473,11 @@
else
handle_keyboard_event(scancode);
}
+ else
+ // Fixme: Ignoring bytes will de-sync mouse protocol.
+ printk("pc_keyb: %s error (0x%02x), byte ignored(%02x).\n",
+ (status & KBD_STAT_MOUSE_OBF)?"mouse":"kbd",status,scancode);
+
status = kbd_read_status();
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Apr 15 2001 - 21:00:10 EST