Print View

Setting Up USB Mice
Created: 06/13/2005


General Information

Assuming you have a supported usb interface, being uhci, ehci, or ohci, and a usb hid mouse with or without a scroll wheel, this guide may or may not help you.

Configuration

Although most people report that their USB devices, including HID mice work out of the box on 5.x, I still recommend that you recompile your kernel to make sure everything works properly.

If you are still using a legacy release of FreeBSD you must recompile your kernel for USB mouse support.

Assuming you are using the x86 architecture, a standard chipset such as Sis, Via, or Intel, and have a USB 1.1-2 compliant host adapter, you first need to do the following:
#
#
#
cd /usr/src/sys/i386/conf
cp GENERIC HOSTNAME
nano -w HOSTNAME
Make sure the following entries are present under the USB support portion of the configuration file:
/usr/src/sys/i386/conf/HOSTNAME

# USB support
device          uhci          # UHCI PCI->USB interface
device          ohci          # OHCI PCI->USB interface
device          ehci          # EHCI PCI->USB interface (USB 2.0)
device          usb           # USB Bus (required)
device          ugen          # Generic
device          uhid          # "Human Interface Devices"
device          ukbd          # Keyboard
device          ums           # Mouse
Comment out the ehci entry if your motherboard doesn't have a USB 2.0 compatible interface.  Comment out the ukbd entry if you don't want support for usb keyboards.  Save the configuration file.
#
#
#
#
#
#
/usr/sbin/config HOSTNAME
cd ../compile/HOSTNAME
make depend
make
make install
reboot
Assuming you didn't disable the mouse daemon, once the system has booted, you should see a mouse pointer on the console which should be movable.

In order to setup xorg/x11 with your usb mouse, you should disable and kill the mouse daemon.  Edit /etc/rc.conf and add the following lines to the bottom:
moused_enable="NO"
In the /etc/X11/xorg.conf or /etc/X11/XF86Config file, under the InputDevice section, the following should be used if you have a usb mouse with a wheel.
    Identifier  "Mouse1"
    Driver      "mouse"
    Option "Protocol"    "Auto"
    Option "Device"      "/dev/ums0"
    Option "ZAxisMapping"       "4 5"
You now have a working usb mouse on your FreeBSD workstation.  Congratulations!

Author: James Cornell
unixpenguin2004 at earthlink dot net



1 Comment

Posted by pe3sos on April 07, 2009 at 4:10:22 pm EEST

I try to make kernel and ai have a error


i use amd64 8.0 current 200902


Copyright 2003 - 2010 BSD Guides.  All rights reserved.

About | Terms of Use | Privacy | Contact