Date: Sat, 31 Jan 2009 04:49:53 -0800 From: David Wolfskill <david@catwhisker.org> To: Dmitry Morozovsky <marck@rinet.ru> Cc: stable@freebsd.org Subject: Re: Xorg hangs on first boot Message-ID: <20090131124953.GS90849@albert.catwhisker.org> In-Reply-To: <alpine.BSF.2.00.0901311414480.91263@woozle.rinet.ru> References: <alpine.BSF.2.00.0901311144050.91263@woozle.rinet.ru> <49842FDA.1040101@bsdforen.de> <alpine.BSF.2.00.0901311414480.91263@woozle.rinet.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Sat, Jan 31, 2009 at 02:17:49PM +0300, Dmitry Morozovsky wrote:
> ....
> # REQUIRE: LOGIN cleanvar moused syscons dbus hald
>
> and console log shows correct order:
>
> Jan 31 13:53:49 <console.info> revamp kernel: Starting dbus.
> Jan 31 13:53:50 <console.info> revamp kernel: Starting hald.
> Jan 31 13:53:50 <console.info> revamp kernel: Configuring syscons:
> Jan 31 13:53:50 <console.info> revamp kernel: blanktime
> Jan 31 13:53:50 <console.info> revamp kernel: .
> Jan 31 13:53:50 <console.info> revamp kernel: Starting gdm.
>
> Rather strange for me.
It appears to me (empirically, not from code inspection) that there may
(at least in some cases) be a delay between the time hald(8) starts and
the time that X can actually use it in a useful way to determine
information about the mouse and keyboard.
I ended up augmenting my xdm(1) start-up script's "start" stanza with:
...
# REQUIRE: ... hald ...
...
. /etc/rc.subr
...
until hald=$(check_process hald-addon-mouse-sysmouse); [ -n "${hald}" ]; do
info "$name start-up waiting for hald-addon-mouse-sysmouse"
sleep 1
done
until [ -r /proc/${hald}/status ]; do
info "$name start-up waiting to read /proc/${hald}/status"
sleep 1
done
# This can actually be done as a single expression, but that helps
# neither debugging nor comprehension.
hald_start=`awk -F "[ ,]" '{print $8}' /proc/${hald}/status`
now=`date "+%s"`
# This was determined empirically
hald_delay=8
wait=$(($hald_start + $hald_delay - $now))
if [ $wait -gt 0 ]; then
info "$name start-up waiting $wait seconds for hald-addon-mouse-sysmouse"
sleep $wait
fi
...
With the above, I've only had the "non-responsive keyboard & mouse"
syndrome a couple of times (out of about 2 dozen or so xdm start-ups)
in the last several days.
Mind, I don't consider that a "solution" -- it's a hack. But if
it helps.... :-}
Peace,
david
--
David H. Wolfskill david@catwhisker.org
Depriving a girl or boy of an opportunity for education is evil.
See http://www.catwhisker.org/~david/publickey.gpg for my public key.
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)
iEYEARECAAYFAkmESPAACgkQmprOCmdXAD23VwCfcHhx1AhvV3MPUrWb/E+RQcWz
7koAoICNURPpvwIjc8S6neBrN9FF0btT
=uyA0
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090131124953.GS90849>
