Since today my Vaio even can do USB... I just received my first USB device: A mouse. Iīm running the kernel version 2.2.13, which does not come with a recent version of the USB code. The state of the art code can only be found in the development kernel... So itīs a good thing that Vojtech Pavlik did a back port of the new stuff to the stable kernel tree. The patches can be found at http://www.suse.cz/development/usb-backport/.
The process to get USB running is pretty straight forward:
OK, the setup is not yet complete. In order to use the mouse or a printer or any other device you first have to create certain device files and at least for the mouse add an entry in the XF86Config file. It does not make a lot of sense to repeat all the information here thatīs already covered in the USB HowTo.
Another good starting point to look for Linux and USB information is the Linux USB Page.
USB Mouse and XFree86
In order to use a USB mouse and the touchpad either at the same time, or the mouse instead of the touchpad there is still a little work to do.
The following section needs to be added to /etc/XF86Config so that XFree86 "knows" where to find the USB mouse:
Section "Xinput" SubSection "Mouse" DeviceName "USB Mouse" Protocol "IMPS/2" Port "/dev/usbmouse0" AlwaysCore EndSubSection EndSectionThe device file in the /dev directory needs to be created using the following command:
mknod /dev/usbmouse0 c 180 16
This works well as long as the mouse is connected when the X server is started. If it's not there, the server will run into a problem opening the mouse device and will exit with an error message.
... just add the following lines to /etc/XF86Config and the server will ignore the error condition and will start up even without a mouse attached:
Section "ServerFlags" AllowMouseOpenFail EndSection
At this time we know have a working USB mouse, as long as it was connected when the X server was first started. After that the mouse can be disconnected and reconnected as many times as you want and the X server will use it whenever it's there. If the mouse was not connected when the X server was started, all connecting and disconnecting will not make it work.
It took me a while to find a cure for that. The solution is only documented in the source code of the USB mouse driver: Just add one line to /etc/modules.conf (or /etc/conf.modules if you are still running an old system):
# for USB mice options mouse force=1
This will initialize the mouse device driver even if no mouse is connected. The X server will then be able to open the mouse device and will not receive an error message. After that you can connect your mouse and it will be picked up by the server.
|Last changed on Fri Dec 17 10:08:13 1999|
Karl Heinz Kremer|