Setting up a USB mouse in FreeBSD 4.x ===================================== For this article, I will explain how to install your USB mouse in FreeBSD, and how to operate it in the console & X. I will assume you can build your own custom kernels. If not, please read the handbook section first. Firstly, you need to add some options to the kernel. These are: # USB mouse support #device uhci # UHCI PCI->USB interface #device ohci # OHCI PCI->USB interface device usb # USB Bus (required) device ums # Mouse pseudo-device ether # REQUIRED for usb With these above settings added to the kernel it is VERY IMPORTANT you uncomment only one line; either uhci OR ohci. To work out which one you need to uncomment for particular USB controller, read the manpages for uhci & ohci. Also, the ether device is needed. Without it, your kernel will not compile. The ums device enables the usb mouse code, and the usb devide is code required for usb operation of all devices. Now compile your kernel, and reboot. Once you have rebooted, you should see your usb controller and usb mouse listed in dmesg. To check, type dmesg|more. You should see something similar, to what is shown below. Not I have 2 USB controllers. uhci0: port 0xe400-0xe41f irq 10 at device 7.2 on pci0 usb0: on uhci0 usb0: USB revision 1.0 uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered ums0: Microsoft Microsoft IntelliMouse\M-. Optical, rev 1.10/1.08, addr 2, iclass 3/1 ums0: 5 buttons and Z dir. uhci1: port 0xe800-0xe81f irq 10 at device 7.3 on pci0 usb1: on uhci1 usb1: USB revision 1.0 uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered Now you know your mouse is detected by the system, edit /etc/rc.conf and add these items: moused_enable="YES" moused_port="/dev/ums0" ums0 could be any other number depending on where your mouse is on the hub. Check dmesg to be sure. After another reboot, your mouse pointer should now move around the screen in the console. For setting up your mouse in X, set up X normally, but use "Auto" as the mouse type, and /dev/sysmouse for the port. Notes: ===== If you can't see /dev/umsX in /dev after booting your new kernel, cd to /dev and type ./MAKEDEV ums as root. Good Luck! Andy Smith [aa_smith@iname.com]