Mouse Device Drivers and Files

To receive mouse input, you must activate one or more kernel modules, depending upon the type of mouse you're using:

• PS/2 mice PS/2 mouse support is enabled in the Mice section of the Linux kernel configuration script, as shown in Figure 15.13. This section of the kernel configuration also includes support for a number of more exotic mouse types, including bus mice.

Part IV

Figure 15.13

PS/2 mouse support requires its own specialized mouse driver.

Figure 15.13

PS/2 mouse support requires its own specialized mouse driver.

• Serial mice Serial mice use the normal Linux serial port drivers, which you activate by selecting the Standard/generic (dumb) serial support option in the Character devices configuration menu. If you've connected the mouse to a specialized multiport serial board, you must activate support for that type of board instead of, or in addition to, the conventional serial port support.

• USB mice There are three mouse-related options in the Linux USB support kernel configuration area. The first is the USB Human Interface Device (HID) support option, which is used to support mice, keyboards, and other input devices. The second option is the USB HIDBP Mouse support, which provides support only for mice. You need only one of these two options. The third mouse option is titled Mouse support, and it allows a USB mouse to be accessed as if it were a PS/2 mouse. This is a desirable option because it makes USB mice usable by software (such as XFree86) that understands PS/2 mouse protocols. This last option also supports a suboption, Mix All Mice into One Device, which lets you connect multiple USB mice and have them all work through the same device file. If this option isn't selected, each mouse requires its own device file, and can be accessed independently. No matter what USB mouse-specific options you select, you must also enable basic USB support, including support for either UHCI or OHCI, as appropriate for your motherboard's USB controller.

Linux routes mouse input through a variety of device files, as summarized in Table 15.2. On most systems, /dev/mouse is configured as a symbolic link to the actual mouse device, such as /dev/psaux. Therefore, it's often possible to refer to /dev/mouse rather than the actual mouse device file. Doing so can be a useful mnemonic, but, as each mouse type is unique, it might not save you much effort in reconfiguring a mouse when you change from one type to another.

Chapter 15

Table 15.2 Mouse Device Files

Mouse Type


Device Major

Device Minor



















0, 2, others






32 (and up)

Either of the two standard serial ports can be used for a mouse, or subsequent serial ports on computers so equipped. Normally only one USB mouse is used, but you can attach more than one, in which case you can configure the Linux kernel to merge all their inputs into one device or split them up, as mentioned earlier. In the second case, the device minor number for the second and subsequent mice is incremented, and you must create additional device files.

Was this article helpful?

0 0
The Ultimate Computer Repair Guide

The Ultimate Computer Repair Guide

Read how to maintain and repair any desktop and laptop computer. This Ebook has articles with photos and videos that show detailed step by step pc repair and maintenance procedures. There are many links to online videos that explain how you can build, maintain, speed up, clean, and repair your computer yourself. Put the money that you were going to pay the PC Tech in your own pocket.

Get My Free Ebook

Post a comment