# KVM mouse problem

## scootersmk

I have a Belkin Omniview SE 4-port KVM switch and I have a problem every time i switch from gentoo box to another computer and back the mouse does not work.  I have read other posts on the forums with similar problems, but the only solution i found was to kill x and start it again.  The only other work around i found was to switch to a different xsession(ex: Ctrl+Alt+F1) which is alot better that having to kill X all together.  I have tried all the different mouse protocols(ex: PS/2, IMPS/2, ExplorerPS/2).  They all work intially, but not after a switch.  Just wanted to make this post if anyone has this problem they can either post another fix or atleast so they will see this work around that kinda solves the problem.

Help is greatly appreciated and also hope this might help some others.

----------

## phunni

Any other fix found for this?

----------

## BarryJ

I used to have the same problem.  I think I fixed it by disabling sleep mode for the monitor in X.  I think that was the problem because if I switched quickly and came back, it still worked, but if I waited a while (long enough for it to put the monitor in sleep mode) then the mouse wouldn't work when I came back.  I have since formatted and rebuilt everything and I no longer have this problem (although the monitor also doesn't seem to go into sleep at all by default now).  Also I don't think what brand of KVM matters because I'm using a Starview.

----------

## phunni

My mouse still works - it just goes crazy!  I do not need to wait for the monitor to go to sleep for this to happen.

I found this issue mentioned in the back of my KVM switch manual (Belkin) but none of the suggested fixes help...

----------

## BarryJ

does dmesg give you any strange messages when the mouse is going crazy?

----------

## phunni

dmesg shows nothing when this happens.

The troubleshooting section of my KVM switch manual says:

1) Make sure you do not have more than one mouse driver loaded and that mouse is standard ps/2

2)  mentions AUTOEXEC.BAT - not relevant

3)avoid moving the mouse when switching

4) you can reset the mouse by unpluggin it fomr the front and waiting 2-3 seconds before plugging it in again

I have been through all this and 4 is the only one that looked relevant - but it simply causes the mouse to stop working  :Sad:   This problem seems to defeat the object of having a KVM switch as I can't switch back to my gentoo box unless I'm preppared to restart X!

----------

## blueworm

This is a KVM problem.

I have a D-link DKVM-2 and I can switch pc's like crazy no problems at all...

I did not have to configure anything... I have had it almost 18 months, in which time I have tried several differrent linux distro's, and none have given me any problems with this.

----------

## phunni

I had pretty much figured out that this is a KVM problem and not a Linux one (although this does not happen if my main PC is running windows...) - I need a fix for it though (if there is one!) - I can't just go out and buy an ew KVM box!

----------

## phunni

As a point of interest - this problem does not occur when I'm switching to a machine using Red Hat.

I'm therefore wondering maybe if this is something to do with my X setup.  My current XF86Config-4 file is to be found here

I figured that saved making this a huge post

----------

## blueworm

Try add this to your XF86Config-4 Section "ServerFlags"

```
Option "AllowMouseOpenFail" "1"
```

----------

## phunni

no difference...   :Sad:  Also tried unplugging to see if it would now reset - but no

I compared the Red Hat XF86Config to the gentoo one and the only difference in the mouse section is the device - /dev/input/mice in red hat.  This doesn't exist on my gentoo machine

----------

## paranode

/dev/input/mice I think comes from the Input Core support section of the kernel configuration.  Might want to check that out.  Also, are you using USB?

----------

## FruitCake

I have the same problem, none of the fixes work.

I'd also strongly suggest you dont bother going to kernel 2.6. Changing consoles and restarting X cant even fix the problem under 2.6.

to anyone considering a Belkin KVM dont bother with the Omniview E series get something where you can manage it settings and change the Mouse Emulation mode.

----------

## phunni

I don't have input core support enabled and I'm only using a ps/2 mouse and keyboard.

If I'm not using ps/2 - is there any benefit in trying to enable Input Core support?

----------

## phunni

OK - I have found that <ctrl>-<alt>-<f3> followed by <ctrl>-<alt>-<f7> sorts the mouse out - but it makes my colours go absolutely screwy!

Anyone have any ideas as to how I can fix this?  If I can get my colours back to normal then the problem is fixed enough for me...

----------

## digitalsy

I also have a D-Link kvm (DKVM-4) and in on switching from pc to pc the mouse still works....this was a relatively cheap kvm also, about 99$CAN a year ago.

----------

## slarti`

Man.. I have an OmniView E series 4-Port as well. I've been having the same problem. It seems the mouse is recognized as a keyboard :S

I'm trying using /dev/input/mice instead of /dev/mouse for both gpm and X now, and I'll see if that works... I really hope so...

----------

## phunni

Please post and let us know how you get on...

----------

## phunni

I seem to have found a solution to the problem   :Very Happy: 

In my XF86Config-4 the mouse protocol was defined as "ImPS/2", by changing this to "PS/2" I now no longer have the crazy mouse problem

I have to say though, I don't know why...

----------

## phunni

Discovered that this is not such a wonderful solution - I have lost the use of my mouse wheel...  :Sad: 

----------

## slarti`

By unplugging my mouse from the KVM after the switch and then plugging it back in again seems to fix the problem. No restarting X needed either. This is annoying though and sooner or later it's gonna mean that the pins on the plug are gonna wear down... PS/2's were never designed to be being unplugged / plugged in all the time, were they?

----------

## phunni

Doesn't work for me...

The only solution I have found is to wither change virtual console and then change back - but this causes weird colours, or to change the mouse protocol as above - but this causes me to lose the use of my mouse wheel...

The latter is the lesser of the two problems

----------

## Linuxboy

I have a Belkin Omniview SE 4-Port and the live CD (1.4 8 something) does not work with the KVM keyboard shortcut but once the install is done and I'm running the real OS the keyboard, mouse, wheel and everything works even when I use the KVM keyboard shortcut.

Moving the mouse while switching sometimes locks everything, so I just don't do it and I do occasionaly get stray characters when using the KVM keyboard shortcut.

During install I have to make sure to use the channel button on the KVM when leaving the Gentoo screen or the keyboard locks up until I warm boot.

I've got other Gentoo and other Linux's of many versions and vintages on Avocent (Cybex) AV424 as well as their old Autoview8 switches and they all work just fine for me.  (these are a bit pricey for use outside the data-center)

I didn't think I'd done anything special, but if you'll tell me which config files you want, Ill post them.

Linuxboy

----------

## phunni

IT would be interesting to see at least the mouse portion of your XF86Config-4

What kind of mouse do you have?

----------

## Linuxboy

 *phunni wrote:*   

> IT would be interesting to see at least the mouse portion of your XF86Config-4
> 
> 

 

# **********************************************************************

# Core Pointer's InputDevice section

# **********************************************************************

Section "InputDevice"

# Identifier and driver

    Identifier  "Mouse1"

    Driver      "mouse"

    Option "Protocol"    "IMPS/2"

    Option "Device"      "/dev/mouse"

    Option "ZAxisMapping"       "4 5"

# Mouse-speed setting for PS/2 mouse.

#    Option "Resolution"        "256"

# When using XQUEUE, comment out the above two lines, and uncomment

# the following line.

#    Option "Protocol"  "Xqueue"

# Baudrate and SampleRate are only for some Logitech mice. In

# almost every case these lines should be omitted.

#    Option "BaudRate"  "9600"

#    Option "SampleRate"        "150"

# Emulate3Buttons is an option for 2-button Microsoft mice

# Emulate3Timeout is the timeout in milliseconds (default is 50ms)

#    Option "Emulate3Buttons"

#    Option "Emulate3Timeout"    "50"

# ChordMiddle is an option for some 3-button Logitech mice

#    Option "ChordMiddle"

EndSection

...

# **********************************************************************

# ServerLayout sections.

# **********************************************************************

# Any number of ServerLayout sections may be present.  Each describes

# the way multiple screens are organised.  A specific ServerLayout

# section may be specified from the X server command line with the

# "-layout" option.  In the absence of this, the first section is used.

# When now ServerLayout section is present, the first Screen section

# is used alone.

Section "ServerLayout"

# The Identifier line must be present

    Identifier  "Simple Layout"

# Each Screen line specifies a Screen section name, and optionally

# the relative position of other screens.  The four names after

# primary screen name are the screens to the top, bottom, left and right

# of the primary screen.  In this example, screen 2 is located to the

# right of screen 1.

    Screen "Screen 1"

# Each InputDevice line specifies an InputDevice section name and

# optionally some options to specify the way the device is to be

# used.  Those options include "CorePointer", "CoreKeyboard" and

# "SendCoreEvents".

    InputDevice "Mouse1" "CorePointer"

    InputDevice "Keyboard1" "CoreKeyboard"

EndSection

 *Quote:*   

> 
> 
> What kind of mouse do you have?

 

Microsoft Intellimouse 1.2A PS/2 compatible.

I have had problems with the 2.0 mouse on Cybex boxes with SCO unix, but I dumped the last SCO a few years back and it's no longer broken...  If you have a 2.0 or 2.0a, try another mouse version.

I hope this helps.

Linuxboy

----------

## phunni

 *Linuxboy wrote:*   

> 
> 
>     Option "Protocol"    "IMPS/2"
> 
> 

 

This was the section that caused my mouse to go crazy.  I changed it to PS/2 and now the mouse is no longer crazy, but I also don't have the use of my scroll wheel.

----------

## agrippa_cash

I am still having the same problem as well with a PS/2 mouse.  I have a Belkin Omniview and my mouse wigs out every time I switch back and forth.  I have tried killing X, restarting KDM, not touching the mouse when I switch, typing a bit before I use the mouse, and I tried manually editing the POINTERS secion, per Belkin's website (X wouldn't start).

----------

## bdemore

This exact damn problem is killing me as well, has anyone found an answer?    :Mad: 

----------

## phunni

The only solution I have found is to change the mouse protocol (see above).  The downside to this is that I have to live without the benefits of my scroll wheel, but at least everything is functional and useable...

----------

## haz3l

I have a Belkin KVM switch as well.. When I switch to my gentoo box, the mouse either dies or flickers (its optical). Besides the ctl+alt'ing out of X, I've found that banging the mouse lightly against the pad brings my mouse back to life... ^^ kinda weird but.. *shrugs*

----------

## molander

I have the omni view 4 port KVM as well and have experienced everything that has been discussed so far. 

The only thing that I can think of is that when the KVM switches to another computer, the previous system is told that there is a standard 2 button mouse connected. When you switch back you have a 3 button - scroll mouse connected and X thinks you have a standard two button. Unfortunately it doesnt seem to redetect the mouse and you are stuck until you switch consoles or restart X. 

It seems like we need to find a way to force X to use a specific pointer and not to change it.  If I remember correctly mine also had a problem with windows XP and USB where if I attached to the XP box via USB and switched back and forth XP would lose the scroll wheel.  When I contacted tech support at belkin the of course said this was a known issue and I should just use PS2. Punks.

I will give X another shot tonight.

----------

## senderap

Same happens to me whenever I have anythin except a standard PS2 mouse selected.  It doesn't matter what distro SUSE, RH< Fedora,Debian,Gentoo.  I've also switched KVMs.

----------

## banadushi

If you have a power adapter for your KVM you need to make sure you kepp it plugged in, If you do not have a power adapter then you are SOL.  The reson is when you plug a mouse into the PS/2 port, it expects to get a signal back from the mouse.  A KVM with the power adapter will emulate this, and the systme will always think it has a mouse attached.  X however down not poll the mouse port, so if it comes up with a mouse it assumes it has a mouse, and never checks again.  So when the KVM changes and removes the mouse from that system, the hardware know's there is no mouse there and kinda shuts off the port.  Switching the VT causes X to do some redetection somehow, but to do it right you need to swtich VT's umplug the mouse from the KVM, plug it back in, then switch back to the VT with X on it.  The mouse will now work as normal.  

Note:  although the power adapter may be plugged in, it may not fix the problem.  At work we have Belkin POS KVM's and they never work, they are glorified switchboxes.  You need a real KVM.

----------

## phunni

I do also have a (much less annoying) problem when I switch to a windows machine: I am scrolled about half way down the page

So, this isn't a Linux/X thing - all GUI systems seem to struggle

----------

## plate

Absolutely. I'm having this problem between BeOS, XP, and Xfree86 on a variety of OSs/kernels. Interesting idea about the power plug, by the way. My cheapo non-Belkin KVM switch doesn't even have one (!), but I could try putting in batteries and see if that helps...  :Shocked: 

Interestingly enough, I can usually fix the mouse freeze in XFree86 by toggling the virtual consoles (as described by others earlier in this thread), but only in a 2.4 kernel environment - <ctrl-alt-F(n)> doesn't help at all when running 2.6 kernels.

----------

## phunni

I have found that switching virtual consoles makles my colours go all screwy.  This is probably an issue with either my graphic card (ATI 9800 Pro) or my monitor.

Either way - I can live without the use of the scroll wheel; this seems the least problematic fix

----------

## MannyL-NJ

 *plate wrote:*   

> Absolutely. I'm having this problem between BeOS, XP, and Xfree86 on a variety of OSs/kernels. Interesting idea about the power plug, by the way. My cheapo non-Belkin KVM switch doesn't even have one (!), but I could try putting in batteries and see if that helps... 
> 
> Interestingly enough, I can usually fix the mouse freeze in XFree86 by toggling the virtual consoles (as described by others earlier in this thread), but only in a 2.4 kernel environment - <ctrl-alt-F(n)> doesn't help at all when running 2.6 kernels.

 

Chalk up another person with a Belkin and 2.6 no go at all but 2.4 switchg consols worked. I even tryied switching to a text console then switching to the other pc but that didn't help. I have a few power sup;lies here but don't know which one is for a Belkin  Onmicube 4 port F1D094

----------

## ampedover

Running 2.6 kernel with Belkin Omniview 4-port switch.  Have all the symptoms described in this thread.  Also have RH7.2 and WinXP machine which don't exhibit this problem.  

I believe this problem is a kernel USB config issue and possibly XFree86. Have not found resolution yet....

----------

## ampedover

The unplugging and replugging of the mouse seems to fix mine.  This may be along the lines of the previous comment about have a power supply connected.  

There's obviously some signal lost when switching.  I'm guessing the power supply connected must perserve this as well as unplugging then replugging getting that signal back.  

Still doesn't explain why my RH7.2 machine doesn't have this problem though...

----------

## kaji

I am curently using a Belkin Omniview E with a Logitech mouse and I have had this problem with Redhat, Fedora and now Gentoo. I have always just switched to a terminal and back again but i fugured i could fix this in Gentoo but this is the one think i can not find a fix for.

I have tried replacing the mouse, however all I have are Logitech mice. I have tried all nature of Logitech mice though (optical, ball, usb, ps/2, etc). 

I have found that if I change from and to my gentoo box quickly enough the mouse does not get messed up, however this does me or anyone else little good. This lends proof to the power issue, however I do not have the proper power supply to confirm.

I have also found, more or less by mistake, that if I use the PS/2 driver the mouse is not effected, however I lose my scroll ability. This fix has been posted before, however this leads me to believe that the driver/Logitech in conjunction with the Belkin or Belkin based KVM switch may be the problem.

After checking this out with Belkin i found that they sead it was a Omniview E specific problem, I would quote the page but I can not seem to find it again. Trendware (a Belkin related company) was completely useless (webpage is full of broken links).  It may be the chip used in the Omniview E that is the problem as well.

Does anyone know how the IMPS/2 driver works? Could it be more sensative to connection loss then PS/2?

I have noticed that most of us have Belkin Omniview's so I offer that we all compare our divices in an effert to sort out why some people are having this problem and others are not.

Belkin Omniview E 4-port KVM F1DB10FP  V-E1.0

Logitech Mini Wheel Mouse (all i can tell you is that it is silver) w/ USB to PS/2 converter

IMPS/2 Driver

----------

## phunni

With a 2.6 kernel I cannot fix this problem even by switching terminals - even restarting X does not fix the problem.

Only a reboot does...

----------

## rich0

I got my KVM a long time ago (a Belkin - no surprise there...).  I remember tring to get it to not hang when switching back to linux, and I discovered the switching consoles trick.  I also had various degress of luck with this program that I got from somebody else online:

```
#include <stdio.h>

#include <unistd.h>

#define MOUSE "/dev/mouse"

main ()

{

     FILE *ofp;

     ofp = fopen(MOUSE, "w");

//     fprintf(ofp, "ÿÿ");

     fprintf(ofp, "õ");

     sleep(1);

     fprintf(ofp, "óÈódóPò");

     sleep(1);

     fprintf(ofp, "ô");

/*   Nathan G. Grennan has reported that ÿÿ doesn't work for him, but */

/*   õóÈódóPòô does, and you might need a half-second of delay after */

/*   the first character õ, and also before the last character ô. */

/*   These are the hex codes for those characters: */

/*   F5 F3 C8 F3 64 F3 50 F2 F4 */

     fclose(ofp);

}
```

Why the author didn't just code the characters in hex I have no idea...  

That program actually did tend to reset the mouse, but then it stopped working (probably during an X upgrade).  Then after another upgrade switching consoles didn't work either.  At that point I gave up and bypassed the KVM for the mouse - I never had problems with the keyboard/monitor and it isn't too bad having two mice on my desk.

I am currently running 2.6.2 with XF 4.3.0.  I just got a brand new wireless optical and I figured I'd give the KVM another try.  Sure enough it didn't work, and the discussion on this forum strongly resembles the discussions on the forums a year or two ago when I first got the switch...

I think that along the way somebody noticed an extra mouse reset on the virtual console switching code and figured "hey, the VC doesn't affect the mouse, I can shave off three lines of code by not resetting the mouse every time"...

I don't know much about the mouse hardware.  Maybe this is just a three line kernel patch to fix...

----------

## rich0

After doing some searching, I found that using the module option proto=bare on the psmouse kernel input device module fixes the problem, but disables the mouse wheel.

Some folks aparently have had some luck with the kernel module option resetafter=1, but that didn't help me at all.

In theory you don't need psmouse compiled as a module - I think psmouse_proto=bare should also work as a kernel boot option.

Hopefully this will help someone else.

I'm sure I'll keep hacking away at it, but I'll live without the wheel for now...

----------

## phunni

Please elaborate.  I'm not using a kernel module for the mouse at all as far as I'm aware.  How would I go about trying this?

----------

## Xiderpunk

Same problems as mentioned here with a Belkin Omni-Cube 2-Port. As above the only 'fix' I have found is to unplug the mouse from the cube, wait a couple of seconds then plug it back in. 

Definately not ideal..   :Sad: 

----------

## rich0

 *Quote:*   

> Please elaborate. I'm not using a kernel module for the mouse at all as far as I'm aware. How would I go about trying this?

 

Note that these instructions should work for 2.6.2, and probably some of the 2.6 series, but I don't know when exactly the option made it into the kernel so you might not be able to do it under 2.4.  (I'm using 2.6.2-gentoo - it is almost seamless to get it working so you should try it if you aren't running it already unless you have really exotic hardware.  Search the forums for tips on the upgrade.)

Well, I haven't tried the non-module way, but in theory you need to edit your grub menu file (in /boot/grub/menu.lst) and add the psmouse_proto=bare to the kernel options - ie append it to the end of the line which looks like:

```
kernel /boot/bzImage root=/dev/hda3
```

Then just reboot.

I haven't tried this - since I didn't find the boot option at first I went ahead and compiled mouse support as a module.  

To go this route, compile a kernel but set CONFIG_MOUSE_PS2=m instead of "y".  In the config menus it is under Device drivers/Input devices.  Then add the line

```
psmouse proto=bare

```

to the file /etc/modules.autoload.d/kernel-2.6

Then reboot.

The nice thing about modules is that if you want to tinker with the settings just do:

```
/etc/init.d/xdm stop

rmmod psmouse

modprobe psmouse <options>

/etc/init.d/xdm start
```

You don't need to reboot between changes to try new ones out since you are reloading the mouse driver as a module.

----------

## duhblow7

i was having a similar problem and i was able to find a solution.  i have a belkin omnicube 4 port.  when i would switch between linux and windows and i came back to X the only problem was the mouse scroll no longer worked.  i tried changing to console (control+alt+F2) then switching between windows and linux but then switching back to X (control+alt+F7) but that didn't fix the mouse scroll.  i tried unpluggin the mouse from the ps2 port on the belkin kvm but that didn't fix the mouse scroll.  my mouse scroll was affected even if i switched between the kvm very quickly.  my fix was to recompile the kernel with ps2 mouse support as a MODULE.  add 'psmouse' to the /etc/modules.autoload/kernel-2.6

```
echo "psmouse" >> /etc/modules.autoload/kernel-2.6
```

reboot

when i switched between consoles the mouse scroll still wouldn't work, but if i unloaded and reloaded the psmouse module, i was able to get the scroll mouse functioning again.

as root:

```
rmmod psmouse

modprobe psmouse
```

i hope this helps somebody.

oo7

----------

## ashak

I just setup a new Gentoo box for my boss, he wants to try and move everything he does over to Linux... Needless to say, when I hooked his machine up to his 4 port Omnicube, after switching away to a windows machine and then back, the mouse went nuts. I read through this whole post and realised it didn't come up with a complete solution... However, in another post, I found something that said add

```
psmouse.proto=imps
```

To you the end of the kernel line in your grub.conf file... So I thought i'd give it a go.

For just to be complete, the xorg.conf contains:

```
Option      "Protocol" "auto"
```

In the InputDevice section.

And this seems to solve the problem of the mouse going nuts. My boss has a trackball thing with no scroll wheel, so I cannot tell you if it's completly solved the problem or not, but it's a nicer solution than pretty much everything else suggested  :Smile: 

I hope this helps others.

Ashak

----------

## chovy

 *phunni wrote:*   

> With a 2.6 kernel I cannot fix this problem even by switching terminals - even restarting X does not fix the problem.
> 
> Only a reboot does...

 

I'm having the same problem. under 2.4 kernel, I could just switch to virtual console (as described), and back. And it worked. 2.6 kernel, won't fix the problem.

The only way I've found to fix the problem is to pass the parameter to the kernel (psmouse.proto=imps) in grub.conf:

```
kernel (hd0,0)/boot/kernel-2.6.11-gentoo-r6 root=/dev/hda3 psmouse.proto=imps
```

That fixes the original problem of the mouse not working at all when running startx, however. When switching with Belkin 4-port KVM switch, I still get crazymouse. The only fix is to reboot the computer after switching over with the Belkin thing.

I tried the PS/2 vs. IMPS/2 in XF86Config, but that didn't help any.

----------

## dtor

You do not really need to reboot to restore the mouse, doing:

```
echo -n "reconnect" > /sys/bus/serio/devices/serioX/drvctl
```

where serioX is serio port your mouse is connected to should restore it. You can find which serio port you need by doing:

```
for i in /sys/bus/serio/devices/serio*; do echo -n `basename $i`": "; cat $i/driver/description; done
```

Look for "serio2: PS/2 mouse driver".

Unfortunately we do not have solution for automatic protocol reset. Yet.

----------

## chovy

i gotta hand it to ya. Although that is quite possibly the most annoying way of fixing the problem. It works.

you have to "su" first, then execute the command (i created a mouse.sh file).

This is really quite sad, but at least I can do get the mouse working without rebooting. Untill there's a better solution - Thank you!

----------

## AlchEmysT

i have a belkin 2 port omniview and same problem sorta..

if i hit ESC a few times that usually fixes my mouse but it is quite annoying. occasionally it also locks the Shift key on ... took me a few minutes today to figure out that it was locked and pressing the shift would release it. i was in the middle of an emerge -e system so i didn't wanna reboot... luckily i figured it out. Also this only happens when there is another computer powered on. I don't have to be switching back and forth if i leave the mouse alone for a few minutes it goes haywire for a bit ... if only my main system is on it behaves normally

I am in luck because I just purchased a new computer and i need a 4 port kvm. Anyone having problems with the D-link kvm's? other suggestions would be appreciated.

----------

## Y4kk0

I have had the same problem on my previous distro Mandrake and using the Belko KVM. 

In the past I could simply solve it by switching to terminal mode and back again. After one of Mandrakes updates that option was gone so I passed by using append the option  

```
psmouse.proto=bare
```

  to /etc/lilo.conf and this cleared the jumping mouse. Unfortunate it also disables the scroll wheel. 

I have not yet tried it on the Gentoo distro. As I am at this moment still tweaking it. When I have time I will see what it will bring.

The reconnect worked perfect. 

To bad you will need to have an terminal open. Or go to the console.

----------

## dtor

Anyone up to testing some patches? If so what kernel version is most convenient - I can do vanilla 2.6.11, 2.6.11.6 or 2.6.12-rc[23]?

----------

## rich0

 *dtor wrote:*   

> Anyone up to testing some patches? If so what kernel version is most convenient - I can do vanilla 2.6.11, 2.6.11.6 or 2.6.12-rc[23]?

 

Fine by me.  I'm running 2.6.11-gentoo-r3 at the moment (which may or may not be the latest version in production).  I don't mind bumping up to any amd64 keyworded version which is newer.  I'd rather not run an RC kernel, although I could boot to it just to test out the mouse I suppose (I'd rather use the patch in a kernel I could otherwise keep using without fear of a botched filesystem).

----------

## dtor

Ok, I am not sure what 2.6.11-gentoo-r3 exactly is (I usually run the latest pull from linus + my patches), but I will do one for vanilla 2.6.11.6 later tonight.

----------

## [sinz]

I use a logitech MX510 with a D-Link DKVM-4 4 port kvm switch.  I had this same problem as everyone else and was using IPMS/2 for a while but recently figured out that:

```
psmouse.proto=exps
```

solved the problem.  Along with:

```

        Option      "Protocol" "ExplorerPS/2"

```

in my xorg.conf.

----------

## dtor

Ok, here is the patch:

http://www.geocities.com/dt_or/input/2_6_11/psmouse-resync-2.6.11.patch.gz

If geocities give a fuss about directlinking try going into 2_6_11 directory first:

http://www.geocities.com/dt_or/input/2_6_11/

It should apply to all 2.6.11.x (well, I tested with 2.6.11.6 but nothing was cahnged in psmouse code for .7 or .8 ).

The idea is the follwing: if there was no data from the mouse for extended period of time (currently 5 sec), then next time we get a byte we use POLL command to verify packet size and validate protocol.

Please let me know if it works for you.

Thanks!

----------

## Drunkula

Try adding psmouse_noext=1 as a boot parameter to your kernel.  I haven't had that problem in some time so I don't know if it works or not.  That parameter, however, seems to ring a bell.  Can't hurt to try!

Indidentally I'm not currently using that parameter because the problem hasn't come my way in well over a year.  Not sure what is different other than using a newer kernel...

----------

## rich0

 *dtor wrote:*   

> Ok, here is the patch:
> 
> http://www.geocities.com/dt_or/input/2_6_11/psmouse-resync-2.6.11.patch.gz
> 
> If geocities give a fuss about directlinking try going into 2_6_11 directory first:
> ...

 

Seems to work in my case on amd64 (logitech wireless optical mouse).  Thanks!!!

----------

## dtor

 *rich0 wrote:*   

> 
> 
> Seems to work in my case on amd64 (logitech wireless optical mouse).  Thanks!!!

 

Thank you for testing it.

Anyone else? Pretty please... I'd like to put this issue to rest once and for all...

----------

## Y4kk0

 *Quote:*   

> Anyone else? Pretty please... I'd like to put this issue to rest once and for all...

 

Yes it worked perfect with me as well.

Thanks a lot.

----------

## dtor

Thank you for testing it. If you do not mind could you please also test updated patch - it should reduce "stickiness" of the mouse pointer when driver forces resync.

http://www.geocities.com/dt_or/input/2_6_11/psmouse-resync-2.6.11-v2.patch.gz

Thanks again.

----------

## Y4kk0

Second patch is working as well.

With the first patch I didn't notice the stickeyness. 

But did notice that when I was switching to my *eeks* work windows laptop it takes about 2 seconds before mouse will function.

Switching back to gentoo its down to 0 seconds. And the best part is I can use the scroll wheel. Which I couldn't before using the boot option.

This is really great.

Many thanks

----------

## rich0

 *dtor wrote:*   

> Thank you for testing it. If you do not mind could you please also test updated patch - it should reduce "stickiness" of the mouse pointer when driver forces resync.
> 
> 

 

That seems to work fine for me as well.  I did notice some stickiness in the original patch when the mouse was idle for a while.  I haven't noticed it in the short time that I've been using the second patch.

You'll definitely need to submit this patch to the powers-that-be!

----------

## chovy

 *dtor wrote:*   

> Thank you for testing it. If you do not mind could you please also test updated patch - it should reduce "stickiness" of the mouse pointer when driver forces resync.
> 
> http://www.geocities.com/dt_or/input/2_6_11/psmouse-resync-2.6.11-v2.patch.gz
> 
> Thanks again.

 

Can someone explain to me how to use this patch? I'm having the same problem 2.6.11-r9

Belkin KVM, optical mouse, crazymouse happens, and switching consoles no longer works, like it did in 2.4

PS - I am seeing these errors in dmesg:

 *Quote:*   

> psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
> 
> psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
> 
> psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
> ...

 

I've tried all three of these - even the commented out lines (did the boot options awhile back, those didn't work either).

```
Section "InputDevice"

        Identifier  "Mouse0"

        Driver      "mouse"

        #Option     "Protocol" "auto"

        #Option      "Protocol" "IMPS/2"

        Option     "Protocol" "PS/2"

        Option      "Device" "/dev/input/mouse0"

        Option      "ZAxisMapping" "4 5"

        #Option      "Resolution" "300"

EndSection

```

----------

## Y4kk0

 *Quote:*   

> Can someone explain to me how to use this patch? I'm having the same problem 2.6.11-r9 

 

This is how I have done it.

Download the patch. Copy and extract it to /usr/src.

go into the /usr/src/linux directory which is dynamicaly linked to you current source.

Than patch the kernel source :

patch -Np1 -i ../psmouse-resync-2.6.11-v2.patch

If I remember correctly you will see that two files have been patched.

Rebuild the kernel. And reboot with the new kernel.

----------

## chovy

I assume the latest file to get would be the v11? or does that correlated with the r11 on the kernel source?

----------

## dtor

No relation whatsoever.

----------

## chovy

w000 hoooo......mouse works now!! I can switch with KVM again!!

this makes me really happy. Thanks to whoever contributed to that fix.

I'm curious when that patch will be part of the standard kernel?

----------

## dtor

I was thinking about getting it in -mm in a week or so... I am not sure if it's gonna make in 2.6.13 - there are some rough edges when used with ALPS touchpads.

----------

## chovy

I don't know if this is related to the patch or not, I'm on a pretty slow system P3-600 with 512MB ram.

But when I use the Ctrl+Scrollwheel in FireFox (to increase/decrease font size). There's quite a bit of delay in resizing the fonts. Around 5-10 seconds. The browser freezes up momentarily.

Not sure if anyone else is experiencing this problem, or if it's just my weak computer and graphics card trying to redraw the screen.

----------

## Akaihiryuu

I have one of the Belkin SOHO series 2-port PS/2 KVM switches...I have the same problem with switching PC's.  It's definitely a hardware issue between the KVM and the mouse though, as it affects Windows XP, Windows ME, and Linux all the same way...scroll wheel doesn't work, mouse speed gets messed up.  Unplugging the mouse from the KVM and plugging it back in (which is safe in this case, as you aren't unplugging anything from the PS/2 ports on the PC) works, it fixes the issue immediately whether I'm using Linux, WinME, or WinXP.  This is listed as a troubleshooting procedure in the KVM manual.  In my case, the switch is flash upgradeable...I already sent an email to Belkin regarding this, I'm hoping they release a firmware patch that will reset the mouse and keyboard properly after switching PC's.  Other than this, I'm perfectly happy with the KVM switch.

----------

## chovy

The kernel patch fixes it, if you're still having problems.

----------

## fw146

 *dtor wrote:*   

> You do not really need to reboot to restore the mouse, doing:
> 
> ```
> echo -n "reconnect" > /sys/bus/serio/devices/serioX/drvctl
> ```
> ...

 

Thanks for this info. 

BTW, this problem started in my case when I plugged a MS IntelliMouse 1.1A into a Belkin F1DS104P. I had been using a generic Logitech wheel mouse, I call it generic as it does not have any model number, without any problem. In fact, I switched back to the Logitech mouse and it went away. Perhaps this is not a Belkin problem? Perhaps Belkin+Intellimouse/MS combo related? Wondering if anybody had erratic mouse behaviour with a non MS mouse on a belkin soho switch.

cheers

-fw

----------

## chovy

i had some microsystems mouse or something. not MS.

----------

## fw146

 *chovy wrote:*   

> i had some microsystems mouse or something. not MS.

 

Oh well it is belkin +logitech imps/2 which works then  :Smile:  Belkin support has recently posted a firmware upgrade supposedly addressing erratic mouse behaviour on SuSE linux. Unfortunately, the linked page does *NOT* offer any file to download. 

In any case I hope that Dimitry's patch renders this discussion academic.

*EDIT*

I just saw some posts detailing problems specific to the Logitech mice. For the curious:

In linux I have set up the mouse as 

```
Section "InputDevice"

        Identifier  "Mouse0"

        Driver      "mouse"

        Option      "Protocol" "IMPS/2"

        Option      "Device" "/dev/input/mouse0"

        Option      "Buttons" "5"

        Option      "ZAxisMapping" "4 5"

        Option      "Emulate3Buttons" "No"

EndSection

```

whereas on the XP box it is set as a PS/2 mouse with the "Assume wheel is present" option.

----------

## chovy

the patch definitely fixed it for me. Can't wait for it to become part of the main code base of the kernel.

----------

## ter_roshak

I just wanted to make one comment on this issue since it seems like it's being fixed with a patch:  I was having a problem with the mouse going crazy using the Belkin KVM when I would switch to another machine and back to my Gentoo box (2.6.12-gentoo-r7) and I fixed it by switching to a USB cable from the gentoo box to the KVM, while still using IMPS/2 as the protocol in xorg.conf.  Now I still have problems with the mouse not fully working, but the mouse does not go crazy anymore.  By not fully working, I mean that it won't always allow me to right-click on items in a window, especially if the window has multiple frames, and I have to switch to another virtual desktop (not console) and back to get that fixed.

----------

## chovy

patch it, works like a charm.

----------

## ter_roshak

 *chovy wrote:*   

> patch it, works like a charm.

 

Unfortunately, I just flashed the firmware and the Belkin KVM has some bigger problems.  It only seems to work on the 4th channel (limited to one machine) and the mouse is having some big problems like before.  I may be investing in a new IOGear KVM, as I have heard that they are excellent.

----------

## TheHeadSage

The Patch works brilliantly, it solved all my KVM related problems.

----------

## charliecompany

Is there any news as to whether this will be making it into a mainstream kernel and whether it works with the 2.6.12 or 2.6.13 kernel?

----------

## dtor

As soon as we work out problems it causes with ALPS touchpads. Does anyone here have a notebook with ALPS?

----------

## charliecompany

Would this apply cleanly to a different kernel or would there be issues from that? Also, any progress on the touch pads?

----------

## waslit

The patch didnt fully succeed for me and I still seem to have a crazy logitech cordless optical mouse problem. I have tried every suggestion so far but none have worked. Im using the gentoo-2.6.12-r10. Would te patch maybe not work on this kernel??

----------

## waslit

 *waslit wrote:*   

> The patch didnt fully succeed for me and I still seem to have a crazy logitech cordless optical mouse problem. I have tried every suggestion so far but none have worked. Im using the gentoo-2.6.12-r10. Would te patch maybe not work on this kernel??

 

I have found that using the OHCI usb drivers instead of the EHCI has actually got the mouse to work perfectly

----------

## chovy

has anyone noticed that FireFox now freezes up when you use the scrollwheel?

----------

## Drunkula

 *chovy wrote:*   

> has anyone noticed that FireFox now freezes up when you use the scrollwheel?

 

Mine works....

----------

## chovy

maybe i'm not optimizing my system correclty. I notice a few things are a bit slow, even after upgrading to 1gb and a sempron 3000+ processor.

 *Quote:*   

> processor       : 0
> 
> vendor_id       : AuthenticAMD
> 
> cpu family      : 15
> ...

 

Anything I can do to speed up the application loading?

----------

## charliecompany

Would it be possible to update the patch to work with a newer kernel since the gentoo-sources-2.6.11 is no longer in portage? I would like to be able to update the kernel to 2.6.14, but I don't want to lose the capabilities that the patch added for use with the kvm.

Thanks

----------

## chovy

is there any reason why you couldn't apply the KVM path to the latest kernel?

----------

## charliecompany

I tried to apply it and it failed at several parts of the patching process. I didn't try building the kernel to see if it worked or not at that point. I figured that if the patch didn't apply successfully, it probably wouldn't work.

----------

## davidgurvich

Try 

Option      "Protocol"             "auto"

Someone mentioned on a different topic that it fixed the problem they were having with a  KVM switch.

----------

## charliecompany

I tried auto and it didn't help at all. Thanks though.

----------

## chovy

this patch is only for Belkin KVM crazymouse(TM) problem.

----------

## Michael.Terence

I cant get the patch to apply to the current kernel either.  Is anyone maintaining this?

----------

## geckosenator

Hi, one way to solve this is to not use a mouse... I have 2 computers and I control them both with a single keyboard and no kvm (I do it all through software and network)   I kind of cheat on the video because I have 4 monitors. If you are using gnome you can map the mouse to the numpad to move it around that way.

----------

## chovy

 *chovy wrote:*   

> patch it, works like a charm.

 

still having jumpy-mouse in kernel 2.6.16-r2...anyone know if this patch has made it (or will make it) into the official kernel?

dmesg

 *Quote:*   

> psmouse.c: bad data from KBC - bad parity
> 
> psmouse.c: Wheel Mouse at isa0060/serio1/input0 lost synchronization, throwing 3 bytes away.
> 
> psmouse.c: bad data from KBC - bad parity
> ...

 

I am running kernel 2.6.16, and this is what i get when I try to re-apply the patch...

 *Quote:*   

> spring linux # patch -Np1 -i ../psmouse-resync-2.6.11-v11.patch
> 
> patching file drivers/input/mouse/alps.c
> 
> Hunk #1 succeeded at 55 with fuzz 2 (offset 4 lines).
> ...

 

appears the patch has been saved when I upgraded from 2.6.11 to 2.6.16. Eitherway, my mouse is going !@#$ crazy, every few minutes.

----------

## chovy

just bought a ps/2 iogear micro-kvm w/audio off newegg for $13. WOrks like a charm with ps/2 and scrollwheel.

I will *never* buy belkin again.

----------

## pjp

 *phunni wrote:*   

> I compared the Red Hat XF86Config to the gentoo one and the only difference in the mouse section is the device - /dev/input/mice in red hat.  This doesn't exist on my gentoo machine

  I just picked up an IOgear 2-Port USB KVM (Model GCS632U).  

I had the problem where Gentoo would lose the mouse after switching to Windows.  Even if the switch wasn't prolonged (aka, nothing went to sleep).  I changed my mouse setting to /dev/input/mice (from a non-existant /dev/input/mouse0.  mouse1, 2 and 3 existed though).

Switching seems to be working OK now, although I may not have keyboard function immediately during the bootup process.  It works for Grub.  Will have to test more.

----------

## chovy

i did the same, iogear 2-port micro kvm w/audio. works like a charm! never belkin again.

----------

## Dan

Just add psmouse.proto=imps to your grub.conf like ....

```
kernel (hd0,0)/vmlinuz-2.6.18-gentoo-r3 ro root=/dev/hda3 video=vesafb:ywrap,pmipal,1024x768-32@70 splash=silent,fadein,theme:livecd-2006.1 quiet CONSOLE=/dev/tty1 psmouse.proto=imps

```

and problem SOLVED

my belkin Omniview SE 4port works fine with this..

----------

