How does HAL choose the event device to listen on?

Jason Xia jasonxh at gmail.com
Wed Jan 16 11:23:13 PST 2008


Hi guys,

Never mind. I figured out the problem through step by step debugging.
It's not HAL choosing not to listen on it. HAL actually has a very loose
criterion on identifying keyboards. The problem is about unsupported SW
bits when probing the device state. My vanilla 2.6.23.13 kernel comes
with this macro

	#define SW_RADIO  0x03

which is the only set SW bit of the event device created by thinpad_acpi
module. HAL has not yet followed up with this bit. Thus the probing
process (hald-probe-input) sees a device with an unknown SW bit, so it
returns failure, refusing to probe. Then hald gets the message and
removes that just added device from HAL database.

Hope HAL adds support for this tiny bit in near future.


Jason Xia wrote:
> Hi everyone,
> 
> My problem basically comes from using HAL with thinkpad_acpi, the latter
> creates a virtual input device. HAL does not listen on that event
> device, and lshal doesn't list it as an input device. Here is the
> segment in /proc/bus/input/devices
> 
> I: Bus=0019 Vendor=17aa Product=5054 Version=4101
> N: Name="ThinkPad Extra Buttons"
> P: Phys=thinkpad_acpi/input0
> S: Sysfs=/class/input/input4
> U: Uniq=
> H: Handlers=kbd event4
> B: EV=33
> B: KEY=1e840000 0 0 100100 0 0 0 1500b 2000 0 1004000 0 0 0 0
> B: MSC=10
> B: SW=8
> 
> EV=33 says the device is capable of EV_SYN, EV_KEY, EV_MSC, and EV_SW.
> But ps tells me no hald-addon-keyboard process is listening on that
> specific device, /dev/input/event4. Here is the only thing to do with
> thinkpad_acpi in lshal:
> 
> udi = '/org/freedesktop/Hal/devices/platform_thinkpad_acpi'
>   info.bus = 'platform'  (string)
>   info.linux.driver = 'thinkpad_acpi'  (string)
>   info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
>   info.product = 'Platform Device (thinkpad_acpi)'  (string)
>   info.subsystem = 'platform'  (string)
>   info.udi = '/org/freedesktop/Hal/devices/platform_thinkpad_acpi'  (string)
>   linux.hotplug_type = 2  (0x2)  (int)
>   linux.subsystem = 'platform'  (string)
>   linux.sysfs_path = '/sys/devices/platform/thinkpad_acpi'  (string)
>   platform.id = 'thinkpad_acpi'  (string)
> 
> I tried looking at HAL's source code, but end up with no clues how HAL
> chooses the device to listen on. Any suggestions?
> 
> Thanks.
> 

-- 
jasonxh


More information about the hal mailing list