# X11 and moused



## Infra_HDC (Jul 19, 2022)

Hello, all!
Several monts ago, my mouse was stopped working in X11, and was worked agaion after adding moused in rc.conf; this was after a some update.
Today, i was disabled moused and detected, what my mouse still works.
What the matter?
FreeBSD is running as guest into ORACLE VirtualBox 6.1.34, host OS is GNU/Linux.


----------



## SirDice (Jul 20, 2022)

How is the mouse configured in the Virtualbox settings of the VM? If it's set to "PS/2 mouse" then it would need `moused_enable`, but if it's set to "USB Tablet" or "USB multi-touch" then moused(8) gets automatically loaded due to devd(8) detecting it. 


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

        action "service moused quietstart $cdev";
};

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" "CREATE";
        match "cdev" "wsp[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";
};
```

It also matters if you have emulators/virtualbox-ose-additions set up correctly. It will provide the "seamless" mouse experience. The `vboxmouse` driver gets automatically picked up by Xorg.


```
[    31.066] (II) LoadModule: "vboxmouse"
[    31.066] (II) Loading /usr/local/lib/xorg/modules/input/vboxmouse_drv.so
[    31.073] (II) Module vboxmouse: vendor="Oracle Corporation"
[    31.073]    compiled for 0.0.0, module version = 1.0.0
[    31.073]    Module class: X.Org XInput Driver
[    31.073]    ABI class: X.Org XInput driver, version 24.1
[    31.073] (**) Load address of symbol "VBOXMOUSE" is 0x80b5fee10
[    31.073] (II) Using input driver 'vboxmouse' for '(unnamed)'
[    31.073] (**) (unnamed): always reports core events
```


----------

