Problem with input device
joeshaw at novell.com
Wed Jun 2 11:25:47 PDT 2004
On Wed, 2004-06-02 at 19:10 +0200, Kristian Høgsberg wrote:
> I can see there is no sysfs device for those devices, the closest thing
> is the keyboard controller /sys/devices/system/i8042, I guess. So of
> course HAL can't see those devices. What's the best way to change that?
The really correct thing would be to add sysdevice support to the kernel
driver, I think.
Failing that you could probably write an accept function for the input
class device handler which doesn't check for sysdevices and instead
checks the name against a pattern (mouse%d, for example). You'd also
have to implement a compute_udi method. That way they'd get added to
the City of Lost Devices. You can look in net_class_device.c to see how
it's done for PCMCIA cards.
Problem with this approach is that you have absolutely no identifying
information about the device. I guess you could just assume that it's a
I'd recommend doing "mouse%d" instead of "event%d" since you really have
no idea what "event%d" is. It could be a keyboard, mouse, or even a
sound device. Without identifying info, you'd really just be guessing.
> I'm thinking that maybe you could add a mouse and a keyboard device
> under /sys/devices/system/i8042/i80420, and
> /sys/class/input/event0/device should link to that, as it's the case for
> e.g. USB input devices. Does that sound reasonable?
Yes, this sounds like the ideal solution, but it requires patching the
> Another problem, which may just be an issue with my setup, is that hald
> only picks up input.* properties for my usb mouse if I start up hald
> with the mouse plugged in. If I plug in the mouse when hald is running,
> it doesn't get the input properties. Is this a known problem?
It should work, and it WFM with the two USB mice I just hotplugged. Is
hald getting any hotplug messages?
hal mailing list
hal at freedesktop.org
More information about the Hal