# usb mouse not working

## avd_1984

I have a usb ball mouse with a scroll wheel. It was working on my gentoo installation fine except the scrolling. But my comp got hacked and i reinstalled gentoo from scratch. I used kde on both occassions. but not my mouse dosent work anymore. It is a laptop and the touchpad works fine. I even changed the kernel to accomodate some usb stuff i thought i missed and recompiled the kernel but it still does not detect the mouse.

----------

## exeter

Does it detect any other USB devices?  Did you compile USB into the kernel or as a module?  If as a module, what is the output of

```

lsmod | grep -i usb

```

----------

## monkeyhead

crippity crap... there's something ringing a bell about your x conf file that needs to be changed, but i can't for the life of remember what it was.

a four? a five? somthing about coordinates maybe...

----------

## avd_1984

I compiled usb into the kernel. I don't have any other usb devices but none show up in kde's usb device list. I looked and the file /etc/X11/xorg.conf does not exist. only the sample does.

----------

## exeter

Ok, looks like you forgot to configure xorg.  (Unless it's an upgrade from xfree and /etc/X11/xfree.conf is present...).  I would follow the xorg configuration guide and configure xorg, then give it another go.

----------

## avd_1984

I configured xorg.conf using 

```
X -configure
```

but its is still not detecting any usb devices. My touchpad is present in /dev/psaux but there is no file or directory called /dev/input or /dev/input/mice where the usb mouse is supposed to be found.

any other solutions?

----------

## linuxbum

did you try /dev/usbmouse ? IN xorg config?

----------

## avd_1984

/dev/usbmouse does not exist.

----------

## CaT

hi

i think you forgot the mouse support in the "Input Core Section" in the kernel. after adding this and recompiling the kernel there should be a  /dev/input/mice and should work fine.

you should have installed the following stuff in your kernel (i'm using 2.4.27):

input core support:

CONFIG_INPUT=y

CONFIG_INPUT_KEYBDEV=y

ONCIFG_INPUT=MOUSEDEV=y

usb support 

CONFIG_USB=y

CONFIG_USB_UHCI_ALT=y (depends on your usb controller)

CONFIG_USB_HID=y

CONFIG_USB_HIDINPUT=y

after compiling the kernel your xorg.conf should have an additional section like this:

Section "InputDevice" 

Identifier "USBMouse"

Driver "mouse"

Option "SendCoreEvents" "true"

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

Option "Protocol" "ImPS/2"

Option "Emulate3Buttons" "true"

Option "ZAxisMapping" "4 5"

End Section

and do you have hotplug installed ?

----------

## avd_1984

what is hotplug? Do i just emerge hotplug to install it?

----------

## avd_1984

I tried that out. still no luck.

----------

## CaT

have you just installed it ? beaucause t must be started on boot time so you have to add it to your default runlevel.

----------

## avd_1984

yes . it does seem to do it at boot time and says that I have to unmute it. But when i type in amixer or alsamixer in the shell, it gives me the error.

----------

## Pengwin

Pardon my jumping in but I'm also having similar problems on my thinkpad with 2004.2. dmesg shows USB activity but the mouse does not move a cursor. Also, I have no /dev/input directory either. 

Could someone confirm the kernel settings mentioned above? That's the first I've seen those settings mentioned and I want to be sure that's what I need before I go changing stuff. 

Many thanks.

----------

## Pengwin

I've made a little progress but still can't get my USB mouse to work. Thought I'd update with some new information. 

As I said dmesg sees the USB device:

```

hub.c: new USB device 00:1d.0-1, assigned address 2

hub.c: USB hub found

hub.c: 4 ports detected

hub.c: new USB device 00:1d.0-1.3, assigned address 3

input: USB HID v1.10 Mouse [Logitech Optical USB Mouse] on usb1:3.0

```

If I cat /dev/input/mice I can see activity when I move the mouse

```

root@intrepid ~ # cat /dev/input/mice

8ÿþ8▒ÿ8´▒ÿ▒▒ÿ▒▒ÿ8ÿ▒ÿ▒▒ÿ▒▒ÿ▒▒ÿ▒▒ÿ▒þ▒þ▒ú▒÷▒õ▒ó▒ò▒ï▒î▒ì▒ë▒ê▒ê▒ê▒í8ðÿ8ñÿ8ôþ8õü8øû8ùø8úø8ýö8ýö8ÿö(÷(ø(û(ü(þÿ

```

And this is what I have set in my xorg.conf file:

```

Section "InputDevice"

Identifier "USBMouse"

Driver "mouse"

Option "SendCoreEvents" "true"

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

Option "Protocol" "ExplorerPS/2" [NOTE: I've tried many different protocols with no joy]

Option "Emulate3Buttons" "false"

Option "ZAxisMapping" "4 5"

EndSection

```

Still, moving the mouse in KDE does nothing. My thinkpad's touchpad works fine though. I'm wide open to any advice! TIA.

----------

## jbc28

Hi,

Just a guess, but do you have

```
InputDevice    "USBMouse" "CorePointer"
```

in your ServerLayout section?

If it has a different label in ServerLayout (mine is Mouse0) then it won't work.

Hope this helps,

J

----------

## LordBug

Not at home, so I'm half-remembering.

I switched from a PS/2 to USB mouse and didn't change my xorg.conf.  Suprisingly, it all still worked.  I believe I had 

```
Option "Device" "/dev/psaux"
```

Might wanna try that as a test.  I did change my xorg.conf, and I believe it is now 

```
Option "Device" "/dev/input/mouse0"
```

 or 

```
Option "Device" "/dev/input/mice/mouse0"
```

I can't remember exactly which.  I'll have to check again, but I don't believe I have a Protocol line at all for my mouse in xorg.conf (Logitech optical wheel mouse).  You may want to comment that out and see what happens.

I'm running a Udev system, and I don't think a DEVFS system has /dev/input/*.

----------

## Pengwin

Aha!   :Idea: 

Thank you jbc28 and LordBug!  The combination of your pieces of advice put all the cogs in place. My mouse is now happily mousing. 

Also, thanks to those that supplied info to this thread earlier. It was a great help. 

Pengwin

----------

