Xorg hangs on first boot

David Wolfskill david at catwhisker.org
Sat Jan 31 04:49:54 PST 2009


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 at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20090131/74c3d41d/attachment.pgp


More information about the freebsd-stable mailing list