# Mouse movement is garbled in X.

## Strips

I'm trying to get a Logitech dual optical MouseMan USB mouse to work in X. I do get some movement but its just jumping around.   :Confused: 

My mouse device is /dev/usb/hid/hiddev0 as I can get respons from "cat" in that path. I dont have the /dev/input path as I have seen people talk about.

Does this have something to do with protocol? I've tried IMPS/2, Microsoft and MouseMan. The jittering of the mouse is different with each protocol.

I'm I missing something here. I'm pretty new with Linux but getting there   :Wink: 

----------

## mksoft

Do you use gpm  :Question:  If so, it is fighting for control over the mouse with X.

If you want to keep them both, you should set gpm's repeat type to raw and sets X's mouse device to /dev/gpmdata

Or you can remove gpm altogether if you don't use it.

----------

## Fiver

I have the same problem trying to get an additional mouse working on my laptop.... and no, I'm not running gpm.  However, I have incremental advice.

The reason you don't have /dev/input/mice is that you need to compile input support (and the USB mouse stuff) into your kernel.  

See for instance http://linux-sxs.org/usbmouse.html.  Now that I've done that, however, /dev/input/mice exists but sadly doesn't give me a mouse under X (and /dev/usb/hid/hiddev0 gives me horrid jerky behavior, too).  If I figure out how to make it work I'll let you know.

Heidi

----------

## Fiver

Okay, all the problems I had were kernel problems.  Here's what I had to enable to make it work:

In section "Input Core support" enable "Input core support" "Mouse support" and "Event interface support".  In section USB support enable "Support for USB", "OHCI" (you may need a different host controller), "USB Human Interace Devices" and "HID input layer support" (not /dev/hiddev raw, which is what I enabled first by accident).

make dep, blah blah blah, reboot, and you should be fine.

And here's the section from my XF86Config file which is relevant:

```

Section "Input Device"

  Identifier "USB Mouse"

  Driver "mouse"

  Option "Protocol"  "IMPS/2"

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

  Option "ZAxisMapping" "4 5"

  Option "Buttons" "5"

EndSection

```

[/list]

----------

## Strips

Thanks for the replies   :Very Happy: 

I'm rekompiling my kernel as I speak. I really hope this works.

I had also enebled  /dev/hiddev raw, but trying without now.

----------

## Strips

 :Sad: 

I have recompiled my kernel 5 times today. With all the USB and Input Core stuff as modules and built in. Still it doesn't work.

I tried with or without  /dev/hiddev raw, there was no difference.

Nothing I did made the /dev/input path appear so I did:

```
cd /dev

mkdir input

mknod input/mice c 13 63
```

This did not work. Still no response with "cat /dev/input/mice" I only get alot of text garble with "cat /dev/usb/hid/hiddev0"

I'm not using gpm. Although it's installed but not started.

Do I really have to get a USB -> PS2 converter and loose my dual opticals precision?

This is what I have enabled now in the kernel:

```

<*> Input core support

<*>   Keyboard support

<*>   Mouse support

(1024)    Horizontal screen resolution

(768)    Vertical screen resolution

< >   Joystick support

<*>   Event interface support

<*> Support for USB

[*]   Preliminary USB device filesystem

[*]   Enforce USB bandwidth allocation (EXPERIMENTAL)

<*>   UHCI Alternate Driver (JE) support

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

[*]     HID input layer support

```

----------

## jackD

I had problems with my mouse when I started out as well, I probably ended up recompiling the kernel 20 times before the mouse worked. 

Anyways you probably want devfs enabled if it isn't already, for the most part your configuration looks the same as mine except I enabled USB Mass Storage Support (I don't have an externel drive either) and /dev/hiddev raw HID support as well and as others have suggested you might need to try other USB Host controller drivers, I've had this system working with both UHCI (Intel PIIX4, VIA, ...) and the UHCI Alternate Driver (JE) Support... (not at the same time obviously) even though I have a VIA chipset. After all was said and done I had a event0, mice, mouse0 in my /dev/input folder with my M$ Optical USB Intellimouse Explorer, and X works fine when I use either /dev/input/mouse0 or /dev/input/mice in my XF86Config settings. Currently it's using /dev/input/mouse0 though. 

Another tip, try typing in "dmesg | more" at the prompt to see kernel debug messages, which the kernel might be telling you some useful information. You may have to reboot your computer if it's been up and running for a while since dmesg can't hold all the kernel messages (although this shouldn't be an issue if you've had to recompile you kernel and reboot).  

And last bit of advice, make sure /boot is mounted when the new kernel is copied over.

Jack

P.S. Looking back on it, I might not have needed USB Mass Storage enabled, I didn't care if I needed or not at that point I was just glad it worked.

----------

