# Mouse found by FreeBSD, but moused does not recognize type



## tps800 (Jan 21, 2021)

FreeBSD 12-STABLE, FreeBSD 13-CURRENT, FreeBSD 13-ALPHA1, FreeBSD 10-STABLE, FreeBSD 11-STABLE

they all detect my mouse, connected via USB and mapped to /dev/uhid0.
`uhidctl -f /dev/uhid0 -l -a` works as expected showing mouse movements and keypresses.
Attaching moused to /dev/uhid0 moused tells me it cant detect mouse type. The kernel does not create any of the usual mouse related /dev-Entries /dev/psm0, /dev/usm0. The ums(4)-module is loaded at boot time by entry `usm_load="YES"` in /boot/loader.conf.

I am going out of ideas, since uhidctl(8) detects an can work with data provided by /dev/uhid0, but moused(8) can't.

Any mouse type I could provide to moused(8) for some generic USB mouse that would make moused(8) work with /dev/uhid0?
As far as now I tried all given for moused(8) but without any success.


----------



## SirDice (Jan 22, 2021)

You don't need to load ums(4), it's builtin on the GENERIC kernel. The /dev/psm0 device is for PS/2 mice. You don't need to load moused(8), it's automatically loaded for USB mice through devd(8).


----------



## tps800 (Jan 23, 2021)

Yes. Moused is loaded by devd for usb-mice. But normally it is loaded referencing the devd created mouse device: moused is started `moused -p /dev/<whateverdevdcreatedforconnectedmouse> -t auto` `ps` lists this. I've found, after connecting an usb mouse devd starting moused with `moused -p /dev/psm0 -t auto`. `/dev/psm0` definitely not an usb mouse device! Thus I stopped moused, started it manually recognizing moused could not handle data from `/dev/uhid0` created by connecting some usb-mouse.

Seems some problems here:
1. why does devd create `/dev/uhid0`, but start moused with `/dev/psm0`
2. why is moused unable to read data provided by `/dev/uhid0`, while uhidctl is able to decode this data

And last: without `moused_enable="YES"` within `/etc/rc.conf` moused wont start at all. Not even by devd.


----------

