[PATCH] Wait for hald during initialization when necessary
Paulo César Pereira de Andrade
pcpa at mandriva.com.br
Thu Jan 22 08:49:07 PST 2009
Yan Li wrote:
>> Attached the new version without attempting any magic fallback
>> (and using 8 spaces instead of tabs)
>>
>> Tested and functional by stoping hald, running startx, and starting
>> hald from a ssh connection, so that in no more then 8 seconds the
>> keyboard and mouse start responding...
>
> Thanks for this new patch. I'll test it extensively. One thing I'd
> like to change is to set the timer to 150ms, since this is the time
> we've measured with my patch using usleep(). I believe waiting for
> 150ms is enough for most situations.
>
>> +#define RECONNECT_TIMEOUT (8 * 1000)
> +#define RECONNECT_TIMEOUT (150)
I believe the most common problem is the situation you are
describing: hald not ready by the time the X Server is loading,
usually due to some timing issue, and by like less then one
second.
Maybe you could use 150ms in config/hal.c:connect_hook(), and
use like 2-4 seconds if it the first "timer" failed.
Or maybe Daniel or Peter will implement what they commented
some days ago, that is listen for a dbus message that tells when
hald is ready and accepting connections? (I don't know about
dbus internals, and did not know dbus had that feature...)
> --
> Li, Yan
Paulo
More information about the xorg
mailing list