USB Mouse support under 4.0 Release

USB Mouse support under 4.0 Release

originally placed this article in the Reader Forum, but I
thought it deserved an article of its own.  Thanks Benn.

4.0-R: Quick and Dirty USB Mouse support

Gentlebeings —

For your quick and dirty USB Mouse support, please
following these easy steps:

  1. Add the appropriate entries to your kernel configuration file:

    device uhci
    device ohci
    device usb
    device ums

  2. Add the appropriate lines to your /etc/rc.conf file:

    (though I like -vv personally, just for the scroll factor)

  3. Make sure your /etc/usbd.conf has these lines in it:

    device "Mouse"
    devname "ums[0-9]+"
    attach "/usr/sbin/moused -p /dev/${DEVNAME} -I

  4. Create the device entry

    cd /dev
    ./MAKEDEV ums0

  5. Rebuild your kernel
    and reboot.  As always, I would recommend saving /kernel to /kernel.stable before
    trying out the new kernel.  It’s a handy thing to have around anyways.
  6. Add the following line to /etc/rc.conf which enables the mouse on all
    virtual terminals:

    allscreens_flags="-m on"

I don’t think I forgot anything, but if I did please let me know 🙂

— Benn

References and man pages

Benn recommends the following man pages:

  • usb(4)
  • usbd(8)
  • usbd.conf(5)
  • usbdevs(8)
  • ums(4)

If you have X11 pointed at sysmouse, then this will work just fine.  And it will
support plugging/unplugging the mouse at runtime without the need of a manual HUP.


You have to do this:

vidcontrol -m on

to actually enable it on the terminal.  Alexander Anderson said he found this
piece of info on the man page for moused(8) by accident.  He also suggested step 6

Leave a Comment

Scroll to Top