Bug 18929 - evdev appears to prevent user apps from accessing HID messages
Summary: evdev appears to prevent user apps from accessing HID messages
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/evdev (show other bugs)
Version: 7.4 (2008.09)
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Peter Hutterer
QA Contact: Xorg Project Team
URL: https://bugs.launchpad.net/ubuntu/+so...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-07 11:56 UTC by Stephen Sugden
Modified: 2008-12-07 20:40 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Stephen Sugden 2008-12-07 11:56:24 UTC
In regards to this bug in ubuntus launchpad. It seems as though evdev has disabled the methods by which user apps could previously receive raw HID messages.

To sum up:

I found that after upgrading to the latest Ubuntu (with evdev 2.0.99+git20080912-0ubuntu5) a particular application (chuck) could no longer receive raw HID messages from my mouse and keyboard, though it had worked before.

I found the same behaviour with a USB gamepad, and using the gamepad led me to the bug regarding joysticks being recognized as mice. Disabling the evdev driver for the joystick not only allowed my joystick to function normally, but also allowed chuck to receive HID messages from the device normally, and that's why I think the problem with my mouse and keyboard is likely caused by evdev.

Unfortunately I don't understand much about how chuck goes about accessing the HID devices, so any pointers on how this should be done will be passed along to the chuck-dev list
Comment 1 Peter Hutterer 2008-12-07 18:21:00 UTC
please grab http://people.freedesktop.org/~whot/evtest.c, compile it with gcc
-o evtest evtest.c and run it against the /dev/input/eventX device of your
joystick (where X is a number, you can get it from /proc/bus/input/devices)

Does it reporte a grab succeeding of failing?
Comment 2 Stephen Sugden 2008-12-07 20:15:25 UTC
(In reply to comment #1)
> please grab http://people.freedesktop.org/~whot/evtest.c, compile it with gcc
> -o evtest evtest.c and run it against the /dev/input/eventX device of your
> joystick (where X is a number, you can get it from /proc/bus/input/devices)
> 
> Does it reporte a grab succeeding of failing?
> 

Grabbing either the mouse (touchpad) or keyboard fails, grabbing the joystick succeeds. This happens both with xserver-xorg-input-joystick installed, and without it. (restarting Xorg inbetween)
Comment 3 Stephen Sugden 2008-12-07 20:27:55 UTC
curiously, I no longer have the same issue with gamepads grabbing the cursor regardless of whether xserver-xorg-input-joystick is installed or not. So now I'm really confused. Are my results from evtest normal?
Comment 4 Peter Hutterer 2008-12-07 20:29:52 UTC
> Grabbing either the mouse (touchpad) or keyboard fails, grabbing the joystick
> succeeds. This happens both with xserver-xorg-input-joystick installed, and
> without it. (restarting Xorg inbetween)

if grabbing the mouse fails, you need to update to evdev 2.1 and xserver
1.5.3. This issue has been fixed.
Comment 5 Stephen Sugden 2008-12-07 20:40:36 UTC
Whoops, thanks for straightening me out there! Sorry if it took up much of your time :)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.