USB Devices under Linux
Introduction
This page gives advice on how to install and use certain USB devices under Debian Linux. Theses advices are followed at your own risk. The steps I describe worked for my hardware, but they may very well not work or do damage to your hardware.
Contents
USB Mouse
USB Joystick
External USB Drive
USB Mouse
Recompile the kernel with the following options:
Input core support --> Input core support Y
Input core support --> Mouse support Y
USB support --> Support for USB UHCI (NEW) Y
USB support --> USB Human Interface Device (full HID) support Y
USB support --> HID input layer support Y
USB support --> /dev/hiddev raw HID device support Y
Then, you shoud edit /etc/X11/XF86Config-4 and add the following
section:
Section "InputDevice"
Identifier "Generic Mouse"
Driver "mouse"
Option "CorePointer"
Option "SendCoreEvents" "true"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "off"
Option "Buttons" "5"
EndSection
Click here for an example XF86Config-4 file.
USB Joystick
There are a few games under linux that are fun and that are easier to play
with a gamepad, like koules or the NeoGeo-emulator gngeo.
This is why I decided to get my Microsoft SidWinder GamePad to work under
Linux. Actually, it's very easy. Just recompile your kernel with the options:
Input Core support --> Joystick support Y
USB support --> USB Humen Interface Device (full HID) support Y
This will create new devices /dev/input/js0 to .../js3. For
some games, e.g., koules, you need to make symbolic links:
ln -s /dev/input/js0 /dev/js0
ln -s /dev/input/js1 /dev/js1
ln -s /dev/input/js2 /dev/js2
ln -s /dev/input/js3 /dev/js3
External USB Drives
I only have USB1 on my laptop. So, what's the point in having an external drive
on USB1? The point is that a lot of devices are recognized as external harddisks.
For instance my Casio Exilim digital camera, and my
Creative MuVo MP3 player. Here's what needs to be done:
Recompile your kernel with the following options:
USB support --> USB Mass Storage support Y
File systems --> VFAT Y
Unplug the USB device. As root, type
tail -f /var/log/messages
Now plug the device into your USB port and observe the tail-output. It should
say something about new mass storage device and should end up telling you about
a new SCSI harddisc, normally /dev/sda0, /dev/sdb0 or similar.
Add the following line to /etc/fstab:
/dev/sdb1 /usb_drive vfat ro,noauto,user 0 0
where you should replace /dev/sdb1 by the name of the device and
/usb_drive by the name of a directory that you will create.
Now, any user can mount the USB device by typing mount /usb_drive.
Some people write that they observed a kernel panic when unplugging a mounted
USB device, so make sure you always umount it before unplugging.
However, I unplugged a mounted device several times without problems.
Attention: Not all USB devices will work with Linux. First, they have to be
recognized as external harddrives. (It should say on the box: "no drivers needed
for WinXP".) But even then, it's not sure that the device will actually work.
Check out Google to look for success reports by other Linux users before
buying new hardware.
You might also want to look at this
list of supported Linux devices. If you don't find it there, don't give up.
The list is not complete.