mouse issues in 2.6.15-rc5-mm series
[Note: please cc me on answers since I'm not subscribed to the kernel list]
I am experiencing problems with mouse resyncing in the -mm series. This is a Logitech wheel mouse connected through a KVM.
Symptom: whenever the mouse isn't moved for some seconds, it doesn't react to movement for a second, and then resyncs. Sometimes, the resyncing results in the mouse pointer jumping, which as far as I know is a protocol mismatch.
While searching for reports of similar problems, I came across Frank Sorenson's post from Nov. 23 (http://lkml.org/lkml/2005/11/23/533).
Like in his case, reverting input-attempt-to-re-synchronize-mouse-every-5-seconds.patch resulted in a kernel without this problem.
-Joe
Quoted 14 lines · Joe Feise
[Note: please cc me on answers since I'm not subscribed to the kernel list]
I am experiencing problems with mouse resyncing in the -mm series. This is a Logitech wheel mouse connected through a KVM.
Symptom: whenever the mouse isn't moved for some seconds, it doesn't react to movement for a second, and then resyncs. Sometimes, the resyncing results in the mouse pointer jumping, which as far as I know is a protocol mismatch.
While searching for reports of similar problems, I came across Frank Sorenson's post from Nov. 23 (http://lkml.org/lkml/2005/11/23/533).
Like in his case, reverting input-attempt-to-re-synchronize-mouse-every-5-seconds.patch resulted in a kernel without this problem.
Quoted 1 line
-Joe
Hi Joe,
read these ones:
http://lkml.org/lkml/2005/11/18/152
http://www.uwsg.iu.edu/hypermail/linux/kernel/0511.3/0019.html
Maybe they help you out.
I didn't get it working in the rc5 -mm tree so far. But non -mm work as good as they always did.
Marc
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 17 lines · Marc Koschewski
Quoted 14 lines · Joe Feise
[Note: please cc me on answers since I'm not subscribed to the kernel list]
I am experiencing problems with mouse resyncing in the -mm series. This is a Logitech wheel mouse connected through a KVM.
Symptom: whenever the mouse isn't moved for some seconds, it doesn't react to movement for a second, and then resyncs. Sometimes, the resyncing results in the mouse pointer jumping, which as far as I know is a protocol mismatch.
While searching for reports of similar problems, I came across Frank Sorenson's post from Nov. 23 (http://lkml.org/lkml/2005/11/23/533).
Like in his case, reverting input-attempt-to-re-synchronize-mouse-every-5-seconds.patch resulted in a kernel without this problem.
Quoted 1 line
Quoted 1 line
-Joe
Joe,
I continue to see the same issues with the resync patch in -mm. For me, tapping stops working, and I'm now seeing both the mouse pointer jumping
as well (a lesser issue for me, so it was probably present earlier as
well).
I switched to using the synaptics X driver as recommended by Dmitry Torokhov (http://lkml.org/lkml/2005/11/25/130), and that has worked splendidly for me. However, that's really just a band-aid, and I'd be happier with a working resync patch.
Quoted 11 lines
Hi Joe,
read these ones:
http://lkml.org/lkml/2005/11/18/152
http://www.uwsg.iu.edu/hypermail/linux/kernel/0511.3/0019.htmlMaybe they help you out.
I didn't get it working in the rc5 -mm tree so far. But non -mm work as good as they always did.
Same issue for me as well.
Frank
- --
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department Brigham Young University
[email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFDrSmmaI0dwg4A47wRAidbAJ9rR7ZtgavKNw1aEamcdZ8Br/27GwCdEQcc JHP9CL6TTlbhYm8kyzeXH+w=
=w3cG
-----END PGP SIGNATURE-----
Quoted 14 lines · Joe Feise
[Note: please cc me on answers since I'm not subscribed to the kernel list]
I am experiencing problems with mouse resyncing in the -mm series. This is a Logitech wheel mouse connected through a KVM.
Symptom: whenever the mouse isn't moved for some seconds, it doesn't react to movement for a second, and then resyncs. Sometimes, the resyncing results in the mouse pointer jumping, which as far as I know is a protocol mismatch.
While searching for reports of similar problems, I came across Frank Sorenson's post from Nov. 23 (http://lkml.org/lkml/2005/11/23/533).
Like in his case, reverting input-attempt-to-re-synchronize-mouse-every-5-seconds.patch resulted in a kernel without this problem.
Joe,
Instead of reverting input-attempt-to-re-synchronize-mouse-every-5-seconds patch could youplease drop the patch below on top of -mm.
Jet me know if your mouse stays synchronized. Thanks!
Signature · 32 lines
Dmitry drivers/input/mouse/psmouse-base.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) Index: linux/drivers/input/mouse/psmouse-base.c =================================================================== --- linux.orig/drivers/input/mouse/psmouse-base.c +++ linux/drivers/input/mouse/psmouse-base.c @@ -1029,6 +1029,23 @@ static int psmouse_switch_protocol(struc else psmouse->type = psmouse_extensions(psmouse, psmouse_max_proto, 1); + /* + * If mouse's packet size is 3 there is no point in polling the + * device in hopes to detect protocol reset - we won't get less + * than 3 bytes response anyhow. + */ + if (psmouse->pktsize == 3) + psmouse->resync_time = 0; + + /* + * Some smart KVMs fake response to POLL command returning just + * 3 bytes and messing up our resync logic, so if initial poll + * fails we won't try polling the device anymore. Hopefully + * such KVM will maintain initially selected protocol. + */ + if (psmouse->resync_time && psmouse->poll(psmouse)) + psmouse->resync_time = 0; + sprintf(psmouse->devname, "%s %s %s", psmouse_protocol_by_type(psmouse->type)->name, psmouse->vendor, psmouse->name);
Dmitry Torokhov wrote on 12/24/05 09:56:
Quoted 16 lines · Joe Feise
Quoted 14 lines
[Note: please cc me on answers since I'm not subscribed to the kernel list]
I am experiencing problems with mouse resyncing in the -mm series. This is a Logitech wheel mouse connected through a KVM.
Symptom: whenever the mouse isn't moved for some seconds, it doesn't react to movement for a second, and then resyncs. Sometimes, the resyncing results in the mouse pointer jumping, which as far as I know is a protocol mismatch.
While searching for reports of similar problems, I came across Frank Sorenson's post from Nov. 23 (http://lkml.org/lkml/2005/11/23/533).
Like in his case, reverting input-attempt-to-re-synchronize-mouse-every-5-seconds.patch resulted in a kernel without this problem.
Quoted 7 lines
Joe,
Instead of reverting input-attempt-to-re-synchronize-mouse-every-5-seconds patch could youplease drop the patch below on top of -mm.
Jet me know if your mouse stays synchronized. Thanks!
Dmitry,
thanks, that patch works. The mouse stays synchronized.
-Joe
Quoted 6 lines · Frank Sorenson
I continue to see the same issues with the resync patch in -mm. For me, tapping stops working, and I'm now seeing both the mouse pointer jumping
as well (a lesser issue for me, so it was probably present earlier as
well).
Frank,
Does the tapping not work period or it only does not work first time you try to tap after not touching the pad for more than 5 seconds?
Signature · 1 line
Dmitry
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 8 lines · Dmitry Torokhov
Quoted 5 lines · Frank Sorenson
I continue to see the same issues with the resync patch in -mm. For me, tapping stops working, and I'm now seeing both the mouse pointer jumping as well (a lesser issue for me, so it was probably present earlier as well).
Quoted 4 lines
Frank,
Does the tapping not work period or it only does not work first time you try to tap after not touching the pad for more than 5 seconds?
The tapping works initially, then stops. I hadn't put 2+2 together with the 5-second idle bit, but that seems the likely issue.
I applied that patch you sent out yesterday, and now tapping works and I'm not seeing the mouse stall/jump problem. I'm at 21+ hours uptime now, with no mouse problems, so I think setting the resync_time to 0 looks like the right fix.
Thanks,
Frank
- --
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department Brigham Young University
[email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFDr3QuaI0dwg4A47wRApTrAKCznvvBq5lX66VPggjP6KTtbFQdDgCgmrhs x+90pceDtoWznfjy6kBGaAs=
=e2Xa
-----END PGP SIGNATURE-----
Quoted 14 lines · Frank Sorenson
Quoted 8 lines · Dmitry Torokhov
Quoted 5 lines · Frank Sorenson
I continue to see the same issues with the resync patch in -mm. For me, tapping stops working, and I'm now seeing both the mouse pointer jumping as well (a lesser issue for me, so it was probably present earlier as well).
Quoted 4 lines
Frank,
Does the tapping not work period or it only does not work first time you try to tap after not touching the pad for more than 5 seconds?
Quoted 8 lines
The tapping works initially, then stops. I hadn't put 2+2 together with the 5-second idle bit, but that seems the likely issue.
I applied that patch you sent out yesterday, and now tapping works and I'm not seeing the mouse stall/jump problem. I'm at 21+ hours uptime now, with no mouse problems, so I think setting the
resync_timeto 0 looks like the right fix.
Well, no, that's a band-aid ;) There are still touchpads speaking 4-byte protocols so I still need to adjust resync code to work with tapping.
Signature · 1 line
Dmitry
Quoted 14 lines · Frank Sorenson
Quoted 8 lines · Dmitry Torokhov
Quoted 5 lines · Frank Sorenson
I continue to see the same issues with the resync patch in -mm. For me, tapping stops working, and I'm now seeing both the mouse pointer jumping as well (a lesser issue for me, so it was probably present earlier as well).
Quoted 4 lines
Frank,
Does the tapping not work period or it only does not work first time you try to tap after not touching the pad for more than 5 seconds?
Quoted 8 lines
The tapping works initially, then stops. I hadn't put 2+2 together with the 5-second idle bit, but that seems the likely issue.
I applied that patch you sent out yesterday, and now tapping works and I'm not seeing the mouse stall/jump problem. I'm at 21+ hours uptime now, with no mouse problems, so I think setting the
resync_timeto 0 looks like the right fix.
Frank,
Could you please try the patch below and see if it makes tapping work? Make sure you enable resynching by doing:
echo -n 5 > /sys/bus/serio/devices/serioX/resync_time
Thanks!
Signature · 82 lines
Dmitry Signed-off-by: Dmitry Torokhov <[email protected]> --- drivers/input/mouse/alps.c | 11 ++++++----- drivers/input/mouse/psmouse-base.c | 27 ++++++++++++++++++++++++--- 2 files changed, 30 insertions(+), 8 deletions(-) Index: work/drivers/input/mouse/alps.c =================================================================== --- work.orig/drivers/input/mouse/alps.c +++ work/drivers/input/mouse/alps.c @@ -356,19 +356,20 @@ static int alps_poll(struct psmouse *psm { struct alps_data *priv = psmouse->private; unsigned char buf[6]; + int poll_failed; if (priv->i->flags & ALPS_PASS) alps_passthrough_mode(psmouse, 1); - if (ps2_command(&psmouse->ps2dev, buf, PSMOUSE_CMD_POLL | (psmouse->pktsize << 8))) - return -1; - - if ((buf[0] & priv->i->mask0) != priv->i->byte0) - return -1; + poll_failed = ps2_command(&psmouse->ps2dev, buf, + PSMOUSE_CMD_POLL | (psmouse->pktsize << 8)) < 0; if (priv->i->flags & ALPS_PASS) alps_passthrough_mode(psmouse, 0); + if (poll_failed || (buf[0] & priv->i->mask0) != priv->i->byte0) + return -1; + if ((psmouse->badbyte & 0xc8) == 0x08) { /* * Poll the track stick ... Index: work/drivers/input/mouse/psmouse-base.c =================================================================== --- work.orig/drivers/input/mouse/psmouse-base.c +++ work/drivers/input/mouse/psmouse-base.c @@ -54,7 +54,7 @@ static unsigned int psmouse_smartscroll module_param_named(smartscroll, psmouse_smartscroll, bool, 0644); MODULE_PARM_DESC(smartscroll, "Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled."); -static unsigned int psmouse_resetafter; +static unsigned int psmouse_resetafter = 5; module_param_named(resetafter, psmouse_resetafter, uint, 0644); MODULE_PARM_DESC(resetafter, "Reset device after so many bad packets (0 = never)."); @@ -850,8 +850,29 @@ static void psmouse_deactivate(struct ps static int psmouse_poll(struct psmouse *psmouse) { - return ps2_command(&psmouse->ps2dev, psmouse->packet, - PSMOUSE_CMD_POLL | (psmouse->pktsize << 8)); + if (ps2_command(&psmouse->ps2dev, psmouse->packet, + PSMOUSE_CMD_POLL | (psmouse->pktsize << 8))) + return -1; + + switch (psmouse->type) { + case PSMOUSE_PS2: + case PSMOUSE_PS2PP: + case PSMOUSE_IMPS: + case PSMOUSE_IMEX: + case PSMOUSE_LIFEBOOK: + case PSMOUSE_TRACKPOINT: +/* + * If protocol may be used by "tappable" device (touchpad, touchscreen) try to "restore" + * tap data from the halfway-discarded packet + */ + if ((psmouse->badbyte & 0x08) == (psmouse->packet[0] & 0x08)) + psmouse->packet[0] |= psmouse->badbyte & 0x07; + + default: + break; + } + + return 0; }
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 15 lines · Dmitry Torokhov
Quoted 5 lines · Frank Sorenson
Quoted 2 lines · Dmitry Torokhov
Does the tapping not work period or it only does not work first time you try to tap after not touching the pad for more than 5 seconds?
Quoted 7 lines
The tapping works initially, then stops. I hadn't put 2+2 together with the 5-second idle bit, but that seems the likely issue.
I applied that patch you sent out yesterday, and now tapping works and I'm not seeing the mouse stall/jump problem. I'm at 21+ hours uptime now, with no mouse problems, so I think setting the
resync_timeto 0 looks like the right fix.
Quoted 6 lines
Frank,
Could you please try the patch below and see if it makes tapping work? Make sure you enable resynching by doing:
echo -n 5 >
/sys/bus/serio/devices/serioX/resync_time
With this patch (on top of 2.6.15-mm1, right?), I see the mouse stall/jump problem, but tapping appears to continue working. The touchpad also seems to be extremely touchy. I get spurious taps with very little pressure, and sometimes double-tap will select, then immediately deselect.
Frank
- --
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department Brigham Young University
[email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFDvio6aI0dwg4A47wRAmx5AJ9caJlziT8MfGdxSf/yzVhEGqxqfgCggE0M P2wvTs9/Xbw/sXn8bc/Mk0Y=
=oGAz
-----END PGP SIGNATURE-----
Quoted 24 lines · Frank Sorenson
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 20 lines · Dmitry Torokhov
Quoted 5 lines · Frank Sorenson
Quoted 2 lines · Dmitry Torokhov
Does the tapping not work period or it only does not work first time you try to tap after not touching the pad for more than 5 seconds?
Quoted 7 lines
The tapping works initially, then stops. I hadn't put 2+2 together with the 5-second idle bit, but that seems the likely issue.
I applied that patch you sent out yesterday, and now tapping works and I'm not seeing the mouse stall/jump problem. I'm at 21+ hours uptime now, with no mouse problems, so I think setting the
resync_timeto 0 looks like the right fix.Frank,
Could you please try the patch below and see if it makes tapping work? Make sure you enable resynching by doing:
Quoted 8 lines
Quoted 1 line
echo -n 5 >
/sys/bus/serio/devices/serioX/resync_timeWith this patch (on top of 2.6.15-mm1, right?), I see the mouse stall/jump problem, but tapping appears to continue working. The touchpad also seems to be extremely touchy. I get spurious taps with very little pressure, and sometimes double-tap will select, then immediately deselect.
I just want to confirm that when testing the patch you forced the touchpad into PS/2 mode with psmouse.proto=exps, right?
Could you please enable i8042 debug (echo 1 > /sys/modules/i8042/parameters/debug), move pointer and do coulple of taps and touble-taps making sure there is 5 seconds intervals between events and send me dmesg. Or is the mouse jerky and touchy even while you using it continuously, without 5 seconds pauses?
--
Dmitry
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 2 lines · Dmitry Torokhov
I just want to confirm that when testing the patch you forced the touchpad into PS/2 mode with psmouse.proto=exps, right?
Correct
Quoted 5 lines
Could you please enable i8042 debug (echo 1 >
/sys/modules/i8042/parameters/debug), move pointer and do coulple of taps and touble-taps making sure there is 5 seconds intervals between events and send me dmesg. Or is the mouse jerky and touchy even while you using it continuously, without 5 seconds pauses?
Odd. Looks like we've got quotes around the names in /sys/module (but only for those compiled in--actual modules show correctly).
Anyway, I used /sys/module/"i8042"/parameters/debug, and I'll send you the dmesg in another email.
The mouse is jerkey and touchy both with and without 5 second pauses. I only see the complete mouse "stall" after 5-second pauses, though.
Frank
- --
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department Brigham Young University
[email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFDvp59aI0dwg4A47wRAv4aAJ9+J80OvGQ1GMCFEAM/lQUyxx4+awCgjl7o Y98BW+9mtxLyxclKtsb4qig=
=ON28
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 6 lines · Frank Sorenson
Quoted 5 lines · Dmitry Torokhov
Quoted 5 lines
Frank,
Could you please try the patch below and see if it makes tapping work? Make sure you enable resynching by doing:
Quoted 7 lines
Quoted 1 line
Quoted 1 line
echo -n 5 >
/sys/bus/serio/devices/serioX/resync_timeWith this patch (on top of 2.6.15-mm1, right?), I see the mouse stall/jump problem, but tapping appears to continue working. The touchpad also seems to be extremely touchy. I get spurious taps with very little pressure, and sometimes double-tap will select, then immediately deselect.
Sorry, all. I should have paid closer attention to the protocol it was using. This behavior turned out to be the result of the command-line parsing issue that Sam Ravnborg's patch addresses.
With the touchpad back in the right mode, I see the original behavior (tapping stops working) with both resync patches.
Frank
- --
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department Brigham Young University
[email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFDvu+VaI0dwg4A47wRArgiAJ4qxpieqLXvn1cNozB+w8BDlbN2BACg4K7Z RfjchjnmcSEBUrUao5+lw2A=
=YzdX
-----END PGP SIGNATURE-----