Hello,

I have a strange problem with an USB mouse:
With a gentoo linux-2.6.15-r7 kernel I have to start X11 two times, before
the mouse starts to work.
I also have the same problem with a vanilla linux-2.6.15 kernel

I compiled the /linux/drivers/usb/input/hid-core.c with "#define DEBUG".
The usb support is compiled directly into the kernel (not as module).
At the startup I get the following dmesg output:

------------------------------------------------------------------
drivers/usb/input/hid-core.c: HID probe called for ifnum 0
drivers/usb/input/hid-core.c: submitting ctrl urb: Get_Report wValue=0x0100 
wIndex=0x0000 wLength=4
drivers/usb/input/hid-core.c: report 0 is too short, (3 < 4)
hid-debug: input Button.0001 = 0
hid-debug: input Button.0002 = 0
hid-debug: input Button.0003 = 0
hid-debug: input GenericDesktop.X = 0
hid-debug: input GenericDesktop.Y = 0
hid-debug: input GenericDesktop.Wheel = 0
  INPUT[INPUT]
    Field(0)
      Physical(GenericDesktop.Pointer)
      Usage(3)
        Button.0001
        Button.0002
        Button.0003
      Logical Minimum(0)
      Logical Maximum(1)
      Report Size(1)
      Report Count(3)
      Report Offset(0)
      Flags( Variable Absolute )
    Field(1)
      Physical(GenericDesktop.Pointer)
      Usage(3)
        GenericDesktop.X
        GenericDesktop.Y
        GenericDesktop.Wheel
      Logical Minimum(-127)
      Logical Maximum(127)
      Report Size(8)
      Report Count(3)
      Report Offset(8)
      Flags( Variable Relative )
input: HID 04b4:0001 as /class/input/input1
input: USB HID v1.00 Mouse [HID 04b4:0001] on usb-0000:00:10.1-2
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
------------------------------------------------------------------


The first time I start X11 it seems that the mouse doesn't produce
events. The second time I start X11, the mouse works and I see lots of

hid-debug: input Button.0001 = 0
...
hid-debug: input GenericDesktop.X = 85
...

messages in the syslog.
The mouse I use is a mini optical wheel mouse called "xtensions xm-105".
I use xorg/X11 6.8.2.
I configured the USB mouse with the following lines in xorg.conf:

------------------------------------------------------------------
Section "InputDevice"
    Identifier  "Mouse1"
    Driver      "mouse"
    Option "Protocol"    "IMPS/2"
    Option "Device"      "/dev/input/mice"
    Option "ZAxisMapping" "4 5"
    Option "Buttons"      "5"
EndSection
------------------------------------------------------------------

I think that this problem is related to the kernel, because I 
used a 2.6.12 kernel from the ubuntu-5.10 distribution and with 
this kernel the mouse works on the first try, without starting X11 
two times.
Also the output of the X11 server is the same for the first and second
start. The X11 server always outputs:

------------------------------------------------------------------
...
(**) Mouse1: Device: "/dev/input/mice"
(**) Mouse1: Protocol: "IMPS/2"
(**) Mouse1: Core Pointer
(==) Mouse1: Emulate3Buttons, Emulate3Timeout: 50
(**) Mouse1: ZAxisMapping: buttons 4 and 5
(**) Mouse1: Buttons: 5
(**) Mouse1: SmartScroll: 1 
------------------------------------------------------------------

I further checked without X11 with gpm.
With gpm I have the same problem: The first time I start gpm,
gpm doesn't react to the mouse. If I kill gpm and start it
again it suddenly works.

Can you give me any hints, how to debug this problem further ?
>From the behaviour it seems that when X11 (or gpm) exits, the 
USB mouse is somehow resetted in a way, that it works afterwards.
Can you give me a hint what I have to sent to /dev/input/mice
to "reset" the mouse (ioctl calls or whatever) ?
If you think it helps I'll try to run my system with the latest linux
kernel available.


so long
  Ingo



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Linux-usb-users@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to