PATCH: PR Input Devives/2082: PS/2 mouse out of sync after switching with KVM switch
The bug report is at
http://bugzilla.kernel.org/show_bug.cgi?id=2082
Problem Description: When switching to another machine with a KVM switch and back, the mouse is out of control, with X.Org. To recover,
I have to unplug the mouse cable and plug it back.
Steps to reproduce: Have a wheel mouse connected and X.Org. Keyboard, Mouse and Video are connected to a KVM switch. Switch to another machine and back. You have lost the usage of wheel on mouse.
This patch for 2.6.23 tries to reconnect the mouse after KVM switch. It doesn't completely solve the problem. Mouse still got a few random bytes after KVM switch. But it recovers with kernel message:
psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, issuing reconnect request.
instead of
psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
and never recovering from it.
BTW, please CC me when reply. Thanks.
H.J.
----
drivers/input/mouse/psmouse-base.c renamed from drivers/input/mouse/psmouse-base.c.reset +4 -4
@@ -302,11 +302,11 @@ static irqreturn_t psmouse_interrupt(strif (psmouse->state ==PSMOUSE_ACTIVATED && psmouse->pktcnt &&time_after (jiffies, psmouse->last +HZ /2 )) { -printk (KERN_INFO "psmouse.c: %s at %s lost synchronization, throwing %d bytes away.\n" , - psmouse->name, psmouse->phys, psmouse->pktcnt); +printk (KERN_INFO "psmouse.c: %s at %s lost synchronization, issuing reconnect request.\n" , + psmouse->name, psmouse->phys); psmouse->badbyte = psmouse->packet[0 ]; -__psmouse_set_state (psmouse,PSMOUSE_RESYNCING ); -queue_work (kpsmoused_wq, &psmouse->resync_work); +__psmouse_set_state (psmouse,PSMOUSE_IGNORE ); +serio_reconnect (psmouse->ps2dev.serio); goto out; }
Dmitry Torokhov
maintainerHi,
Quoted 8 lines · H.J. Lu
The bug report is at
http://bugzilla.kernel.org/show_bug.cgi?id=2082
Problem Description: When switching to another machine with a KVM switch and back, the mouse is out of control, with X.Org. To recover,
I have to unplug the mouse cable and plug it back.
Quoted 7 lines
Steps to reproduce: Have a wheel mouse connected and X.Org. Keyboard, Mouse and Video are connected to a KVM switch. Switch to another machine and back. You have lost the usage of wheel on mouse.
This patch for 2.6.23 tries to reconnect the mouse after KVM switch. It doesn't completely solve the problem. Mouse still got a few random bytes after KVM switch.
Have you tried psmouse.resync_time=5 option?
Any change you coudl do
echo 1 > /sys/module/i8042/parameters/debug
before switrching KVM back and forth and send me dmesg?
Quoted 10 lines
But it recovers with kernel message:
psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, issuing reconnect request.instead of
psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.and never recovering from it.
I am hesitant queuing reconnect immediately - if the byte was delayed because embedded controller was busy doing something else and we start querying mouse at the wrong time we might lose mouse altogether.
Signature · 1 line
Dmitry
Quoted 15 lines · Dmitry Torokhov
Hi,
Quoted 12 lines · H.J. Lu
The bug report is at
http://bugzilla.kernel.org/show_bug.cgi?id=2082
Problem Description: When switching to another machine with a KVM switch and back, the mouse is out of control, with X.Org. To recover,
I have to unplug the mouse cable and plug it back.Steps to reproduce: Have a wheel mouse connected and X.Org. Keyboard, Mouse and Video are connected to a KVM switch. Switch to another machine and back. You have lost the usage of wheel on mouse.
Quoted 5 lines
Quoted 3 lines
This patch for 2.6.23 tries to reconnect the mouse after KVM switch. It doesn't completely solve the problem. Mouse still got a few random bytes after KVM switch.
Have you tried psmouse.resync_time=5 option?
My psmouse is kernel builtin. I tried "psmouse.proto=imps" and it worked. But I don't want to change kernel boot option for each kernel on each machine behind KVM.
Quoted 6 lines
Any change you coudl do
echo 1 >
/sys/module/i8042/parameters/debugbefore switrching KVM back and forth and send me dmesg?
I will try it when I get home.
Quoted 7 lines
Quoted 7 lines
But it recovers with kernel message:
psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, issuing reconnect request.instead of
Quoted 9 lines
Quoted 4 lines
psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.and never recovering from it.
I am hesitant queuing reconnect immediately - if the byte was delayed because embedded controller was busy doing something else and we start querying mouse at the wrong time we might lose mouse altogether.
As it stands now, my Microsoft wheel mouse isn't usable at all after KVM switch without my patch. I had to reset mouse cable to get it back.
H.J.