# USB mouse not working

## bergs

Hi all

I'd like to set up my USB mouse on Gentoo.  I have these kernel-modules:

[m] Input core support

[m] Mouse support

[y]  Mouse Support (not serial and bus mice)

[y]  Support for USB

[y]  UHCI Alternate Driver (JE) support

[m] USB HID support

[m] USB HIDBP Mouse support

Since the mouse is listed under /proc/bus/usb/devices, I don't think there is a problem with my kernel-configuration and the modules are loaded correctly.

I created a new device with mknod /dev/input/mice c 13 63. But if I "cat" that device and move my mouse around nothing happens (it should something happen, right?). I configered X to make it use that mouse and it does not work (X configuration is ok). Can you explain me where the problem is?

Thanks

Simon

----------

## BillyD

I can't check on the details at the moment as I am at work without access to my system, but I am fairly sure you need to disable mouse support under input core support if you enable usb mouse support.  In fact, I think if you take a look at the "help" file for the module under make menuconfig (hit your question mark while hilighting the module), then it will say as much there.

----------

## bergs

I just recompiled the kernel without input core support/mouse support. If i do a "cat /dev/input/mice" now, it says that no such device exists. This was not a problem before.

----------

## Dolio

Do you have hotplug support? That's the way I've seen it done in other distros and it's currently working fine in my Gentoo setup with a USB mouse.

In kernel configuration, make sure all your USB stuff is modules. From what I can tell, you'll need something like the following setup:

Under General setup:

       [*] Support for hot-pluggable devices

Under Input core support:

       <M> Input core support

       <M> Mouse support

Under USB support:

       <M> Support for USB

       [*] Preliminary USB device filesystem

       <M> EHCI HCD (USB 2.0) support

       <M> UHCI (Intel PIIX4, VIA, ...) support

       <M> UHCI Alternate Driver (JE) support

       <M> OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support

       <M> USB Human Interface Device (full HID) support

       [*] HID input layer support

If you know which controller you have (EHCI, UHCI or OHCI) you can eliminate some modules (I did all just to be safe, I've got the space). Now, once you've got that kernel compiled, do an

```

emerge hotplug

```

and a:

```

rc-update add hotplug boot

```

And reboot, and you should be good to go. The hotplug boot script should grab all the USB devices already connected, and if you plug anything in while running, hotplug should snag that too. Hope this works for you.

Cheers.

----------

## klieber

moving to hardware forum.

--kurt

----------

## bergs

That hotplug thing was not a good idea. It segfaults on startup and I can't reach a console. However, it's possible to do a soft-reboot. I have to fix that with the install cd and then I'll see.

I did not compile in HID input layer support before, this could be the problem.

----------

## bergs

Well, after fixing the hotplug problem it works. Finally! I guess selecting HID input layer support was the clue.

It even works with my touchpad at the same time with X. I love it!

THANK YOU  :Cool: 

Simon

----------

## bergs

The newly installed usb-mouse shows some strange behaviour.

If I plug in the mouse while X runs, it does not work. However if I connect it before boot, it's fine. Since Hotplug seems to crash my system, I can not correct this, right?

Anyway, the second thing is the following: If I click on the title bar of a newly started gnome-app but it does not get the focus (gnome 2.0). If I do the same thing with my trackball -> no problem. When double-clicking with the usb-mouse on the titlebar, nothing happens. Trackball -> Window rolls up as it should do. Some other things do no work, too (scrolling, etc.)

The mouse is a MS Intelli-Mouse (optical). I use the IMPS/2 protocol and have ZAxisMapping enabled. The mouse is configured with "SendCoreEvents". That's ok, isn't it?

Many thanks

Simon

----------

## bergs

Anyone?  :Sad: 

----------

## Hypnos

 *bergs wrote:*   

> Anyone? 

 

I'm working on the same problem; my situation is slightly more complicated, as I'm using an adapter to bridge between my PS/2 Logitech MouseMan+ and the USB port.

The module combination that seems to work on my system is input+mousedev, which are the input core and USB HID support respectively.  I created the same X setup as you.  Once X fires up, I see mousedev driver in use and input being used by mousedev -- perfect.  Perusing the X log, I see that it has detected the mouse, autodetected the protocol, and is ready to receive input.

Unfortunately, it doesn't work.  When I do "cat /dev/input/mice", nothing.  I don't have much of a clue as to what is going on ... 

As for your "strange behavior," are you sure that your ZAxisMapping is correct?  It seems that X doesn't understand what the left mouse button is -- try playing with it.

----------

## ^-Codemasta-^

Hi!

I have the same problem with the usb mouse, i have ubb support in the kernel, input-core,...but it don`t works!

The mouse is listed at boot time, but i can`t use it  :Sad: 

If i do

# cat /dev/input/mice

and i move the mouse, theres nothing!

but its not only gentoo, the mouse doesn`t works under debian as well  :Sad: 

At Suse, Mandrake,...the mouse works corectly

wfg codi

----------

## bergs

Thank you for the XAxisMapping tip, Hypnos.  But I've just put a '#' in front of that line and restarted the X-Server. I takes two or more mouse klicks (left button) to "activate" or select anything with the usb-mouse. The touchpad still works fine.

However, I detected that BOTH mouses use /dev/mouse (not sure, I do not work on my Linux-box right now). Neither one uses /dev/input/*.

----------

## Hypnos

Hi,

I can't get my setup to work under either Windows or Linux, so I'm going to assume that the cable that I'm using to convert from PS/2 to USB can't handle mouse signals, only keyboard ones (it came with my keyboard).

I'll try again when I get my hands on a bona fide USB mouse.

----------

## pailhead

 *bergs wrote:*   

> That hotplug thing was not a good idea. It segfaults on startup and I can't reach a console. However, it's possible to do a soft-reboot. I have to fix that with the install cd and then I'll see.
> 
> I did not compile in HID input layer support before, this could be the problem.

 

Ok.. I get the seg fault also.. how do I clear it? I can't get to the console so how do I do it with the boot disk?

Thanks...

----------

## pailhead

Anyone? My system is dead till I find out how to fix the seg fault during bootup.

Thanks guys!

-J

----------

## Hypnos

Boot up with the install CD ... from the shell you should be able to mount the hard disk, copy over the kernel on the CD, edit the grub file, and boot the machine from the hard disk.  Then rebuild your kernel.

----------

