View previous topic :: View next topic |
Author |
Message |
Vlad Apprentice
Joined: 09 Apr 2002 Posts: 264 Location: San Diego, California
|
Posted: Sat Apr 13, 2002 2:53 am Post subject: USB Mouse and Keyboard How-To |
|
|
Installing a USB Mouse and/or Keyboard in Gentoo
Forward: The following document assumes that you are using at least a USB Mouse or Keyboard and have the ability to recompile the gentoo-sources kernel. This document presents the installation of USB drivers in a "modular" form to better diagnose any problems that you may encounter. When using a USB mouse and keyboard, however, it may be preferable to compile the USB drivers statically into the kernel. If you have any further questions or problems, you may wish to read over the USB HID Configuration Guide from www.linux-usb.org before posting a question.
This document is broken down into three sections:
1. USB Mouse (only)
2. USB Keyboard (only)
3. USB Mouse & Keyboard
USB Mouse Howto:
1. Enter your kernel configuration
Code: | cd /usr/src/linux
make menuconfig |
2. Once in the configuration screen, scroll down to Input Core Support, and
hit enter.
3. Hit "m" for Input Core Support. Scroll down to Mouse Support, and hit m. Exit from this menu.
4. Scroll down to USB support and hit enter.
5. In USB Support, hit y at Support for USB. Scroll down to "Preliminary USB device filesystem" and hit y. Include either "UHCI (Intel PIIX4, VIA, ...) support" or "UHCI Alternate Driver (JE) Support" as modules (m). Finally, include "USB Human Interface Device (full HID) support" as a module (m). Include HID input layer support with y.
6. Exit USB Support, then exit the menuconfig. Now do "make dep && make clean bzImage modules modules_install".
7. The following new modules will be created:
Modules Name..................................Path to modules
1a. UHCI (Intel PIIX4, VIA,...)............ /lib/modules/kernel-version/kernel/drivers/usb/usb-uhci.o
or
1b. UHCI Alternate Driver (JE) support /lib/modules/kernel-version/kernel/drivers/usb/uhci.o
2. USB Human Interface Device....... /lib/modules/kernel-3. version/kernel/drivers/usb/hid.o
3. Input Core Support..................... /lib/modules/kernel-version/kernel/drivers/input/input.o
4. Mouse Support............................ /lib/modules/kernel-version/kernel/drivers/input/mousedev.o
8. Be sure to mount your /boot partition and copy over the new kernel image!
9. Edit your /etc/modules.autoload file and add the following lines:
Code: | input
mousedev
hid
usb-uhci (or uhci) |
10. Reboot your machine to test your new drivers.
11. If everything goes well, your modules should all load ok.
12. To ensure your mouse works in X, be sure to edit /etc/X11/XF86Config. Here is an example:
Code: | Section "InputDevice"
# Identifier and driver
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5" |
Note: If /dev/input/mice doesn't work, try using /dev/usbmouse. Thanks to rac for bringing this to my attention. :)
USB Keyboard Howto:
Note: When using a USB keyboard there are two things you should be aware of: First, if something goes wrong with loading your modules, your keyboard will not function. This is why I do NOT recommend loading your USB keyboard in modular form. Secondly, many newer BIOS's include automatic support for USB keyboards (so you don't technically need to to build support for them). Either way, BE SURE TO READ THIS DOCUMENT BEFORE PROCEEDING: http://www.linux-usb.org/USB-guide/x194.html
1. Enter your kernel configuration
Code: | cd /usr/src/linux
make menuconfig |
2. Once in the configuration screen, scroll down to Input Core Support, and hit enter.
3. Hit "y" for Input Core Support. Scroll down to Keyboard Support, and hit y. Exit from this menu.
4. Scroll down to USB support and hit enter.
5. In USB Support, hit y at Support for USB. Scroll down to "Preliminary USB device filesystem" and hit y. Include "USB Human Interface Device (full HID) support" as a module (y). Include HID input layer support with y.
6. Exit USB Support, then exit the menuconfig. Now do "make dep && make clean bzImage modules modules_install".
7. No modules need to be loaded for your USB keyboard.
8. Be sure to mount your /boot partition and copy over the new kernel image!
9. Reboot your machine to test your new drivers.
USB Mouse and Keyboard Howto:
Note: When using a USB keyboard there are two things you should be aware of: First, if something goes wrong with loading your modules, your keyboard will not function. This is why I do NOT recommend loading your USB keyboard in modular form. Secondly, many newer BIOS's include support for USB keyboards. But this BIOS support is overridden when you load usb HID support. So you can start with keyboard support and lose it when loading one of the uhci modules or when loading a kernel with HID support built in. Better to build keyboard support into the kernel to be safe, since you can work without a mouse but not without a keyboard. Either way, BE SURE TO READ THIS DOCUMENT BEFORE PROCEEDING: http://www.linux-usb.org/USB-guide/x194.html
1. Enter your kernel configuration
Code: | cd /usr/src/linux
make menuconfig |
2. Once in the configuration screen, scroll down to Input Core Support, and hit enter.
3. Hit "y" for Input Core Support. Scroll down to Keyboard Support and hit y. Scroll down to Mouse Support and hit y. Exit from this menu.
4. Scroll down to USB support and hit enter.
5. In USB Support, hit y at Support for USB. Scroll down to "Preliminary USB device filesystem" and hit y. Hit y at UHCI (Intel PIIX4, VIA, ...) support or UHCI Alternate Driver (JE) support, whichever you prefer. Include "USB Human Interface Device (full HID) support" by hitting y. Finally, hit y at HID input layer support.
6. Exit USB Support, then exit the menuconfig. Now do "make dep && make clean bzImage modules modules_install".
7. No modules will be created during this installation; instead, everything will be statically compiled into the kernel.
8. Be sure to mount your /boot partition and copy over the new kernel image!
9. Reboot your machine to test your new drivers.
10. If everything goes well, your USB mouse and keyboard should work flawlessly. |
|
Back to top |
|
|
duff Guru
Joined: 19 Jun 2002 Posts: 466 Location: Clemson, SC
|
Posted: Wed Aug 28, 2002 5:15 pm Post subject: |
|
|
Great little HOWTO! Now I can throw any my PS/2 to USB converter.
Since this was dead last in the forum...upping for anyone who's yet to see this. |
|
Back to top |
|
|
wing Tux's lil' helper
Joined: 27 Aug 2002 Posts: 108 Location: Mountain View, CA
|
Posted: Fri Aug 30, 2002 4:45 am Post subject: |
|
|
if you look, /dev/usbmouse is a symlink to /dev/input/mice ... |
|
Back to top |
|
|
zenhonky n00b
Joined: 30 Aug 2002 Posts: 4
|
Posted: Fri Aug 30, 2002 8:36 pm Post subject: |
|
|
bump
This guide is awesome. Thank you very much. _________________ "Be true to yourself and you will never fall" - Beastie Boys |
|
Back to top |
|
|
rafeco n00b
Joined: 31 Aug 2002 Posts: 17
|
Posted: Tue Sep 03, 2002 2:40 pm Post subject: very nice |
|
|
Thanks for the HOWTO, very useful indeed. |
|
Back to top |
|
|
carl67lp n00b
Joined: 12 May 2002 Posts: 8 Location: Michigan, USA
|
Posted: Sat Oct 12, 2002 3:48 pm Post subject: |
|
|
Thank you for an excellent HOW-TO. I realized that I had my kernel properly configured but the modules were not loaded. I loaded them up, and now am installing Mozilla on my Linux box as I type.
Thanks! |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sun Nov 10, 2002 8:50 pm Post subject: |
|
|
The discussion that started with Youda's post about the intellimouse explorer has gone to Trouble with Intellimouse Explorer. Please don't post support questions to threads in Documentation, TIps and Tricks. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Mon Nov 25, 2002 8:14 pm Post subject: |
|
|
mawst's question about gpm has gone to GPM + USB Mouse. Please don't post support questions to threads in Documentation, Tips and Tricks. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
TilTNimpuS n00b
Joined: 01 Apr 2003 Posts: 1 Location: Metz
|
Posted: Tue Apr 01, 2003 10:28 pm Post subject: ThkS |
|
|
thks guy ! _________________ C ma Faute si ca plante !!! |
|
Back to top |
|
|
Kreek n00b
Joined: 01 Apr 2003 Posts: 14
|
Posted: Tue Apr 01, 2003 10:43 pm Post subject: Now you tell me! |
|
|
Wish I'd read this post about a week ago!
Oh well! I learned a lot doing it on my own!!! _________________ One OS to rule them all,
One OS to find them.
One OS to bring them all,
and in the darkness bind them. |
|
Back to top |
|
|
Nakke n00b
Joined: 15 Jan 2003 Posts: 13
|
Posted: Wed Apr 02, 2003 8:33 am Post subject: |
|
|
Now tell me how to use a usb keyboard in Grub/Lilo. |
|
Back to top |
|
|
duff Guru
Joined: 19 Jun 2002 Posts: 466 Location: Clemson, SC
|
Posted: Wed Apr 02, 2003 2:22 pm Post subject: |
|
|
Nakke wrote: | Now tell me how to use a usb keyboard in Grub/Lilo. |
Check your BIOS. That has nothing to do with Linux. |
|
Back to top |
|
|
Scorp Tux's lil' helper
Joined: 16 Feb 2003 Posts: 118
|
Posted: Mon Apr 07, 2003 4:44 pm Post subject: |
|
|
LILO sees my keyboard, I think my BIOS sees my keyboard, yet linux doesn't.... I'm compiling support in now. Thanks for the great how-to. _________________ PowerBook G3, 400 Mhz, 192 megs of Ram Running Gentoo 1.4 and XFCE4 |
|
Back to top |
|
|
static Tux's lil' helper
Joined: 18 Apr 2002 Posts: 141 Location: Canada
|
Posted: Wed Jul 09, 2003 5:06 pm Post subject: |
|
|
Just re-reading this for the first time in about 8 months (it's been reworked nicely) and I was curious - did gentoo do something to fix usb mice working when support is compiled right into the kernel?? 'Cause the mouse only section still says to use modules as it used to, but the keyboard & mouse section implies the mouse will work if its all compiled right in, which never used to work. _________________ Gentoo and Doom III. 'Nuff Said.
_______________________________________ |
|
Back to top |
|
|
se-reeh n00b
Joined: 07 Jul 2003 Posts: 3
|
Posted: Wed Aug 06, 2003 3:47 pm Post subject: |
|
|
Thanks! It works with my Logitech Optical Mouse (M-BJ58) connected via USB. Great HowTo. Thanks a lot! :D |
|
Back to top |
|
|
Joe_Bogarde n00b
Joined: 01 Jun 2003 Posts: 45 Location: Ellensburg WA
|
Posted: Sun Sep 21, 2003 11:45 pm Post subject: |
|
|
Delightful, wonderful, very helpful. _________________ "Persons attempting to find a motive in this narrative will be prosecuted; persons attempting to find a moral in it will be banished; persons attempting to find a plot in it will be shot." Mark Twain. |
|
Back to top |
|
|
genttoo_ed n00b
Joined: 24 Sep 2003 Posts: 7
|
Posted: Thu Sep 25, 2003 12:41 am Post subject: Update on HOWTO |
|
|
I have recently installed the Stage 3 , binary version of Gentoo 1.4.
Some of this information on the mouse is not correct with my installation.
There were no /lib/modules/dirvers//input/* modules. Just the joystick, nevertheless the mouse worked. |
|
Back to top |
|
|
AsianInvasion n00b
Joined: 25 Sep 2003 Posts: 4
|
Posted: Thu Sep 25, 2003 11:20 pm Post subject: |
|
|
I am trying to get Mandrake 9.1 to recognize my USB keyboard. I opened a terminal(Gnome) and typed:
cd /usr/src/linux-2.4.x
make menuconfig
After i type that i get a message that says "No rule to make target 'menuconfig'. Stop. what does that mean? and how can i fix it and run menuconfig.
Thanks Alot. |
|
Back to top |
|
|
AsianInvasion n00b
Joined: 25 Sep 2003 Posts: 4
|
Posted: Fri Sep 26, 2003 5:01 pm Post subject: USB KEYBOARD |
|
|
I fixed the error i posted before, by installing the kernel-source-2.4.21-0.13mdk.i586.rpm.
but it still didn't work. I'm thinking i didn't mount the /boot correctly. or i didn't copy the kernel image. can someone explain how to do these to in depth? thank you.
as you can tell i am a newbie. thanks again |
|
Back to top |
|
|
AsianInvasion n00b
Joined: 25 Sep 2003 Posts: 4
|
Posted: Fri Sep 26, 2003 5:02 pm Post subject: USB KEYBOARD |
|
|
I fixed the error i posted before, by installing the kernel-source-2.4.21-0.13mdk.i586.rpm.
but it still didn't work. I'm thinking i didn't mount the /boot correctly. or i didn't copy the kernel image. can someone explain how to do these to in depth? thank you.
as you can tell i am a newbie. thanks again |
|
Back to top |
|
|
AsianInvasion n00b
Joined: 25 Sep 2003 Posts: 4
|
Posted: Fri Oct 03, 2003 2:37 am Post subject: |
|
|
I did what the first person said to do, and now i get the num lock light to come on, on my usb keyboard, but it still won't type. so i know i'm making progress, but does anybody know what else to do? thanks |
|
Back to top |
|
|
xjumper84 n00b
Joined: 23 Sep 2003 Posts: 11 Location: CA
|
Posted: Tue Nov 25, 2003 3:59 am Post subject: |
|
|
this did not work, and now my laptop doesn't work |
|
Back to top |
|
|
Jazz Guru
Joined: 16 Nov 2003 Posts: 543 Location: Melbourne, Australia
|
Posted: Tue Nov 25, 2003 2:05 pm Post subject: |
|
|
DOH !!! SUCH A BEA-AA-U-TIFUL guide !!!!
Why is it not in the Gentoo official Guides ???? (*hint*)
Well looking forward to it !!
Bye,
Jassi |
|
Back to top |
|
|
To Veteran
Joined: 12 Apr 2003 Posts: 1145 Location: Coimbra, Portugal
|
Posted: Thu Nov 27, 2003 1:32 pm Post subject: |
|
|
Great how-too, thanx
I only had a problem cause my nforce2 motherboard uses ohci instead of uhci. Maybe ppl should try both options ( without having the other one selected, not even has a module... ).
Tó _________________
------------------------------------------------
Linux Gandalf 3.2.35-grsec
Gentoo Base System version 2.2
------------------------------------------------ |
|
Back to top |
|
|
dredd n00b
Joined: 27 Nov 2003 Posts: 63 Location: Switzerland
|
Posted: Sun Nov 30, 2003 2:25 pm Post subject: |
|
|
hi
nice little how-to.... I've did all the steps as described, but it won't load the modules input, mousedev and usb-uhci. seems like i cannot find them in /lib/modules/linux-2.4.20-gentoo-r8/drivers/input/
what the hell am I doing wrong? when I do a locate for those modules I can find them in
/usr/src/linux-2.4.20-gentoo-r8/drivers/input/ but well.... that doesnt help me...
any hints what I have to do?
thanks in advance... |
|
Back to top |
|
|
|