[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#564258: xserver-xorg-input-evdev: evdev on accelerometers is broken



Hello Julien,

sorry for the late answer, was on a conference last week.

Julien Cristau [2010-01-08 21:37 +0000]:
> On Fri, Jan  8, 2010 at 18:57:28 +0000, Julien Cristau wrote:
> 
> > Apparently loading evdev on accelerometers results in a mouse cursor
> > stuck in the center of the screen.  Not sure if we should somehow
> > blacklist these devices from the udev rules, or if the driver should be
> > smarter.
> > 
> Peter, would you have any idea how to handle the above issue?
> 
> Martin, the kernel seems to assign a js (joystick?) handler to that
> device.  Should udev set ID_INPUT_JOYSTICK here?

I don't think it should. At least hal and udev define a joystick as an
input device which as absolute X/Y axes _and_ a button (BTN_TRIGGER,
BTN_A, or BTN_1). Supposedly the kernel is too sloppy here and just
checks for absolute axes?

> E: SUBSYSTEM=input
> E: ID_INPUT=1
> E: x11_driver=evdev

I wonder which rule assigns this. At least in Ubuntu,
/lib/udev/rules.d/65-xorg-evdev.rules looks like

-------------- 8< ------------------
ACTION!="add|change", GOTO="xorg_evdev_end"

# By default, we use the -evdev driver for every mouse, keyboard, touchscreen
# or touchpad; later rules can then change the driver for specific input
# devices.
ENV{ID_INPUT}=="", GOTO="xorg_evdev_end"
ENV{ID_INPUT_MOUSE}=="?*", ENV{x11_driver}="evdev"
ENV{ID_INPUT_KEY}=="?*", ENV{x11_driver}="evdev"
ENV{ID_INPUT_TOUCHSCREEN}=="?*", ENV{x11_driver}="evdev"
ENV{ID_INPUT_TOUCHPAD}=="?*", ENV{x11_driver}="evdev"

LABEL="xorg_evdev_end"
-------------- 8< ------------------

I. e. it does _not_ assign evdev to any ID_INPUT device, just to
known types. In particular, it doesn't use evdev for joysticks either,
since the perception was that this is too confusing. Such a rule could
be shipped by xserver-xorg-input-joystick.

Do you happen to have a rule which looks like

  ENV{ID_INPUT}=="?*", ENV{x11_driver}="evdev"

? If so, my recommendation would be to drop this. We don't need X.org
to listen to obscure devices like your accelerometer or headphone
jacks. Button-type devices like lids are already covered by
ID_INPUT_KEY (which is not the same as _KEYBOARD, NB).

Thanks,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

Attachment: signature.asc
Description: Digital signature


Reply to: