evdev driver issue
vinayvinay at gmail.com
Thu Jun 22 20:47:38 PDT 2006
I'm developing an absolute USB mouse (which has 2 absolute axes, for
one for X and the other for Y and one relative axis for the scroll
wheel) and I'd like to use the built-in evdev drivers for the mouse.
The mouse works perfectly fine on Windows, but there seem to be quite
a few issues with Linux. I'm using X11R7.0 on Ubuntu Dapper Drake.
When I move the mouse, the cursor jumps around for a while before
ultimately settling at the right location (during this time the CPU
utilization goes to 100%). This I feel shouldn't happen as I've logged
the USB packets in the kernel hid-core.c driver and they seem to be
perfectly fine (and the values don't jump around). I've also logged
the values in the evdev driver for X and the values here are fine too.
I feel that X is receiving junk events from elsewhere, but there are
no other mice that are connected to the computer.
Also, when I remove this relative axis in hardware, this jumping
around is gone, but the mouse seems to be moving only in straight
lines (when I move it diagonally, it firstly moves in Y and then in
X). So, the jumping somehow seems to be connected to the relative
Also EvDevCorePreInit (in evdev.c) always fails and returns NULL. The
evdev X driver ends up calling EVIOCGRAB...
If any of you have any insight into what's going on, I'd appreciate it
if you could share it with me...
Here's the output when I run evtest on my mouse device:
> Input driver version is 1.0.0
> Input device ID: bus 0x3 vendor 0x000 product 0x2 version 0x100
> Input device name: "USB Mouse"
> Supported events:
> Event type 0 (Reset)
> Event code 0 (Reset)
> Event code 1 (Key)
> Event code 2 (Relative)
> Event code 3 (Absolute)
> Event type 1 (Key)
> Event code 272 (LeftBtn)
> Event code 273 (RightBtn)
> Event code 274 (MiddleBtn)
> Event code 275 (SideBtn)
> Event code 276 (ExtraBtn)
> Event type 2 (Relative)
> Event code 8 (Wheel)
> Event type 3 (Absolute)
> Event code 0 (X)
> Value 15432
> Min 0
> Max 65535
> Event code 1 (Y)
> Value 45432
> Min 0
> Max 65535
> Testing ... (interrupt to exit)
Also, here's the xorg.con section for my mouse (it's the only mouse):
Identifier "Absolute Mouse"
Option "Mode" "absolute"
Option "Device" "/dev/input/event0"
Option "evBits" "+1-2"
Option "keyBits" "~272-287"
Option "relBits" "~0-2 ~6 ~8"
Option "absBits" "~0-16"
Also, changing these options doesn't seem to do much....
More information about the xorg