Ignoring infrared devices as input devices
Dan Nicholson
dbn.lists at gmail.com
Thu Feb 12 12:22:41 PST 2009
2009/2/12 Martin Pitt <martin.pitt at ubuntu.com>:
> Hello all,
>
> We got a rather curious bug report in Ubuntu: https://launchpad.net/bug/322483
>
> The problem is that some common infrared devices are detected as input
> devices in the modern -evdev world, and thus end up being handled as
> such:
>
> udi = '/org/freedesktop/Hal/devices/temp/77'
> info.parent = '/org/freedesktop/Hal/devices/pci_14f1_8800' (string)
> info.subsystem = 'input' (string)
> input.device = '/dev/input/event6' (string)
> input.originating_device = '/org/freedesktop/Hal/devices/pci_14f1_8800' (string)
> input.product = 'cx88 IR (Leadtek Winfast 2000XP' (string)
> linux.device_file = '/dev/input/event6' (string)
> linux.hotplug_type = 2 (0x2) (int)
> linux.subsystem = 'input' (string)
> linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1e.0/0000:06:01.0/input/input6/event6' (string)
>
> However, with -evdev you can only use the digit and Enter keys. Thus
> the bug reporter proposed to set rules like
>
> <match key="info.product" contains_ncase="saa7134 ir">
> <merge key="info.ignore" type="bool">true</merge>
> </match>
> <match key="info.product" contains_ncase="IR-Receiver">
> <merge key="info.ignore" type="bool">true</merge>
> </match>
> <match key="info.product" contains_ncase="cx88 IR">
> <merge key="info.ignore" type="bool">true</merge>
> </match>
> <match key="info.product" contains_ncase="bttv IR">
> <merge key="info.ignore" type="bool">true</merge>
> </match>
>
> to ignore these devices as input devices. This will allow LIRC to use
> them properly.
>
> Now, I haven't encountered this kind of quirk so far, and I'm not sure
> what its home should be.
>
> - hal-info -> has lots of hw specific quirks, also for input devices,
> but doesn't have this kind of quirk so far
>
> - hal itself -> already ships rules to set input.x11_driver="evdev"
> for devices with input.keys capabilities, so it would be kind of
> "you broke it, you fix it"
>
> - lirc packages -> would be correct in the sense that if you don't
> have lirc installed, you can still use the devices in a restricted
> manner
>
> Right now I'm leaning towards stuffing them into lirc.
Since it's X that's grabbing the devices, you really just want to
remove the input.x11_driver key so that it won't try to hotplug the
device. I don't see a good reason for having HAL completely ignore the
device.
However, the real problem is that evdev grabs the device file,
preventing other users. Fortunately, Peter Hutterer recently made some
changes to the xserver and evdev driver so that it did not need to
grab the device since it was preventing things like LIRC from working.
I'm CC'ing Peter since he understands the issues far better than I do,
but here are the three xorg commits for reference:
http://cgit.freedesktop.org/xorg/driver/xf86-input-evdev/commit/?id=4912e2aa
http://cgit.freedesktop.org/xorg/xserver/commit/?id=d936a423
http://cgit.freedesktop.org/xorg/xserver/commit/?id=b3390523
The evdev commit is in xf86-input-evdev-2.1.0. The first server commit
is in 1.5.3, but the second is not. Maybe you can check with the
ubuntu X gurus to see if bug is fixed under these conditions.
--
Dan
More information about the hal
mailing list