Bug 139337

Summary: PS/2 mouse gets crazy after switching KVM switch
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Vincent Gerris <predatorx>
Component: KernelAssignee: E-mail List <kernel-maintainers>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P3 - Medium CC: predatorx
Version: Final   
Target Milestone: ---   
Hardware: x86   
OS: SuSE Linux 10.0   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Vincent Gerris 2005-12-15 12:04:45 UTC
When booting Suse 10, mouse works perfectly, including wheel.
After a KVM switch to another port and switching back, the mouse goes berserk.
It's uncontrolable, only reboot can fix it, then all is normal again.
This problem is not in Suse 9.3.

I found several websites reporting the bug, with no solution.
Only 1 workaround is available, but using that mousewheel does not work : passing kernel option : psmouse.proto=bare . When using imps instead of bare, switching works 1 time, after a secons switch the same problem emerges.

Again: no trouble in Suse 9.3 or on Mac OS (on the same switch).

I am using a Digiconnect switch, the problem has also been reported in Belkin ones.

Links with info:
http://www.suseforums.net/lofiversion/index.php/t16561.html

http://techrepublic.com.com/5254-6257-0.html?forumID=99&threadID=176853&messageID=1867474&id=2252949
(solution from techrepublic did not work for me)

http://forge.novell.com/modules/xfmod/newsportal/article.php?group_id=1617&msg_id=630&group=novell.support.novell-linux-desktop.hardware
It seems to be related to a usb-to-ps2 converter.
Comment 1 Vojtech Pavlik 2005-12-17 11:18:02 UTC
KVM switches are problematic. No two are alike and each has a share of bugs
in its firmware. All usually works fine, until two systems on the KVM start
fighting about the mode the mouse should be in. Make sure you have all the systems set to the same mode, be it 'bare' or 'imps' or 'exps'.

To reinitialize the mouse without reboot, it should be enough to issue the following command:

        echo -n reconnect > /sys/bus/devices/serio0/drvctl

To auto-reinitialize the mouse after a KVM switch (when the mouse mode and the
kernel mode don't agree, resulting in erratic behavior), this should be enough:

        echo -n 2 > /sys/bus/devices/serio0/resetafter

Also, specifying the

        psmouse.resetafter=2

parameter on the kernel command line should do the same. 9.3 I believe had this
as a default, however it can cause problems on notebooks without a KVM, so
it's not enabled automatically in 10.0.

Please check whether this helps you.

Comment 2 Vincent Gerris 2005-12-17 12:43:09 UTC
Using the psmouse.resetafter=2 option gives similar behaviour to Suse 9.3, namely a 2 seconds weird movement, followed by normal behaviour.
That very much helps me out!

Is this still a kernel issue?
Kinda weird it only seems to happen with usb mouse with ps/2 converter.

If this is not a kernel issue, is there work in progress to make this work on both laptops and KVM switches?
Thanks for your quick response and help :)!
Comment 3 Vojtech Pavlik 2005-12-17 17:40:22 UTC
It's a matter of broken-by-design devices, like most KVMs are. They don't properly abstract/isolate the mouse between systems for cost reasons, and thus cannot ever work properly with extended protocol devices (mice with wheels and extra buttons).

The kernel tries heuristics and workarounds, and they cover many cases, but of course not all.

In upcoming kernel versions we have an active polling method of detecting mouse mode changes, which could eliminate the 2 seconds before the kernel reinitializes the mouse. So it'll get better, but it requires a lot of testing, because it can break other devices easily, and thus won't be in a stable release very soon.

To make the delay shorter, you can specify "psmouse.resetafter=1" for now.
It'll be more aggressive in detecting the unsynchronized mouse data stream.

I'm closing the bug for now, since it's not worse than 9.3 anymore, and since
a better fix is already in the works.