# Can't get my mouse to work



## fred6633 (Aug 24, 2009)

Hello,

My mouse is connected via a PS/2 -> USB adapter and it is dead.

It works in Linux and Windows but not in FreeBsd

Help would be appreciated.

Fred


----------



## SirDice (Aug 24, 2009)

Try to tail /var/log/messages and plug in the mouse. Anything being detected?


----------



## fred6633 (Aug 24, 2009)

Thanks,
These lines were added after I plugged in the mouse.


```
Aug 24 09:59:00  root: Unknown USB device: vendor 0x04d9 product 0x1400 bus uhub5
Aug 24 09:59:01  kernel: ukbd1: <vendor 0x04d9 product 0x1400, class 0/0, rev 1.10/1.43, addr 2> on uhub5
Aug 24 09:59:01  kernel: kbd3 at ukbd1
Aug 24 09:59:01  kernel: ums1: <vendor 0x04d9 product 0x1400, class 0/0, rev 1.10/1.43, addr 2> on uhub5
Aug 24 09:59:01  kernel: ums1: 5 buttons and Z dir.
```

Fred


----------



## SirDice (Aug 24, 2009)

That means it's recognised as a mouse. When in console, move the mouse. Is there a mouse pointer appearing?

If there is but you don't get a working mouse in Xorg it's quite likely you don't have these in /etc/rc.conf:

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


----------



## fred6633 (Aug 24, 2009)

Thanks,
In rc.conf I have 
	
	



```
gnome_enable="YES"
```

That should include dbus and hald enable.

http://www.freebsd.org/gnome/docs/halfaq.html

However I have an error in var/log/messages:


```
root: /etc/rc: WARNING: $dbus_enable is not set properly - see rc.conf(5)
```

How do I get into a console to test the mouse?

Fred


----------



## SirDice (Aug 24, 2009)

If you remove that gnome_enable and add the hald and dbus seperately, GDM won't get started. 
You can use startx to start gnome if you have this in ~/.xinitrc:

```
exec gnome-session
```

Gnome_enable should indeed include both hald and dbus, somehow it seems to error on that though.


----------



## fred6633 (Aug 24, 2009)

Thanks,
I added dbus_enable="YES" and now the warning message is gone.

But the mouse still doesn't work and in var/log/messages it is still an unknown USB device.

Isn't there a command "gdm stop" or something that takes you to a console?

Fred


----------



## SirDice (Aug 24, 2009)

fred6633 said:
			
		

> But the mouse still doesn't work and in var/log/messages it is still an unknown USB device.


It's recognized as ums1.

What does your xorg.conf look like?


----------



## fred6633 (Aug 24, 2009)

Thanks,

It seems that I don't have an xorg.conf file.

Locate gives this output:


```
[root@ /usr/libexec]# locate xorg.conf
/usr/local/man/man5/xorg.conf.5.gz
```

Fred


----------



## DutchDaemon (Aug 24, 2009)

'locate' is not real-time. Look in /etc/X11 to make sure.


----------



## SirDice (Aug 24, 2009)

It could be you don't have one. If not hal should pick up your mouse as that's the default way of handling things. Have a look in your /var/log/Xorg.0.log and see if there's anything there regarding the mouse.


----------



## fred6633 (Aug 24, 2009)

Thanks,

Here are some outputs:


```
[fredrik@ /usr/home/fredrik]$ cat /var/log/Xorg.0.log |grep mouse
(==) NV(0): Silken mouse enabled

[fredrik@ /usr/home/fredrik]$ cat /var/log/Xorg.0.log |grep pointer
(II) Cannot locate a core pointer device.
```

I could mention that mice connected directly to USB, no adapter, works fine.

Unfortunatley the one with the adapter is the one I prefer.

Fred


----------



## fred6633 (Aug 25, 2009)

Ok, it seems that the problem is that HAL sees the mouse as an unknown device.

Is there a way to tell HAL that the "unknown" device is a mouse?

Fred


----------



## SirDice (Aug 25, 2009)

Are you sure you have the correct adapter? I've had both mice and keyboards with a PS/2->USB converter. There's a difference between the two though. You cannot use a keyboard PS/2->USB for mice and vise verse.


----------



## fred6633 (Aug 25, 2009)

It's an adapter with a green connection for the mouse and a purple connection the keyboard. I only use the green for the mouse since my keyboard has an USB cable.

The mouse works in Windows XP and all Linux distros I have tried.

But it doesn't work in FreeBsd and OpenSolaris.

Fred


----------



## SirDice (Aug 25, 2009)

fred6633 said:
			
		

> It's an adapter with a green connection for the mouse and a purple connection the keyboard. I only use the green for the mouse since my keyboard has an USB cable.


I've got one of those too. Works like a charm. Not very helpful I know but I don't see why it's not working.


----------



## CodeBlock (Aug 28, 2009)

Don't know if it matters, but try making an xorg.conf, run `X -configure`, and mess with that a bit. If nothing else you'll be able to add to it later, if you ever decide to enable compiz, etc.


----------



## fred6633 (Aug 28, 2009)

Thanks,
I've been thinking of that myself to create a xorg.conf file.

From what I understand it's a two step operation. I also must prevent HAL from probing the device.

Fred


----------



## fred6633 (Aug 30, 2009)

Hello again,

I tested in a console and I can tell that there is a mouse pointer when I move the mouse.

I also did an Xorg -configure but there is still just an xorg.conf.new file in /root.

The output of Xorg -configure was "Xorg detected your mouse at device /dev/sysmouse".

It passed the test Xorg -config xorg.conf.new -retro

Fred


----------



## Beastie (Aug 30, 2009)

And? Did you put your /root/xorg.conf.new in /etc/X11/xorg.conf? Did you try to xinit again? Did it work?


----------



## jkfeng (Aug 30, 2009)

There is two step:
1./etc/rc.conf  add moused_enable="NO"
2.xorg.conf 


```
Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "PS/2"
	Option	    "Device" "/dev/psm0"
	Option      "ZAxisMapping" "4 5"	
EndSection
```

try it!!!


----------



## tangram (Aug 30, 2009)

X11 Configuration.


----------



## fred6633 (Aug 31, 2009)

Thanks,

I haven't started to the use xorg.conf file yet. I am unsure how to modify it. I guess I just need the section Inputdevice.

Is this really correct jkfeng?


```
There is two step:
1./etc/rc.conf add moused_enable="NO"
2.xorg.conf

Code:

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "PS/2"
	Option	    "Device" "/dev/psm0"
	Option      "ZAxisMapping" "4 5"	
EndSection

try it!!!
```

The mouse part of the created xorg.conf.new looks quite different:


```
Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/sysmouse"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection
```

Fred


----------



## fred6633 (Aug 31, 2009)

I tried with this xorg.conf in /etc/X11/xorg.conf


```
Section "ServerLayout"
	Identifier     "X.org Configured"
	InputDevice    "Mouse0" "CorePointer"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/sysmouse"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection
```

But the mouse still doesn't work.

moused_enable="NO" is already the defalt setting in /etc/defaults/rc.conf.

Fred


----------



## fred6633 (Aug 31, 2009)

Hello again!

Finally solved.
Option "AutoAddDevices" "false" in the ServerLayot section did the trick.

Thanks to all for suggestions.

Fred


----------

