/sbin/hotplug and hal.dev timeouts

David Zeuthen david at fubar.dk
Sun Aug 29 09:30:21 PDT 2004


On Sat, 2004-08-28 at 04:08 +0200, Kay Sievers wrote:
> I've discovered some strange behavior with HAL and a lot of USB devices
> connected. My printer wasn't properly recognized, cause udev needed 25
> seconds  to send the dev.d/ event to HAL. This is caused by the lot of
> sleep calls to wait for sysfs files and device nodes in the /etc/hotplug
> scripts. These sleeps take longer than the 10 second timeout of udevd
> and udevd will delay for another 10 seconds.

Interesting - the kernel is more or less broken is this regard, I think
even Greg KH admits that, hopefully someone will fix it some day. 

Even more interesting is the fact that some files in sysfs doesn't
always show up (such as name of vendor for USB device) so it's
definitely worthwhile to only wait for a subset of them; that's what
hal.hotplug tries to achieve; though it could use some love. The SEQNUM
from udev and having a file to read the initial seqnum from will also
help a bit here.

> It can be fixed (as far as /sbin/hotplug if fixable at all :))

Hopefully the work Robert and yourself is doing on D-BUS love in the
kernel will alleviate this someday.

>  by
> reordering the execution of the holplug helpers. I've added the 10- and
> 20- and it's working now.
> 
> [root at pim hal]# tree /etc/hotplug.d
> /etc/hotplug.d
> `-- default
>     |-- 10-udev.hotplug -> /sbin/udevsend
>     |-- 20-hal.hotplug -> /usr/libexec/hal.hotplug
>     `-- default.hotplug
> 
> Did anybody discovered something similar?
> 

Not really, guess I need to buy some more exotic devices, heh. This is a
useful suggestion though, you should send that upstream. I'm changing
hal to install 20-hal.hotplug and 10-hal.dev because of this.

Thanks,
David
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list