# USB Mouse/Keyboard Aren't detected

## KFCSmitty

I've spent the past 2 days looking over the forum and couldnt find a fix to my problem. Sorry if my searching skills suck, but here is my problem:

I load into BIOS and my devices are detected fine. I then boot into Gentoo 2.6.16-r7 and the devices stop working.

I have uhci-hcd and ehci-hcd support added in as modules in my kernel, as well as full mouse support added in, and yet they are still not detected.

I have tried several 'fixes' around the forums, but they have all just been adding more crap into my kernel and didn't seem to fix anything.

The error when trying to run startx (the only error in the entire log) is:

```
 

xf86OpenSerial: Cannot open device: /dev/input/mouse0

Mouse1: cannot open input device

PreInit failed for input device 'Mouse1'

```

I did dmesg | grep usb and the following came up

```

usbcore: registered new driver usbfs

usbcore: registered new driver hub

usemon: debugfs is not available

usb usb1: configuration #1 chosen from 1 choice

usbcore: registered new driver usblp

drivers/usb/usblp.c: v0.13: USB Printer Device Class driver

usbcore: registered new driver usb-storage

usbcore: registered new driver usbhid

drivers/usb/input/hid-core.c: v2.6:USB HID core driver

```

List of lsmod: note it doesnt show my ehci-hcd or uhci-hcd modules eventhough I have them in /etc/modules.autoload.d/kernel-2.6, should they be displayed or not?

```

Module                    Size         Used by

forcedeth               19716        -

```

I don't really know what else I can list... I am a pretty big newb when it comes to Linux/Gentoo, I usually find my fixes through google and these forums...

Thanks,

Smitty

----------

## Mickael

Hello,

modify your xorg.conf by :  Option      "Device" "/dev/input/mice" for your mouse. inside the Section "InputDevice"

of your mouse.

----------

## KFCSmitty

 *MickTux wrote:*   

> Hello,
> 
> modify your xorg.conf by :  Option      "Device" "/dev/input/mice" for your mouse. inside the Section "InputDevice"
> 
> of your mouse.

 

Wow I'm a newb..I tried mouse0, mouse1, mouse, but never mice! 

Edit: that allows me to get into startx, however, my mouse still does not work....

Any idea how to get my keyboard working as well? I am using my friends crappy PS/2 keyboard to work right now, and so I need to get my USB keyboard working ASAP

----------

## runningwithscissors

I've never used a USB keyboard, so I don't know how to configure one. For the mouse, however, set the Protocol option in xorg.conf to "Auto". It should work in X then.

----------

## KFCSmitty

 *runningwithscissors wrote:*   

> I've never used a USB keyboard, so I don't know how to configure one. For the mouse, however, set the Protocol option in xorg.conf to "Auto". It should work in X then.

 

Already have that set. Here is my mouse configuration

```

Section "InputDevice"

       Identifier "Mouse1"

       Driver "mouse"

       Option   "Protocol" "Auto"

       Option   "Device" "/dev/input/mice"

       Option "Emulate3Buttons"

EndSection

```

----------

## Mickael

Change emulate_3_buttons by :

 *Quote:*   

> 
> 
>         Option      "ZaxisMapping" "4 5"
> 
>         Option      "Button" "5"
> ...

 

----------

## KFCSmitty

 *MickTux wrote:*   

> Change emulate_3_buttons by :
> 
>  *Quote:*   
> 
>         Option      "ZaxisMapping" "4 5"
> ...

 

Thanks for the tip! 

Not sure whether meant that as a mouse fix or not...so at the risk of sounding like a newb "that didnt work"

Edit: Oh and an interesting note that may help you guys out with this problem...I had Gentoo running before with KDE3.4 and it ran great, but I used genkernel to set up my kernel. This time through I wanted to do it myself. So maybe there is a module or something I need that was added in with genkernel?

----------

## KFCSmitty

Would anyone know where I could get a list of what genkernel adds into the kernel?

----------

## Mickael

Here :

/proc/config.gz

----------

## KFCSmitty

 *MickTux wrote:*   

> Here :
> 
> /proc/config.gz

 

I didnt use genkernel to install..I was wondering if there was something that documented it online.

otherwise /proc/congif.gz doesnt exist

----------

## KFCSmitty

Anyone? Any help at all? I emerged coldplug and hotplug, and have them set up as boot and default respectively...yet it still isnt being detected.

Doesn't even detect if I unplug and plug them back in.. 

Is there some setting in my kernel i'm missing? Possibly a conflict? No one else has had this problem?

----------

## dsd

post last few lines of dmesg after plugging the mouse in, and post "lspci -v | grep HCI" output

----------

## BunK

keepin it alive, i seem to be having a similar mouse problem.  USB mouse worked just fine during the install stages of gentoo, however now when i run X there is no mouse... ive tried using xorgcfg, and tried device /dev/input/mice, /dev/mouse, and a few others listed in xorgcfg, aswell as several protocols in conjunction with the above device's.  still nothing.

How would i check to see if i loaded the proper modules for usb when i compiled my kernel? and how might i go about adding the modules if i failed to load them during the install?

----------

## dsd

lspci -v | grep HCI

that will tell you which type of USB controllers you have: EHCI, UHCI, OHCI, or some combination of them

check that you have support for *all* of them in your kernel configuration

if you built them as modules, make sure they are loaded. for best results, build them into the kernel and let the kernel handle it automatically.

----------

## BunK

checked my kernel configuration and it turns out i did have all the USB related stuff built into my kernel (by all i mean EHCI, OHCI, and some other USB mouse related stuff, not sure exactly what it was, but everything looked good).  coldplug and hotplug are not in my Package CD, and so I cant emerge them as i dont have net access on that box.

lspci shows 2 usb 1.0 controllers and one usb 2.0 controller , all SIS

----------

## KFCSmitty

dmesg Output: Don';t know how to fix the error

```

kobject_register failed for ehci_hcd (-17)

 [<c0252a8b>] kobject_register+0x6b/0x80

 [<c013b400>] mod_sysfs_setup+0x50/0xa0

 [<c013c90d>] load_module+0xaad/0xbd0

 [<c013cab3>] sys_init_module+0x53/0x180

 [<c0103105>] syscall_call+0x7/0xb

kobject_register failed for ehci_hcd (-17)

 [<c0252a8b>] kobject_register+0x6b/0x80

 [<c013b400>] mod_sysfs_setup+0x50/0xa0

 [<c013c90d>] load_module+0xaad/0xbd0

 [<c013cab3>] sys_init_module+0x53/0x180

 [<c0103105>] syscall_call+0x7/0xb

kobject_register failed for uhci_hcd (-17)

 [<c0252a8b>] kobject_register+0x6b/0x80

 [<c013b400>] mod_sysfs_setup+0x50/0xa0

 [<c013c90d>] load_module+0xaad/0xbd0

 [<c013cab3>] sys_init_module+0x53/0x180

 [<c0103105>] syscall_call+0x7/0xb

```

lspci 

```

00:02.0 USB Controller: nVidia Corporation nForce2 USB Controller (rev a4) (prog-if 10 [OHCI])

00:02.1 USB Controller: nVidia Corporation nForce2 USB Controller (rev a4) (prog-if 10 [OHCI])

00:02.2 USB Controller: nVidia Corporation nForce2 USB Controller (rev a4) (prog-if 20 [EHCI])

```

Thanks for helping  :Very Happy: 

----------

## dsd

KFCSmitty: that means you have ehci_hcd built into your kernel, *and* you are trying to load it as a module

you can get into this situation by doing something like:

1. build kernel with ehci as built-in

2. copy over kernel image to /boot and boot into new kernel

3. modify kernel configuration, change ehci to module

4. *forget* to copy new kernel image to /boot, forget to reboot

5. try and load the ehci module ---> boom

BunK: i'm not convinced you did what i asked, which wasnt just to look at lspci output and check that usb stuff appears. i wanted you to look at the host controller (HCI) types and check that matches up what you have in the kernel

----------

## BunK

well since then i have built ohci and uhci into my kernel, my usb devices appear to be ohci though from the lspci output

I have started a new thread on my problem

https://forums.gentoo.org/viewtopic-t-463356.html

----------

