From owner-freebsd-stable@FreeBSD.ORG Sat Jan 31 12:49:54 2009 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09DAC1065673 for ; Sat, 31 Jan 2009 12:49:54 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (adsl-63-193-123-122.dsl.snfc21.pacbell.net [63.193.123.122]) by mx1.freebsd.org (Postfix) with ESMTP id C4FB28FC18 for ; Sat, 31 Jan 2009 12:49:53 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.3/8.14.3) with ESMTP id n0VCnrJI090868; Sat, 31 Jan 2009 04:49:53 -0800 (PST) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.3/8.14.3/Submit) id n0VCnrg1090867; Sat, 31 Jan 2009 04:49:53 -0800 (PST) (envelope-from david) Date: Sat, 31 Jan 2009 04:49:53 -0800 From: David Wolfskill To: Dmitry Morozovsky Message-ID: <20090131124953.GS90849@albert.catwhisker.org> Mail-Followup-To: David Wolfskill , Dmitry Morozovsky , stable@freebsd.org References: <49842FDA.1040101@bsdforen.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HRnx18n0jmP0CroI" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: stable@freebsd.org Subject: Re: Xorg hangs on first boot X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2009 12:49:54 -0000 --HRnx18n0jmP0CroI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 31, 2009 at 02:17:49PM +0300, Dmitry Morozovsky wrote: > .... > # REQUIRE: LOGIN cleanvar moused syscons dbus hald >=20 > and console log shows correct order: >=20 > Jan 31 13:53:49 revamp kernel: Starting dbus. > Jan 31 13:53:50 revamp kernel: Starting hald. > Jan 31 13:53:50 revamp kernel: Configuring syscons: > Jan 31 13:53:50 revamp kernel: blanktime > Jan 31 13:53:50 revamp kernel: . > Jan 31 13:53:50 revamp kernel: Starting gdm. >=20 > 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: =2E.. # REQUIRE: ... hald ... =2E.. =2E /etc/rc.subr =2E.. until hald=3D$(check_process hald-addon-mouse-sysmouse); [ -n "${ha= ld}" ]; 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=3D`awk -F "[ ,]" '{print $8}' /proc/${hald}/status` now=3D`date "+%s"` # This was determined empirically hald_delay=3D8 wait=3D$(($hald_start + $hald_delay - $now)) if [ $wait -gt 0 ]; then info "$name start-up waiting $wait seconds for hald-addon-m= ouse-sysmouse" sleep $wait fi =2E.. 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 --=20 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. --HRnx18n0jmP0CroI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkmESPAACgkQmprOCmdXAD23VwCfcHhx1AhvV3MPUrWb/E+RQcWz 7koAoICNURPpvwIjc8S6neBrN9FF0btT =uyA0 -----END PGP SIGNATURE----- --HRnx18n0jmP0CroI--