Comment 20 for bug 276857

Revision history for this message
Ted Gould (ted) wrote : Re: [Bug 276857] Re: On reboot X requires restart because mouse and keyboard are unresponsive

On Tue, 2008-10-21 at 23:58 +0000, Bryce Harrington wrote:
> xserver: config/hal.c:
>
> if (!libhal_ctx_set_dbus_connection(info->hal_ctx, info->system_bus)) {
> LogMessage(X_ERROR, "config/hal: couldn't associate HAL context with bus\n");
> goto out_ctx;
> }
> if (!libhal_ctx_init(info->hal_ctx, &error)) {
> LogMessage(X_ERROR, "config/hal: couldn't initialise context: %s (%s)\n",
> error.name, error.message);
> goto out_ctx;
> }
>
> libhal_ctx_init is failing; there are 5 conditions under which it
> returns false. Probably you want to install a debug version of hal,
> break on libhal_ctx_init(), and see which of the conditions are getting
> hit.

Okay, life gets weirder.

So I patch libhal to fill the error item like it is attached. (this
should probably go upstream sometime) The error that is occurring is
that X can't find the name of org.freedesktop.Hal. So I constructed the
same call that DBus is making and put it into my /etc/init.d/gdm which
is as follows:

dbus-send --system --print-reply
--dest=org.freedesktop.DBus /org/freedesktop/DBus
org.freedesktop.DBus.NameHasOwner string:org.freedesktop.Hal

When that executes it returns True.

So, in summary, dbus-send can get the name before X starts, but then X
can't get it when it is started.