# Problems with my new PS/2 mouse



## c083d4 (Jul 25, 2013)

Hello. When I installed FreeBSD 9.1-RELEASE a few days ago I was using a USB mouse... Now I bought a PS/2 one. I've already edited /etc/rc.conf, added 
	
	



```
moused_enable="YES"
```
and restarted the system, but it doesn't work, even in text mode.


----------



## wblock@ (Jul 25, 2013)

Do they still make PS/2 mice?  First, check that it's actually connected to the PS/2 mouse port, not the keyboard port.


----------



## c083d4 (Jul 25, 2013)

It's connected to the correct port, it has a mouse drawing.


----------



## wblock@ (Jul 26, 2013)

Is this a desktop or notebook computer?


----------



## c083d4 (Jul 26, 2013)

It's a desktop.


----------



## wblock@ (Jul 26, 2013)

What messages are shown about the mouse in dmesg(8)?  What happens in the console when you move the mouse?


----------



## c083d4 (Jul 26, 2013)

This is the dmesg(8) output: http://pastebin.com/SrrXBVP5

When I ran that command both the PS/2 mouse that isn't being recognized and the USB one that is working fine were attached, but at boot time and when X started the PS/2 one was the only mouse. During boot, before starting X (I use `startx`), I was able to momentarily see the arrow, but it wasn't moving while I was moving the mouse. Once X started I also saw the arrow, but I still couldn't use the mouse, so I had to connect the USB one.


----------



## wblock@ (Jul 26, 2013)

It's hard to tell when both types might be in the output.  First guess is that you got a bad PS/2 mouse.


----------



## c083d4 (Jul 26, 2013)

Ok. Is there any possibility of the mouse being incompatible with FreeBSD?


----------



## wblock@ (Jul 26, 2013)

The only compatibility issues with mice are wireless mice.  Used to be a problem, but nobody seems to mention it any more.


----------



## Amzo (Jul 26, 2013)

This is a problem I've had with moused for a while. It doesn't like /dev/psm0 for my PS/2 mouse which it defaults to, and even `cat`ing this device in the terminal shows no output, but however /dev/bpsm0 works.

Try adding this to /etc/rc.conf


```
moused_port="/dev/bpsm0"
```

This is an issue I've had with FreeBSD for quite a few years, even though /dev/psm0 is there, it only likes the block device of /dev/bpsm0


```
[amzo@Bahamut ~]$ ls -lars /dev/*psm*
0 crw-rw-rw-  1 root  wheel  0x2a Jul 26 15:09 /dev/psm0
0 crw-rw-rw-  1 root  wheel  0x2b Jul 26 15:09 /dev/bpsm0
```

The man page for psm reports the following:


```
/dev/psm0   `non-blocking' device node
      /dev/bpsm0  `blocking' device node
```

and from the mouse man pages:


```
The mouse drivers may have ``non-blocking'' attribute which will make the
     driver return immediately if mouse data is not available.
```

I've never really been able to figure out why it doesn't like /dev/psm0 and why only /dev/bpsm0 works fine in X and so fourth. I'm not sure if this is a bug with FreeBSD's mouse driver.

If you do indeed have /dev/bpsm0 try setting it in /etc/X11/xorg.conf

I use the following to get a working mouse device on FreeBSD in X


```
Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/bpsm0"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection
```


----------



## c083d4 (Jul 26, 2013)

A few hours ago I decided to test the mouse with a Knoppix live CD. I don't know why I didn't think about that before. It worked, so I thought it was incompatible with FreeBSD and asked the vendor to change it for a USB one (they only had Noganet PS/2 mice).

Thanks to both of you anyways


----------

