Jump to content
 English      
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
     Forums advanced search
HP.com Home
IT Resource Center Forums > Linux > general

mouse breaks when using KVM on Ubuntu

» 

IT Resource Center

» Login
» Register
» My profile
» Search knowledge base
» Forums
» Patch database
» Download drivers, software and firmware
» Warranty check
» Support Case Manager
» Software Update Manager
» Training and Education
» More maintenance and support options
» Online help
» Site map

Member icons
 
 HP moderator  HP moderator
 Expert in this area  Expert in this area
Member status
ITRC Pro ITRC Pro
250 points
ITRC Graduate ITRC Graduate
500 points
ITRC Wizard ITRC Wizard
1000 points
ITRC Royalty ITRC Royalty
2500 points
ITRC Pharaoh ITRC Pharaoh
7500 points
Olympian Olympian
20000 points
1-Star Olympian 1-Star Olympian
40000 points
2-Star Olympian 2-Star Olympian
80000 points
»  How to earn points
»  Support forums FAQs
Question status
Magical answer Magical answer
Message with a response that solved the author's question
Favorites status
Add to my favorites Add to my favorites
Delete from my favorites Delete from my favorites
This thread has been closed Thread closed
 

Content starts here
   Create a new message    Receive e-mail notification if a new reply is posted  Reply to this message
Author Subject: mouse breaks when using KVM on Ubuntu      Add to my favorites
Peter A. Laudenslager
Jul 10, 2006 12:29:25 GMT   

Hi all,

I have a number of workstations on my desk with various operating systems, and a Belkin KVM switch connecting the workstations to on keyboard, mouse, and display. I have two identical Compaq Presarios on the KVM switch, one with Windows, and one with Ubuntu Linux. The Windows machines work fine with the KVM switch, but the Linux machine doesn't seem to like it as much.

I can boot Linux with that machine selected on the KVM, and everything is fine - the mouse and keyboard work well. However, if I switch to another system, then come back to the Linux machine, the keyboard still works, but the mouse is broken. The pointer moves when the mouse moves, but it jumps all over the screen, and gets random button clicks.

I have tried adjusting the mouse properties (like acceleration), but this doesn't help. The random button clicks make it seem like it is running the wrong mouse driver (movement of the mouse is misinterpreted as a button click).

I have tried this under both GNOME and KDE, and got exactly the same results. Is there a better mouse driver that will tollerate the KVM better?

FYI, the keyboard and mouse connections are all PS2 (although the KVM also supports USB).

Thanks for any ideas!
Note: If you are the author of this question and wish to assign points to any of the answers, please login first.For more information on assigning points ,click here


Sort Answers By: Date or Points
Steven E. Protter This member has accumulated 80000 or more points
Jul 10, 2006 14:41:15 GMT  7 pts

Shalom,

Get a different mouse. It makes no sense, but thats how I fixed this problem.

The mouse and the kvm can't play well together. Get as generic and widely used a mouse as you can afford. $5 solved my issue.

SEP
Peter A. Laudenslager
Jul 10, 2006 18:00:30 GMT    N/A: Question Author

Thanks Steven,

That actually makes a ton of sense - and I have the original mouse that came with the machine (pre KVM switch) sitting in the closet.

Thinking longer term, though, there has to be a way to make this work with the switch. It has been a long time since I saw servers in a data center with dedicated mice. Is the problem just my low-end KVM switch? I rarely have trouble with my Windows machines - maybe that is due to plug & play support in the mouse driver?

Adding a dedicated mouse will definitely solve my problem quickly and easily - thanks for the quick response.
Andrew Bruce Expert in this area
Jul 11, 2006 06:55:37 GMT  4 pts

Hi Peter,

I suspect that it is an issue with X (sitting below the WM, so KDE, Gnome, etc. will make no difference), hotplugging PS2, and the mouse.

In fact, as I think about it, I'm not sure PS2 was originally intended to be a hotpluggable interface - could be completely wrong though...

I run Fedora Core 4 on my work laptop. If I unplug the (PS2) mouse and plug it back in, it stops working.

My USB mouse, however, works fine.

Under WinXP I don't have any problems.

I haven't look into it more, as I am not in the habit of unplugging a PS2 mouse, but, for what it's worth, I'm betting that a change in your X configuration may fix the problem.

Then again, a $5 mouse is probably cheaper than 5 hours of your time, right? ;-)
Peter A. Laudenslager
Jul 11, 2006 11:53:36 GMT    N/A: Question Author

Maybe the real issue is the PS2. I could probably try using USB between the switch and the computer. That would certainly be better than beating my brains out over the ultimate mouse driver.

As a geek, I feel compelled to fix the problem, rather than band-aid it. However, I say that looking up at half-finished crown molding and listening to the downstairs toilet running continuously. Come to think of it - debugging that toilet is a lot like this problem. I replaced the thing that I was sure was causing the problem, then fixed something else that I broke, then fixed the only other thing it could be. Yesterday I went back to the store to get the only part I haven't yet replaced. At this point the toilet is now filled with brand new, high-end components, but it still leaks, and makes more noise than it used to.
Maybe I should just plug in another mouse and move on . . .
Steven E. Protter This member has accumulated 80000 or more points
Jul 11, 2006 12:52:38 GMT  3 pts

Some mice just don't work.

Glad its not hapening to you any more. I found it very annoying when it happened.

SEP
Peter A. Laudenslager
Jul 11, 2006 13:00:07 GMT    N/A: Question Author

Thanks, everyone for your help.

The solution is to switch my PS2 mouse to a USB mouse connection from the KVM switch.

A work-around is to connect a dedicated PS2 mouse to the machine.

The root cause seems to be that the X server doesn't support plug-and-play for PS2 mice.
Matti Kurkela Expert in this area This member has accumulated 7500 or more points
Jul 11, 2006 14:56:32 GMT  7 pts

It would be better to say that PS2 is not designed for hot-plugging.

All PS2 mice can work in a "basic PS2 mouse" mode: no scroll wheel and only 2 or 3 buttons. This is the default mode when the mouse gets power. To activate the wheel and/or any extra buttons, the mouse must receive a special reset code. This switches the mouse to "advanced" mode and changes the mouse data protocol a little.

Some KVMs may stop feeding power to the mouse when switching from one system to another. This causes the mouse to reset to the "basic" mode. The system has no way of detecting that the mouse has reverted to the basic mode: if the system has detected a mouse with "advanced" capabilities and sent it the proper reset code, it will expect the mouse to be still in advanced mode... and will mis-interpret the mouse data.

With Linux, there is a simple way to force the system to reset the mouse. Just switch to the text console mode by pressing Ctrl-Alt-F1, _release all keys_, then return to the graphics mode by pressing Ctrl-Alt-F7. The return to the graphics mode will cause the mouse to be reset, and the mouse will work again.

Another way to force a mouse reset on Linux is to restart the text-mode mouse service, the "gpm" daemon. Usually that can be done with "sh /etc/init.d/gpm restart".

In the newer 2.6.xx series kernels, there is a way to eliminate the problem altogether. The "psmouse" kernel module can be made to reset the mouse automatically if it detects invalid mouse protocol packets, or it can be forced to ignore the existence of advanced PS2 modes and to use the basic PS2 mode only. Run "modinfo psmouse" to see if your kernel has these functions. Look for parameters named "resetafter" and "proto".
Peter A. Laudenslager
Jul 11, 2006 16:45:24 GMT    N/A: Question Author

That explains a lot, Matti - thanks!

I tried switching into text mode and back to graphics mode. The hotkeys worked to change modes, but the mouse still wasn't happy.

Next I tried the gpm reset command, but couldn't find gpm on my system. I looked in the init.d; when I did't find it there, I looked for anything similar running (ps ax). I couldn't find anything that looked promising, so I moved on.

Finally, I tried the modinfo psmouse, which has the options you mentioned. However, I am not sure how to edit these options. I looked at the man page on modinfo, and it looks like modinfo is read-only. Should I go find the filename mentioned in the modinfo and edit it with a text editor?
Matti Kurkela Expert in this area This member has accumulated 7500 or more points
Jul 12, 2006 00:44:25 GMT    Unassigned

The psmouse.ko is a binary file, so you cannot edit it directly.

The configuration system for kernel module parameters changed a bit with 2.6 kernel series: before, the parameters were specified in /etc/modprobe.conf; now you can create an arbitrary number of files in /etc/modprobe.d/ and they will all be read automatically. The old-style file should still work, although it is not recommended to use it anymore.

So, the best solution would be to create a file (you can name it as you wish) in /etc/modprobe.d/ and put in it a line like:

options psmouse proto=bare

or whatever options you wish to use.

To make the options take effect, you must either remove and reload the "psmouse" module (which will require stopping everything that is accessing the mouse) or reboot.

The "modinfo" tool is just a way to check the availability and short description of module parameters. See "man modprobe" and "man modprobe.conf" for more information about kernel module configuration.
Steve
Jul 12, 2006 12:35:13 GMT    Unassigned

Just so you'll know you're not alone:

I have a similar setup, using Fedora Core 3, except my Logitech PS2 trackball works fine through the Belkin switch, and the Logitech USB trackball does not.

My hope is that when I upgrade this machine to Fedora Core 5 the problem will go away. It's resolved some mouse issues on other machines.
 
Create a new message    Receive e-mail notification if a new reply is posted   Reply to this message
 
 
Printable version
Privacy statement Using this site means you accept its terms
© 2010 Hewlett-Packard Development Company, L.P.