Even more on Linux and KVM switches

Even more on Linux and KVM switches

Post by Tim Smit » Sat, 29 Mar 2003 05:41:00



Summary of previous results: sometimes mice get screwed up on Linux when you
switch to Linux from Windows or OS X on a KVM switch.  This can be worked
around by reseting the mouse.  I posted a program (if I recall correctly)
that will do that.

Latest result: My KVM switch can hook to each computer by either PS/2 or
USB.  I switched the Linux boxes (both at home and work) to USB.  The mouse
is now fine after switching.

I still don't know *why* PS/2 is a problem.  I don't know enough about how
mice work.  I'd have expected the KVM switch to hide the fact that the mouse
is being switched from the computer, so that makes me suspect that there is
a KVM switch bug.

On the other hand, I've not seen anyone report problems with Windows or OS
X, which indicates that it is a Linux bug.

Whichever it is...USB seems to be the answer.

Switching to USB was trivial.  Plug it in and the keyboard worked.  Run
"mouseconfig" to edit XF86Config, and start X, and the mouse was happy.

--
Evidence Eliminator is worthless: "www.evidence-eliminator-sucks.com"
--Tim Smith

 
 
 

Even more on Linux and KVM switches

Post by Eric Wilhel » Sat, 29 Mar 2003 08:28:40



> I still don't know *why* PS/2 is a problem.  I don't know enough about
> how mice work.  I'd have expected the KVM switch to hide the fact that
> the mouse is being switched from the computer, so that makes me suspect
> that there is a KVM switch bug.

> On the other hand, I've not seen anyone report problems with Windows or
> OS X, which indicates that it is a Linux bug.

I think I read that it was a problem with the emulation done by the KVM.
I have seen some glitches from my Belkin Omni-something when switching to
Windows, such as the scroll-bar in the active window jumping or the
right-click menu coming up if the mouse is moved to soon after the
switch.  I think the reason that there isn't a lingering problem with win
is that the os keeps polling the mouse constantly (in case you are
plugging and un-plugging it?)  It also seems to accept any garden shovel
plugged into the usb port, based on my experience with that Olympus
camera (which was sending a typo to the port, but windows doesn't mind).

On the linux side, echo "?" >/dev/mouse as root does the trick, but there
is a much smoother implementation if you compile a program to do this,
chmod +s it and bind it to your pause/break key with your WM.  I then
just have to tap the break key after a switch (which is coming less and
less frequently since the windows box is so slow and worthless).  
(credit to http://www.nodivisions.com/tech/linux/ except the break key
thing. That, I keep;)

Also, this does not happen only when switching from win to linux, as I
have just checked the uptime on my coyote router (176 days) and I had to
hit the break key to get the mouse reset when coming back to linux from
linux.

--Eric

 
 
 

Even more on Linux and KVM switches

Post by rapska » Sat, 29 Mar 2003 16:10:52


Error log for Thu, 27 Mar 2003 21:41:00 -0600: segfault in module Tim
Smith - dump details are as follows...

Quote:> Summary of previous results: sometimes mice get screwed up on Linux when
> you switch to Linux from Windows or OS X on a KVM switch.  This can be
> worked around by reseting the mouse.  I posted a program (if I recall
> correctly) that will do that.

> Latest result: My KVM switch can hook to each computer by either PS/2 or
> USB.  I switched the Linux boxes (both at home and work) to USB.  The
> mouse is now fine after switching.

> I still don't know *why* PS/2 is a problem.  I don't know enough about
> how mice work.  I'd have expected the KVM switch to hide the fact that
> the mouse is being switched from the computer, so that makes me suspect
> that there is a KVM switch bug.

I saw something in the latest LJ about a software alternative to KVM
switches that you might want to look into to...

Now where was it?  Aha...

http://synergy2.sourceforge.net/index.html

--
rapskat -  09:05:01 up 6 days,  8:02,  5 users,  load average: 0.03, 0.08, 0.09
Gentoo Base System version 1.4.2.8 kernel 2.5.65 on a Pentium III (Coppermine)
"Strange game...the only winning move is not to play."

 
 
 

Even more on Linux and KVM switches

Post by Eric Wilhel » Sat, 29 Mar 2003 17:22:51



> I saw something in the latest LJ about a software alternative to KVM
> switches that you might want to look into to...

> Now where was it?  Aha...

> http://synergy2.sourceforge.net/index.html

But that is more of a KM switch, since you have to have a monitor
connected to each system.  It is cool, but I've got three monitors
connected to the Linux box, which is why I got the KVM, because there is
no more room for the two monitors on the Windows box (which is currently
only single head until I get another KVM (really just need a V, but the
non-electronic versions of these give terrible display quality)).

--Eric

 
 
 

Even more on Linux and KVM switches

Post by Dave Leig » Sat, 29 Mar 2003 19:05:35


rapskat wrote on Friday 28 March 2003 09:10 in message

Quote:> I saw something in the latest LJ about a software alternative to KVM
> switches that you might want to look into to...

> Now where was it?  Aha...

> http://www.veryComputer.com/

IMHO, the most satisfactory single-monitor software solution is to access
your remote machines from your primary desktop using rdesktop or X
(depending on the OSes involved). This should be satisfactory to almost all
except for those who want to do heavy * on the secondary machine.

--
Dave Leigh, Consulting Systems Analyst
Cratchit.org

 
 
 

1. Linux and KVM switches!

A lot of people have trouble with wheel mice on Linux when they use
a KVM switch.  These are the most common two problems:

1. When you switch to Linux, the wheel does not fully work.  E.g., on mine
at work, it can scroll down but not up.

2. Moving the mouse causes the cursor to jump wildly, and also makes it act
as if buttons are being rapidly pressed.  The result is that you often
launch many things from you launch panel thingy.

Here is what is odd about this problem.

1. It doesn't seem to be a problem with the mice or KVMs, because they don't
have this problem with Windows or Mac.

2. It doesn't seem to happen all the time.  E.g., at home, I have WinXP Pro
and Linux on a 2 port Belkin SOHO switch.  I have no problem, other than
sometimes the mouse sensitivity changes under Linux.  I never lose the wheel
or get the eratic behaviour.  At work, however, with WinXP Pro, Linux (same
distribution), and OS X on a 4 port Belkin, I lose half the wheel almost all
the time, and get the erratic behavior half the time.

Some people report that if they have an unused port on their KVM, switching
to Linux, then switching to the unused port, then back to Linux, is more
reliable.  What I've found on my work system is that if I use ALT-Fn to get
out of X before switching away, and then when coming back, switch to Linux,
move the mouse, switch away, switch back, move the mouse again, and then hit
F7 to go back to X, I'm OK.

That's quite a hassle!  I did some Googling today, and saw a post on some
web discussion board from someone who talked about the character sequences
that are sent to the mouse to configure it.  Based on what he said, I offer
the following program, which fixes my mouse on Linux at work!

int main( void )
{
    char c[2] = { 255, 255 };
    int fd = open( "/dev/mouse", 1 );
    if ( fd >= 0 )
    {
        write( fd, c, 2 );
        close( fd );
    }
    return 0;

If I switch back to Linux, and there is any mouse problem, I run that as
root, and the problem is fixed.

So, if you have a KVM and are having Linux mouse problems, try taking that
code, putting it an file, say "fixmouse.c", and compiling (gcc -o fixmouse
fixmouse.c).  Put fixmouse somewhere in your path, and become root, and do
this from wherever you put it:

        chmod root fixmouse
        chmod 4555 fixmouse

If you are using a window manager that lets you assign hotkeys to run
programs, assign a hotkey to run fixmouse, and hit that hotkey whenever you
switch back to Linux.

If your distribution does not link /dev/mouse to whatever your mouse device
is, change the open() call to open whatever your mouse device is.

Now...if someone could tell me *why* this isn't needed in Windows and OS X,
I'll be fully happy.

--
Evidence Eliminator is worthless: "www.evidence-eliminator-sucks.com"
--Tim Smith

2. LILO problem, Please Help Me

3. Linux Hates My KVM Switch..?

4. Q: Sockets - handling multiple connections

5. KVM switch's and linux mouse problem

6. bind 8 resolving question

7. Mice, Linux, and KVM switches

8. EMCion - EMC Ion

9. Linux and KVM Switch

10. KVM Switches for Linux and Windows

11. Linux on Fujitsu 420D with KVM switch

12. is OmniCube KVM switch supported in linux?

13. KVM Switch ans Linux (SuSE 9.1)