# no usb mouse in v13 installation.



## dalpets (Apr 28, 2021)

Have tried a couple of usb mice & have `moused_enabled="YES"` in /etc/rc.conf


----------



## SirDice (Apr 28, 2021)

`moused_enable` is for PS/2 mice, moused(8) for USB mice is automatically loaded through devd(8). So, run `tail -F /var/log/messages` and plug in a mouse. Anything getting logged? If nothing is being logged, are those USB ports enabled?


----------



## dalpets (Apr 28, 2021)

SirDice said:


> `moused_enable` is for PS/2 mice, moused(8) for USB mice is automatically loaded through devd(8). So, run `tail -F /var/log/messages` and plug in a mouse. Anything getting logged? If nothing is being logged, are those USB ports enabled?


Gives;
kernel: ums0: on uhb3
usb optical mouse, class 0/0, rev 1.10/1. address 2. on usbbus0
ums0: 3 buttons & [XYZ] coordinates ID=0


----------



## SirDice (Apr 28, 2021)

And that's your USB mouse.


----------



## dalpets (Apr 28, 2021)

SirDice said:


> And that's your USB mouse.


Any idea why it's frozen on the screen?


----------



## zirias@ (Apr 28, 2021)

SirDice said:


> `moused_enable` is for PS/2 mice, moused(8) for USB mice is automatically loaded through devd(8).


I don't think this is correct. If you want a mouse on the console, you need moused(8). I assume this is also true if you intend to use /dev/sysmouse from any application. Of course, X can use a mouse by other means.


----------



## SirDice (Apr 28, 2021)

Zirias said:


> I don't think this is correct.


It is.

```
notify 100 {
        match "system" "DEVFS";
        match "subsystem" "CDEV";
        match "type" "CREATE";
        match "cdev" "ums[0-9]+";

        action "service moused quietstart $cdev";
};

notify 100 {
        match "system" "DEVFS";
        match "subsystem" "CDEV";
        match "type" "DESTROY";
        match "cdev" "ums[0-9]+";

        action "service moused stop $cdev";
};
```



Zirias said:


> If you want a mouse on the console, you need moused(8).


Which is automatically loaded when a USB mouse is detected.


----------



## zirias@ (Apr 28, 2021)

Looks like this _should_ work. I wonder whether it does at boot, will have to test that on my only machine with an USB mouse connected during boot 

Anyways, explicitly enabling moused never hurts…


----------



## SirDice (Apr 28, 2021)

Well, it has worked this way as far back as USB mice have been supported, so I expect it'll work fine. 



dalpets said:


> Any idea why it's frozen on the screen?


Not sure why. Anything special about that mouse? moused(8) should work with any standard HID mouse.


----------



## monwarez (Apr 28, 2021)

Not sure if it is relevant, but for some mice I had to load ums by adding it in my kld_list in /etc/rc.conf


----------



## jb_fvwm2 (Apr 28, 2021)

`kldload ums; kdload rtwn_usb; kldload rtwn`  I run those before `Xorg` to have mouse functionality


----------



## SirDice (Apr 29, 2021)

rtwn(8) and rtwn_usb(4) are wireless network card drivers, they have nothing to do with your mouse.


----------



## jb_fvwm2 (Apr 29, 2021)

Oops. You're correct. The main purpose of the script which has
those commands is to start wifi, but probably  fixes a mouse issue, a
long while back so I don't recall the details.


----------



## SirDice (Apr 29, 2021)

There should be no need to load ums(4), it'll get loaded automatically. At least it has done so on all my systems so far. If you want to make sure it's loaded you could simply add it to loader.conf or `kld_list` (I would recommend the latter for anything that's not required for the system to boot).


----------

