# mouse detection



## nORKy (Mar 30, 2010)

I have an usb mouse

When I startx (Xorg 7.4, fluxbox), it does not detect my mouse. If I unplug and plug my mouse, it detects and work fine. (while X is running)

Why ?


----------



## graudeejs (Mar 30, 2010)

show /etc/rc.conf
and output of

```
$ uname -a
```


----------



## SirDice (Mar 30, 2010)

Are both hald and dbus running correctly? Check if moused is loaded after booting. It should be automatically loaded.


----------



## fronclynne (Mar 30, 2010)

Alternatively, I run moused(8) and eschew hald & dbus, and my USB mouse works perfectly and my trackpad does as well.


----------



## nORKy (Apr 2, 2010)

```
FreeBSD pc-Joff.rmidom.intra 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Tue Jan  5 16:02:27 UTC 2010     [email]root@i386-builder.daemonology.net[/email]:/usr/obj/usr/src/sys/GENERIC  i386
```


```
keymap="fr.iso.acc"
linux_enable="YES"
moused_enable="NO"
moused_nondefault_enable="NO"
sshd_enable="YES"
dbus_enable="YES"
hald_enable="YES"
polkitd_enable="YES"
mysql_enable="YES"
apache22_enable="YES"
ntpd_enable="YES"
ntpd_sync_on_start="YES"
fusefs_enable="NO"
```


----------



## datastream (Apr 3, 2010)

I have similar problem on my thinkpad T61. xorg 7.4_4,both kernel and world at svn revision r206129.
all ports at newest reversion.
And i notice the hald patch has hard code the mouse device /dev/sysmouse,but i find hal use psm0 instead.

```
#ps -axw|grep mouse
5952  ??  I      0:00.02 hald-addon-mouse-sysmouse: /dev/psm0 (hald-addon-mouse-sy)
```
Now i stop moused and xorg works with psm0(I find i can't use /dev/sysmouse in xorg).xorg does works with psm0,but sometimes the mouse not work correctly(click button may not work).

sometimes moused will eat 100% cpu when it works with sysmouse.
moused works quite well with psm0,in console,synaptics_support doee not work.but mouse can't work in xorg.

MS bluetooth 5000 mouse works strange.
if moused works with psm0,when the bluetooth mouse move down,it acts like clicked a middle button and a enter button.
if moused works with sysmouse,the bluetooth mouse works nothing in xorg and do endless copy and paste in console.


----------



## datastream (Apr 4, 2010)

well i made the mistake.moused works good with psm0.if moused used psm0 and has been started,then hald will use sysmouse instead.Now both trackpoint and touchpad works well.but my bluetooth mouse, a move down action as a middle button click.Any changed in bluetooth stack?


----------



## nORKy (Apr 6, 2010)

```
ps -axw | grep mouse
45005  ??  IW     0:00,00 hald-addon-mouse-sysmouse: /dev/ums0 (hald-addon-mouse-sy)
```

I don't understand what you say. I don't use moused. (moused_enable="NO")

My mouse works fine.
My problem is when X start : hald don't see my mouse. I must unplug and plug to detect it


----------



## fronclynne (Apr 7, 2010)

nORKy said:
			
		

> ```
> ps -axw | grep mouse
> 45005  ??  IW     0:00,00 hald-addon-mouse-sysmouse: /dev/ums0 (hald-addon-mouse-sy)
> ```
> ...



Sounds like hald is misbehaving.  Do you have any way of getting a verbose output from hald at boot time to see if it's missing something?  Editing six or seven hundred thousand lines of "human readable" xml?  Getting some voodoo guru to wave a couple of chicken bones over your hald?


----------



## nORKy (Apr 7, 2010)

how to get the verbose output ??

How many chicken ?


----------



## datastream (Apr 7, 2010)

nORKy said:
			
		

> ```
> ps -axw | grep mouse
> 45005  ??  IW     0:00,00 hald-addon-mouse-sysmouse: /dev/ums0 (hald-addon-mouse-sy)
> ```
> ...



Maybe you can try moused_enable="YES" and moused_port= "/dev/ums0". 

```
20090124:
  AFFECTS: users of x11-servers/xorg-server, sysutils/hal
  AUTHOR: rnoland@FreeBSD.org

  sysutils/hal has been updated and should now properly detect mice for
  in X.org.  Use of AllowEmptyInput should no longer be needed for most
  users and moused should now work fine.
```
so if you are using newest hald,you can enable moused.
you can try hal-device,you may find some info about mouse.
it looks like this:

```
62: udi = '/org/freedesktop/Hal/devices/psm_0'
  freebsd.driver = 'psm'  (string)
  freebsd.unit = 0  (0x0)  (int)
  platform.id = 'psm.0'  (string)
  freebsd.device_file = '/dev/psm0'  (string)
  info.capabilities = { 'input', 'input.mouse' } (string list)
  info.category = 'input.mouse'  (string)
  input.device = '/dev/sysmouse'  (string)
  input.x11_driver = 'mouse'  (string)
  info.udi = '/org/freedesktop/Hal/devices/psm_0'  (string)
  info.subsystem = 'platform'  (string)
  info.product = 'PS/2 Mouse'  (string)
  info.parent = '/org/freedesktop/Hal/devices/atkbdc_0'  (string)
  info.addons = { 'hald-addon-mouse-sysmouse' } (string list)
```


----------

