# Mouse not working in X



## SeaHag (Jul 14, 2011)

I know this has been asked a million times before but I can't get it working. And please don't say "Read the handbook". That answer is not only annoying but not helpful. 

After upgrading to 7.2 to 8.2 my mouse won't work after starting X or during *X -configure*. The handbook says:

"If the mouse does not work, you will need to first configure it before proceeding. See Section 2.10.10 in the FreeBSD install chapter.  "

So I followed that link to section 2.10.10 and it shows screenshots of what looks like sysinstall. So I go to sysinstall and configure the mouse and it works fine in sysinstall then go back to startx and no mouse.

/etc/rc.conf:

```
.
.
.
hald_enable="YES"
dbus_enable="YES"
linux_enable="YES"
mouse_type="auto"
mouse_enable="YES"
```

There's more about the network at the top but I don't want to type it all by hand since the mouse isn't working, I'm on another PC typing this.

in /etc/X11/xorg.conf:

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

Any suggestion how to get the mouse working, it's a USB mouse.


----------



## DutchDaemon (Jul 14, 2011)

hald should take care of it, but other than that, it's mouse*d*_enable and mouse*d*_type.

[cmd=]$ grep mouse /etc/defaults/rc.conf[/cmd]


----------



## SeaHag (Jul 14, 2011)

*Fixed*

I got it working by adding the line:

     Option      "Buttons" "5"

to the mouse section of xorg.conf. I guess I missed that part in the handbook.


----------



## wblock@ (Jul 14, 2011)

By "not working", you meant "the buttons don't work right"?  Or maybe the mouse didn't work at all (no pointer), but you enabled hald and then restarted somewhere in between, making it look like the button change fixed it.  Don't forget that after a 7.x to 8.x upgrade, all ports need to be rebuilt.

If the Handbook isn't helping, be specific about what's missing.  This can help to get it fixed.


----------



## SirDice (Jul 15, 2011)

If it's a USB mouse there no need to explicitly run moused. It will get started automatically once the USB system finds the mouse.


----------



## vfbsilva (Jul 16, 2011)

wblock said:
			
		

> By "not working", you meant "the buttons don't work right"?  Or maybe the mouse didn't work at all (no pointer), but you enabled hald and then restarted somewhere in between, making it look like the button change fixed it.  Don't forget that after a 7.x to 8.x upgrade, all ports need to be rebuilt.
> 
> If the Handbook isn't helping, be specific about what's missing.  This can help to get it fixed.



I get the same issue I can see the mouse pointer but can't move it. Notice I'm using VirtualBox to run FreeBSD so this *might* be the issue. I've added the suggested lines in rc.conf. I can boot xorg, the pointer is theee but does not move. What can I do?


----------



## wblock@ (Jul 16, 2011)

Here's the non-HAL xorg.conf I use for a generic VM.  You can enable HAL in rc.conf, but it won't be used.  This is an xfce system that is meant to be usable without modification on most hardware or in a VirtualBox VM, so a lot of the sections are left out to autoconfig.  Install emulators/virtualbox-ose-additions in the VM.


```
Section "ServerLayout"
	Identifier   "X.org Configured"
	Option	     "AIGLX" "On"
	InputDevice  "Mouse0" "CorePointer"
	InputDevice  "Mouse1"
	Option       "AutoAddDevices" "Off"
	#Option       "Log" "sync"
EndSection

Section "Files"
	ModulePath "/usr/local/lib/xorg/modules"
EndSection

Section "DRI"
	Group 0
	Mode  0660
EndSection

Section "Module"
	Disable "record"
EndSection

Section "Extensions"
	Option       "Composite" "Enable"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

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

Section "InputDevice"
	Identifier "Mouse1"
	Driver "vboxmouse"
EndSection
```


----------



## vfbsilva (Jul 16, 2011)

Oki I have the xorg as you posted still it is not working. I also got this message from virtualbox:


```
The Virtual Machine reports that the guest OS does not support mouse pointer integration in the current video mode. 
You need to capture the mouse (by clicking over the VM display or pressing the host key) in order to use the mouse inside the guest OS.
```
What can I do?


----------



## wblock@ (Jul 17, 2011)

No idea, never seen that message.  Possibly due to the Linux host.


----------



## vfbsilva (Jul 17, 2011)

Still the mouse works on virtual box as it worked on PCBSD installer. So it is something like on my FreeBSD install I think. I will try to install it on the hard disk to see if it does persist.


----------



## vfbsilva (Jul 17, 2011)

Ive added:

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

To rc.conf and it did the trick. Weeeeeeeeell seems I have a fully functional FreeBSD system in my VirtualBox 
Now I will install it onto a hard disk


----------

