Linux loses mouse on kvm switch; keyboard
KVM switches are great, letting you share one keyboard, monitor
and mouse with multiple computers. Unfortunately, mouse drivers
seem to be very sensitive and sometimes you'll lose the mouse when
you switch. This isn't just a SCO problem; I've seen it on NT
The mouse gets "lost" - stops working
on one or more of the attached systems. Sometimes you can fix it by
getting the screen to refresh on the system with the "dead" mouse,
but sometimes nothing but a complete shutdown and reboot will
restore the mouse. On Linux/SCO systems try switching away with
CTRL-ALT-F1 and then back (CTRL-ALT-F2 on SCO, usually CTRL-ALT-F7
or F8 on Linux).
Some motherboards just won't work with some KVM switches at all.
That's probably a matter of power levels rather than anything else,
but it can be very annoying. I've often just used separate mice for
certain systems rather than fight with it. A higher quality (more
expensive) KVM may solve the problem for you, and even just a
better grade of KVM cables can sometimes help.
The KVM switch may fail in this way if power is lost: your
systems reboot, but the mouse (and maybe other things) don't work.
Again, better KVM's have features to prevent this, and a UPS is a
better idea anyway..
Here's an old newsgroup post suggesting some debugging on SCO Unix (it didn't help, though).
From: Bela Lubkin <email@example.com>
Subject: Re: Mouse issues on IBM @server xSeries 335 using OSR5.0.6
Date: Tue, 22 Jul 2003 00:13:38 GMT
Try flipping away, flipping back, not touching the mouse, flipping away,
flipping back, _then_ try the mouse. Try this with increasing numbers
of back-and-forth flips before you touch the mouse; up to a total of 4.
I am not suggesting these as workarounds, but probes to try to
understand the problem.
What I'm trying to probe is: the keyboard mouse driver expects to see
data from the keyboard mouse in a certain sequence. It expects a packet
of 3 or 4 bytes (depending on whether it's a non-wheel or wheel mouse).
I'm imagining what would happen if, during the KVM flip, the driver saw
a single byte of garbage. It might think it was the first byte of a
packet, after which it would be off by one in interpreting packets. If
each flip produces one garbage byte, flipping 3 or 4 times might get you
back in sync.
There's a problem with this theory: the driver attempts to detect this
condition by rejecting additional bytes of a mouse packet if too much
time has elapsed (defined as 1/4 second). This defensive check should
prevent the above scenario. But maybe it doesn't quite work right.
To enhance your testing, you can turn on a keyboard mouse driver debug
flag. The flag is `kbm_noisy' and the easiest thing is to turn it on in
your live kernel. Do this:
# /etc/scodb -w
The change will persist until you reboot (or change it back to 0 in the
same manner). I would like to know whether you get any "kbmintr"
warnings with it turned on, when the mouse is in the bad state.
You can also set a second variable, `kbm_dbg', to values of 1 or 2.
Setting it to 1 causes it to print information on what it's sending up
to the mouse reader; 2 causes it to additionally print the actual mouse
bytes as they are received. 0 turns it off. This output is extremely
verbose for practical purposes, but might be helpful in understanding
All of the output produced by these two debug variables appears on the
console. Under X, it will appear in an "Error" window. You will
probably find it easier to decipher behavior on a text multiscreen. In
particular, set `kbm_dbg=2' and flip back and forth, see if the act of
flipping is producing any mouse bytes.
Got something to add? Send me email.
Increase ad revenue 50-250% with Ezoic
More Articles by Tony Lawrence
Find me on Google+
© 2013-07-21 Tony Lawrence