# mouse won't work with kvm



## doughy (Nov 7, 2010)

I'm using an older compaq kvm and when I try to use the mouse on freebsd it won't work. It does work with a mouse connected directly to the ps/2  connector on the freebsd box. Has anyone had any problems with using freebsd through a kvm? Are there any kvms known to work with freebsd?


----------



## graudeejs (Nov 7, 2010)

What is kvm?


----------



## doughy (Nov 7, 2010)

keyboard/video/mouse


----------



## sk8harddiefast (Nov 8, 2010)

If I am not wrong kvm is something like this: http://www.lindy.co.uk/lindyshop/pictures/32339big.jpg
If for example you have one screen but two computers, then you change from one computer to other using the kvm.
There are a lot of kvms. Mouse / keyboard, monitor etc.

*PC1*----*KVM*---*Monitor*
*PC2*____|


----------



## phoenix (Nov 8, 2010)

PS/2 KVMs can be problematic.  Depends on whether or not the KVM provides a virtual PS/2 connection when switched over to the other computer.  FreeBSD doesn't always detect a hot-plugged PS/2 device.

You can generally tell if the KVM keeps the PS/2 connection alive by switching the KVM off the FreeBSD computer, and booting it.  Then switch back and check the output of *dmesg* to see if the PS/2 mouse is detected.


----------



## doughy (Nov 8, 2010)

good advice phoenix. I'll try that


----------



## phoenix (Nov 8, 2010)

You may be able to re-establish the mouse connection by using moused(), and just restart it when you switch the KVM:
`# /etc/rc.d/moused restart`


----------



## doughy (Nov 8, 2010)

I tried booting with the kvm on another computer and /dev/psm0 wasn't found. I tried to start moused in /etc/rc.d but it didn't work. Then I tried booting with the kvm on that the computer in question. /dev/psm0 was found and the mosue cursor is visible but it acts exremely quirky when it does anything at all (which is not often). Again, I tried to restart moused via /etc/rc.d/moused but it still doesn't work 
Once again, it does work with the mouse plugged directly into the ps2 port on the computer


----------



## rbelk (Nov 9, 2010)

I have run into this problem before, here's what helped me.

1. Make sure the following are in /etc/rc.conf

```
hald_enable="YES" 
dbus_enable="YES"
```

2. This is an oldie, some KVM's mess with the mouse protocol when switching systems. Add this following to /etc/X11/xorg.conf

```
Option "Protocol" "ExplorerPS/2"
```

3. There is another fix, but is was for Debian Linux

```
Use psmouse.proto=bare on the kernel command line, or proto=bare on the
psmouse module command line.
```

Maybe some one on the forum can translate to BSD.


----------



## doughy (Nov 12, 2010)

I had mouse activity after a reboot on one of the freebsd computers I have (I'm running two) but dont' know why. after a few minutes and chaging between computers it quit working. I tried what you said rbelk but it didn't work either. I tried restarting moused too, but didn't work either. I'm stumped


----------

