# usb-mouse not working

## kamina

I'm having a hard time getting my usb mouse to work. I have gentoo running on my notebook which has a synaptics touchpad (not working too well either, but that's another story). I have kernel 2.6.7-r11 and have enabled everything I've found that should aparently be enabled (and more) according to what I found with the search.

I've enabled atleast the following (copy /pasted from differant threads):

```

General Setup --->

   * Support for hot-pluggable devices

Device Drivers ---> USB Support --->

   * Support for host-side USB

   * UHCI/OHCI support - depending on mobo.

   * USB Human Interface Device (full HID) support

   * HID Input layer support

 

The usbfs

```

The strange thing is that my previous gentoo installation had the mouse working just fine...   :Rolling Eyes: 

----------

## TJNII

Well, first off, after you plug it in does lsusb show it being connected?  Does dmesg show it being grabbed by the HID driver?

----------

## kamina

How can I tell?   :Wink: 

----------

## TJNII

I'm not even gonna try to line this up.

Command | What it does | What you may have to emerge to get it

lsusb | Shows all devices connected via USB | usbutils

dmesg | shows system messages | installed by default

If your mouse doesn't show up in lsusb, check your USB controller drivers (UHCI, EHCI, etc.)

If dmesg doesn't show the HID driver grabbing it, check your HID driver.

----------

## kamina

lsusb:

cannot open /proc/bus/usb no such file or folder...   :Shocked: 

----------

## TJNII

Is proc mounted?

----------

## kamina

I guess... It is full of stuff.

----------

## TJNII

mkay....

Use lspci to see if the controllers are being recignized. You should see something like this: (Note how it says my controller is EHCI)

```
0000:00:1d.0 USB Controller: Intel Corp. 82801DB USB (Hub #1) (rev 02)

0000:00:1d.1 USB Controller: Intel Corp. 82801DB USB (Hub #2) (rev 02)

0000:00:1d.2 USB Controller: Intel Corp. 82801DB USB (Hub #3) (rev 02)

0000:00:1d.7 USB Controller: Intel Corp. 82801DB USB EHCI Controller (rev 02)
```

If you can see them, check that you have the right drivers for the controllers.

Also, make sure you're starting the modules if your compiling them as such. (Hopefully I'm stating the obvious.  :Wink:  )

----------

## kamina

Thanks alot!

I looked at the dmesg output and the only mention of usb was that it was enabled. The usb controllers where not running, so obviously the mouse was not working. I went to play around with the kernel settings, and after changing a few acpi and apic settings I recompiled and booted. Now the usb (and mouse) are working, and so is the synaptis touchpad that I was having problems with in this thread!   :Very Happy: 

----------

## kamina

Funny enough, the usb-mouse just stopped working again... Now it's still detected however. When I cat /dev/input/mouse0 and move the mouse I get garbage on the screen. However under kde (with teh excact settings I had last night) it does'nt work. I tried adding the mouse to xorg.conf and it still does'nt work:

```

Section "ServerLayout"

        Identifier     "X.org Configured"

        Screen      0  "TFT" 0 0

        InputDevice    "touchpad" Option "CorePointer SendCoreEvents"

        InputDevice    "Keyboard0" "CoreKeyboard"

        InputDevice    "UsbMouse"  Option "AlwaysCore" 

EndSection

Section "InputDevice"

        Identifier      "UsbMouse"

        Driver          "mouse"

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

#       Option          "Buttons"               "5"

#       Option          "Name"                  "Autodetection"

        Option          "Protocol"              "auto"

#       Option          "ZAxisMapping"          "4 5"

EndSection

```

I've been trying to play around with the fields and had no success.

----------

## TJNII

How does it react in relation to the touchpad?  Does the touchpad still work and the mouse doesn't, or are both dead?

----------

## kamina

The touchpad works fine apart from tapping, and strange behaviour when I try to log from kde. (I can't klick the menu -> log out, I have to press alt+ctrl+backspace and then click log out) 

The touchpad is /dev/input/mouse1 and the usb mouse /dev/input/mouse0

```

# lsusb

Bus 004 Device 001: ID 0000:0000  

Bus 003 Device 001: ID 0000:0000  

Bus 002 Device 003: ID 062a:0000  

Bus 002 Device 001: ID 0000:0000  

Bus 001 Device 001: ID 0000:0000  

```

The only connected usb device is the mouse, so I guess it's device 003

----------

## TJNII

Can you post the rest of your Xorg config file?

----------

## kamina

```

# cat /etc/X11/xorg.conf

Section "ServerLayout"

        Identifier     "X.org Configured"

        Screen      0  "TFT" 0 0

        InputDevice    "touchpad" Option "CorePointer SendCoreEvents"

        InputDevice    "Keyboard0" "CoreKeyboard"

        InputDevice    "UsbMouse"  Option "AlwaysCore" 

EndSection

 

Section "Files"

        RgbPath      "/usr/X11R6/lib/X11/rgb"

        ModulePath   "/usr/X11R6/lib/modules"

        FontPath     "/usr/share/fonts/misc/"

        FontPath     "/usr/share/fonts/TTF/"

        FontPath     "/usr/share/fonts/Speedo/"

        FontPath     "/usr/share/fonts/Type1/"

        FontPath     "/usr/share/fonts/CID/"

        FontPath     "/usr/share/fonts/75dpi/"

        FontPath     "/usr/share/fonts/100dpi/"

EndSection

 

Section "Module"

        Load  "extmod"

        Load  "dri"

        Load  "dbe"

        Load  "record"

        Load  "xtrap"

        Load  "glx"

        Load  "speedo"

        Load  "type1"

        Load  "freetype"

        Load  "synaptics"

EndSection

 

Section "InputDevice"

        Identifier      "UsbMouse"

        Driver          "mouse"

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

#       Option          "Buttons"               "5"

#       Option          "Name"                  "Autodetection"

        Option          "Protocol"              "auto"

#       Option          "ZAxisMapping"          "4 5"

EndSection

 

Section "InputDevice"

        Identifier  "Keyboard0"

        Driver      "keyboard"

EndSection

 

Section "InputDevice"

        Identifier      "touchpad"

        Driver          "synaptics"

        Option          "Device"        "/dev/psaux"

#       Option          "ZaxisMapping"  "4 5"

#       Option          "Edges"         "1900 5400 1800 3900"

#       Option          "Finger"        "25 30"

#       Option          "MaxTapTime"    "20"

#       Option          "MaxTapMove"    "220"

#       Option          "VertScrollDelta"       "100"

#       Option          "MinSpeed"      "0.02"

#       Option          "MaxSpeed"      "0.18"

#       Option          "AccelFactor"   "0.0007"

        Option          "SHMConfig"     "on"

        Option          "UpDownScrolling"       "on"

        Option          "Protocol"      "auto-dev"

        Option          "CorePointer"   "true"

EndSection

 

Section "Monitor"

        #DisplaySize      330   210     # mm

        Identifier   "wxga"

        VendorName   "CPT"

        ModelName    "1389"

        HorizSync    31.5 - 90.0

        VertRefresh  60.0 - 60.0

EndSection

 

Section "Device"

        ### Available Driver options are:-

        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",

        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"

        ### [arg]: arg optional

        #Option     "NoAccel"                   # [<bool>]

        #Option     "SWcursor"                  # [<bool>]

        #Option     "Dac6Bit"                   # [<bool>]

        #Option     "Dac8Bit"                   # [<bool>]

        #Option     "ForcePCIMode"              # [<bool>]

        #Option     "BusType"                   # [<str>]

        #Option     "CPPIOMode"                 # [<bool>]

        #Option     "CPusecTimeout"             # <i>

        #Option     "AGPMode"                   # <i>

        #Option     "AGPFastWrite"              # [<bool>]

        #Option     "AGPSize"                   # <i>

        #Option     "GARTSize"                  # <i>

        #Option     "RingSize"                  # <i>

        #Option     "BufferSize"                # <i>

        #Option     "EnableDepthMoves"          # [<bool>]

        #Option     "EnablePageFlip"            # [<bool>]

        #Option     "NoBackBuffer"              # [<bool>]

        #Option     "DRIReinit"                 # [<bool>]

        #Option     "PanelOff"                  # [<bool>]

        #Option     "DDCMode"                   # [<bool>]

        #Option     "MonitorLayout"             # [<str>]

        #Option     "IgnoreEDID"                # [<bool>]

        #Option     "OverlayOnCRTC2"            # [<bool>]

        #Option     "CloneMode"                 # [<str>]

        #Option     "CloneHSync"                # [<str>]

        #Option     "CloneVRefresh"             # [<str>]

        #Option     "UseFBDev"                  # [<bool>]

        #Option     "VideoKey"                  # <i>

        #Option     "DisplayPriority"           # [<str>]

        #Option     "PanelSize"                 # [<str>]

        #Option     "ForceMinDotClock"          # <freq>

        Identifier  "M11"

        Driver      "ati"

        VendorName  "ATI Technologies Inc"

        BoardName   "RV350 [Mobility Radeon 9600 M10]"

        BusID       "PCI:1:0:0"

EndSection

 

Section "Screen"

        Identifier "TFT"

        Device     "M11"

        Monitor    "wxga"

        DefaultDepth     24

        SubSection "Display"

                Viewport   0 0

                Depth     1

                Modes    "1280x800" "1024x768" "800x600" "640x480"

        EndSubSection

        SubSection "Display"

                Viewport   0 0

                Depth     4

                Modes    "1280x800" "1024x768" "800x600" "640x480"

        EndSubSection

        SubSection "Display"

                Viewport   0 0

                Depth     8

                Modes    "1280x800" "1024x768" "800x600" "640x480"

        EndSubSection

        SubSection "Display"

                Viewport   0 0

                Depth     15

                Modes    "1280x800" "1024x768" "800x600" "640x480"

        EndSubSection

        SubSection "Display"

                Viewport   0 0

                Depth     16

                Modes    "1280x800" "1024x768" "800x600" "640x480"

        EndSubSection

        SubSection "Display"

                Viewport   0 0

                Depth     24

                Modes    "1280x800" "1024x768" "800x600" "640x480"

        EndSubSection

EndSection

```

----------

## TJNII

 *kamina wrote:*   

> 
> 
> ```
> 
> -->   InputDevice    "touchpad" Option "CorePointer SendCoreEvents"
> ...

 

I think that's your problem. The X server is registering the touchpad as the input device and ignoring the usbmouse.  I don't know how to do real time switching, but to select from the command line do something like this:

```
Section "ServerLayout"

        Identifier     "X.org Configured"

        Screen      0  "TFT" 0 0

        InputDevice    "touchpad" Option "CorePointer SendCoreEvents"

        InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "ServerLayout"

        Identifier     "USBMouse"

        Screen      0  "TFT" 0 0

        InputDevice    "UsbMouse"  Option "AlwaysCore"

        InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

 
```

(This may not be 100% correct, but it should be pretty darn close)

So to startx with the touchpad

```
startx
```

To startx with the USB mouse

```
startx -- -layout USBMouse
```

Beyond this you may want to query the gurus in the Desktop forum.  We're kinda getting outside the kernel stuff.

[Edit] Apparently BBCode won't bold text in code blocks. [/Edit]

----------

