[PATCH] Wait for hald during initialization when necessary

Yan Li elliot.li.tech at gmail.com
Wed Jan 21 22:10:06 PST 2009


On Wed, Jan 21, 2009 at 03:37:22PM -0200, Paulo César Pereira de Andrade wrote:
> Paulo César Pereira de Andrade wrote:
> 
> >> I think it'd be better to set a timer to fire off the reinitialization
> >> rather
> >> than a simple usleep. Doing so allows us to finish the server
> >> initialization
> >> without having to wait for hal. Any opinions?
> >
> >   I can rework my patch to remove the "hal_giveup()" function, and
> > use a timer firing like every 8 seconds. The idea of fallback to
> > load/use kbd/mouse would be really only useful in a few special
> > cases on broken setups (usually development setups :-), so that
> > one would have a functional keyboard/mouse after sometime, as long
> > as the kdb and mouse drivers were functional ("wrong" abi would
> > be enough to have a inputless X Server...).
> 
>   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)

-- 
Li, Yan



More information about the xorg mailing list