Failed to initalize HAL.

Bug #25931 reported by Rich
272
Affects Status Importance Assigned to Milestone
dbus (Ubuntu)
Fix Released
High
Martin Pitt
Declined for Gutsy by Henrik Nilsen Omma
Hardy
Fix Released
High
Martin Pitt
hal (Ubuntu)
Fix Released
High
Unassigned
Declined for Gutsy by Henrik Nilsen Omma
Hardy
Fix Released
High
Martin Pitt

Bug Description

This seems to be a fairly common bug. However, none of the solutions I have come
across in previous bug repors have helped me. When I run Ubuntu, just like
everyone else, I get

Failed to initalize HAL.

I can continue to use the GUI for a few minutes, but eventually (especially when
navigating the filesystem/CD-ROM,) the system hangs and I am forced to reboot.

Though I am very new to Linux, I will help in the analysis in any way I can.

TEST CASE:
- Set the rc.d symlinks to start level 12, to get to the situation many bug reporters end up with for some reason:
  sudo update-rc.d -f hal remove
  sudo update-rc.d hal start 12 2 3 4 5 . stop 12 1 .
- (optional, since racy): Set CONCURRENCY=shell in /etc/init.d/rc, boot, and watch hal fail to load
- upgrade to the new hardy-proposed version (0.5.11~rc2-1ubuntu8), check that the rc symlinks are now at S24, and that the system boots properly with CONCURRENCY=shell.

Related branches

CVE References

Revision history for this message
Martin Pitt (pitti) wrote :

Can you please give me the output of the following commands:

  $ ps -p $(< /var/run/dbus/pid)

  pidof hald

  ls -l /etc/rc2.d/*dbus*

Was this a clean breezy install? Or did you upgrade from hoary or from a Breezy
pre-release version?

Revision history for this message
T. Wright (alwayswright01) wrote :

  Im having the same problem. My breezy was
  a clean install. I ran the commands you listed
  and these are the results

   $ ps -p $(< /var/run/dbus/pid)
    said the pid file was not found

     pidof hald
  just returned the command prompt

   ls -l /etc/rc2.d/*dbus*

Revision history for this message
T. Wright (alwayswright01) wrote :

  ls -l /etc/rs2.d/*dbus* gave me this

 lrwxrwxrwx 1 root 14 Mar 11 23:17 /ect/rc2.d
 /s12dbus -> ../init.d/dbus

 by the way this is from the post above.

Revision history for this message
Martin Pitt (pitti) wrote :

> /ect/rc2.d/s12dbus -> ../init.d/dbus

Is that indeed a small 's' before the 12? It should be a capital 'S'. Or was this just a typo? (You can copy&paste from the terminal to the web browser).

Can you please try this:

  sudo /etc/init.d/dbus start
  ps -p $(< /var/run/dbus/pid)
  pidof hald

and copy&paste the outputs here? Thanks!

Revision history for this message
T. Wright (alwayswright01) wrote :

root@TVOM:~# sudo /etc/init.d/dbus start
 * Starting system message bus... [ ok ]
 * Starting Hardware abstraction layer: [ ok ]
root@TVOM:~# ps -p $(< /var/run/dbus/pid)
  PID TTY TIME CMD
 8153 ? 00:00:00 dbus-daemon
root@TVOM:~# pidof hald
8166
root@TVOM:~#

Revision history for this message
Martin Pitt (pitti) wrote :

The /etc/init.d/dbus start output looks like dbus and hal wren't running before. Can you please answer to this bit:

> > /ect/rc2.d/s12dbus -> ../init.d/dbus
> Is that indeed a small 's' before the 12? It should be a capital 'S'. Or was this just a typo? (You can
> copy&paste from the terminal to the web browser).

If that's indeed a lower-case 's', then this would explain why dbus is not running (but I have no idea why it should be a small s, unless you manually changed this).

Revision history for this message
T. Wright (alwayswright01) wrote :

I looked in /etc/rc2.d and indeed the small s was a typo.

I read S12dbus.

The problem with hal started the first time the system started after the system install.

Revision history for this message
Martin Pitt (pitti) wrote :

Maybe it is an upgrade problem. Do you encounter this if you install a clean dapper from scratch?

Revision history for this message
Andres Mujica (andres.mujica) wrote :

i having this issue i believe this is related somwhow with this bug report

https://launchpad.net/distros/ubuntu/+source/libpam-foreground/+bug/58165

this is the output from my system

sudo /etc/init.d/dbus start
Password:
 * Starting system message bus dbus /etc/init.d/dbus: line 38: 6906 Fallo de segmentación start-stop-daemon --start --quiet --pidfile $PIDFILE --user $DAEMONUSER --exec $DAEMON -- --system $PARAMS

dbus is not running, so i'm having the failed to initialize HAL message.

this systems is an upgrade from breezy.

Revision history for this message
Andres Mujica (andres.mujica) wrote :

i'm attaching an strace from

dbus-daemon --system

in a good system (without the problem)

and another one from a bad system

in this there's a segmentation fault message

Revision history for this message
Andres Mujica (andres.mujica) wrote :

i hope this helps to found this issue.

to be honest is truly hard to use a system with this trouble.

you cannot easily access cd nor usb pens,

i cannot believe it but mounting like the old days is really boring...

i would like to give this bug more priority.

please tell me how can i help to solve this issue

Revision history for this message
Maxim (maximsch2) wrote :

I can confirm it too in edgy. If I login just after it is possible all goes ok. But if I wait for some time I get such problem. On dapper I had this problem too.

Revision history for this message
Sebastian Dröge (slomo) wrote :

Instead of running dbus with strace could you please run dbus with gdb, get it to segfault and attach the backtrace to this bugreport?

Revision history for this message
greymaiden (greymaiden) wrote : Yahoo! Auto Response

Please note: I have changed my e-mail address.

Please forward a copy of your message to <email address hidden> and update your contacts.

This e-mail account will be closed in 90 days.

--------------------

Original Message:

X-Originating-IP: [82.211.81.139]
Return-Path: <email address hidden>
Authentication-Results: mta132.mail.re4.yahoo.com from=canonical.com; domainkeys=neutral (no sig)
Received: from 82.211.81.139 (EHLO adelie.ubuntu.com) (82.211.81.139)
  by mta132.mail.re4.yahoo.com with SMTP; Sun, 12 Nov 2006 22:30:08 -0800
Received: from gangotri.ubuntu.com ([82.211.81.179])
 by adelie.ubuntu.com with esmtp (Exim 4.60 #1 (Debian))
 id 1GjVKa-0006OQ-5h
 for <email address hidden>; Mon, 13 Nov 2006 06:30:08 +0000
Received: from gangotri.ubuntu.com (localhost.localdomain [127.0.0.1])
 by gangotri.ubuntu.com (Postfix) with ESMTP id 1EEF5318915
 for <email address hidden>; Mon, 13 Nov 2006 06:30:08 +0000 (GMT)
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
From: =?utf-8?q?Sebastian_Dr=C3=B6ge?= <email address hidden>
Reply-To
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

Revision history for this message
satkata (satkata-deactivatedaccount-deactivatedaccount-deactivatedaccount) wrote :

Hi,

I have upgraded from Dapper to Edgy before a month or so and everything was running smoothly till week ago. When I am logging into Ubuntu, I got the same message as above described "Failed to initialize HAL". The Problem seems to be, that dbus is not being starting properly or at the right time ???. I checked all syslinks under /etc/rc2.d/ and everything is fine.
I just saw in the above messages though that others have 'dbus' with starting number 12
(/etc/rc2.d/S12dbus), but on my laptop it is 50 (/etc/rc2.d/S50dbus).

When I logout and switch to terminal console and run:
'sudo /etc/init.d/dbus start', it says that dbus is being already started.

Running:
'sudo /etc/ini.d/dbus restart' and then logging in again fixes everything.

Should i change that starting sequence number, but then why now.? It was starting fine till week ago, and i haven't changed anything under the system startup levels.

If you need any other information that can help you, just say, because I have no idea. It's very strange.

Revision history for this message
Bordiga Giacomo (gbordiga) wrote :

I confirm the existence of this bug in edgy. I notice it, after setting the automatic startup login. Changing the priority number of the init script to 12 resolves the problem.

Revision history for this message
greymaiden (greymaiden) wrote :

Please note: I have changed my e-mail address.

Please forward a copy of your message to <email address hidden> and update your contacts.

This e-mail account is no longer in use and I will not receive your message.

Revision history for this message
Matti Lindell (mlind) wrote :

I have this on Feisty sometimes. I think it's a race between hal/dbus initializing and gnome desktop loading (apps that required dbus). When I'm logged in to Gnome session and get the "Failed to initalize HAL" error, I switch to tty1 and see that hal/dbus is still in middle of its initialization-phase. Thanks to upstart and parallel start-up of init scripts, my Ubuntu boots too fast for hal/dbus.

Revision history for this message
Martin Gustafsson (martin-gustafsson) wrote :

Have this bug in Feisty.
Receive three pop-up windows when logging to Gnome:

Power Manager.
HAL does not support power management!

Internal Error
failed to initialize HAL!

Power Manager
Either HAL or DBUS are not working

Running Ubuntu Feisty on a Via C3 laptop

Revision history for this message
greymaiden (greymaiden) wrote :

Please note: I have changed my e-mail address.

Please forward a copy of your message to <email address hidden> and update your contacts.

This e-mail account is no longer in use and I will not receive your message.

Revision history for this message
Scott Bronson (bronson) wrote :

Martin, I get this too when I have auto-login turned on in GDM. I get the 3 error messages you mention, then hald leaks memory something fierce (uses up all 3GB of my machine's memory in a few days).

When I turn off auto-login so I have to spend a few tens of seconds in GDM before Gnome fires up, everything starts up without errors. I'm not sure about the hald memory leak since I only just now figured out this workaround.

Hopefully this will be fixed as Upstart matures.

Revision history for this message
Martin Pitt (pitti) wrote :

dbus init.d priority needs to be set to 12, not 20, to avoid race condition with gdm.

Changed in dbus:
status: Needs Info → In Progress
importance: Medium → High
Revision history for this message
Martin Pitt (pitti) wrote :

 dbus (1.0.2-1ubuntu3) feisty; urgency=low
 .
   * debian/rules: Start dbus at runlevel priority 12, so that it comes before
     gdm. This eliminates the race condition of starting the X session before
     hal is running. (LP: #25931 and two handfuls of dups)
   * debian/dbus.postinst: Migrate rc?.d symlinks from 20 to 12 on upgrades to
     this version.
   * debian/control: Set Ubuntu maintainer.
   * debian/rules: Clean up doc/*.html (they are generated from XML sources).

Changed in dbus:
status: In Progress → Fix Released
Revision history for this message
deuce (azinas) wrote :

I filled a bug report about a similar problem, and I was forwarded here as my problem appeared to be similar and that I could find help here, but I cant!
The only thing I understood is to print here these:

deuce@flaptop:~$ sudo /etc/init.d/dbus start
Password:
 * system message bus already started; not starting.
 * Starting system message bus dbus deuce@flaptop:~$ ps -p $(< /var/run/dbus/pid)
  PID TTY TIME CMD
 6108 ? 00:00:00 dbus-daemon
deuce@flaptop:~$ pidof hald
6123
deuce@flaptop:~$ ls -l /etc/rc2.d/*dbus*

lrwxrwxrwx 1 root root 14 2007-03-07 16:57 /etc/rc2.d/S20dbus -> ../init.d/dbus

Can someone help? I cant access my external HD and I have a project due:( Thanks!

Revision history for this message
deuce (azinas) wrote :

I've tried some of your solutions described here and now I cant even login to gnome. I put my username and password and then it restarts the session without login in. HELP!!!

Revision history for this message
Martin Pitt (pitti) wrote :

deuce, if 'dbus start' fails that way, then it is already running. The easiest workaround is to just wait for some seconds at the login screen before logging in. The correct way is to rename /etc/rc2.d/S20dbus to /etc/rc2.d/S12dbus (this was recently done in Feisty).

If it does not even log in, please get .xsession-errors from your home directory and attach it here (you can log in on a text console after pressing Ctrl+Alt+F1).

Revision history for this message
deuce (azinas) wrote :

how can I do that?

Revision history for this message
Martin Pitt (pitti) wrote :

> how can I do that?

In a terminal with 'sudo mv /etc/rc2.d/S20dbus /etc/rc2.d/S12dbus'.

Revision history for this message
roberto (rob-robonline) wrote :

I am following this as I am having the same problems. I have checked the /etc/rc2.d folder and I don't have a S20dbus file, no dbus file in that folder at all.

I do have an @20dsub file in the /rc3.d folder I changed this to S12dbus with on effect.

This problem is getting to the stage where I might just reinstall Windows, much as I don't want to do that. aghhhhhhhh

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 25931] Re: Failed to initalize HAL.

Hi,

roberto [2007-03-13 9:14 -0000]:
> I am following this as I am having the same problems. I have checked the
> /etc/rc2.d folder and I don't have a S20dbus file, no dbus file in that
> folder at all.

Please try

  sudo ln -s ../init.d/dbus /etc/rc2.d/S12dbus

Revision history for this message
roberto (rob-robonline) wrote :

I have solved my problem. I copied the S20dbus file from /etc/rc3.d folder to /etc/rc2.d folder and renamed it to S12dbus and I now log in with no Hal error and my thumb rive working fine.

Hope this helps someone else.

Revision history for this message
aktiwers (aktiwers) wrote :

Got the same error.

Internal error

failed to initialize HAL!

Im on Feisty.. I dont have a S20dBus file in my /etc/rc3.d only a S12DBUS.
And nothing dbus in my /etc/rc2.d

Any fix for this?

Revision history for this message
jmrasor (jmrasor) wrote :

Aktiwers,

Quick way to see what runlevels have dbus set up:

# locate S??dbus

I ran into this HAL bug not long ago, and found that re-configuring HAL got rid of it. Short story: make sure /var/run/dbus exists, and is owned by messagebus:messagebus. You can make that directory and chown it over to the proper owner:group if it does not exist. Then do

# sudo dbus-daemon --system
# sudo dpkg-reconfigure hal

Long story: same thing, but with more gory details, in my post to bug #81670.

HTH.

Revision history for this message
aktiwers (aktiwers) wrote :

Hi jmrasor,

Thanks for the reply.

aktiwers@HAL:~$ locate S??dbus
/etc/rc4.d/S12dbus
/etc/rc3.d/S12dbus
/etc/rc5.d/S12dbus
aktiwers@HAL:~$

aktiwers@HAL:~$ sudo dbus-daemon --system
Failed to start message bus: Failed to bind socket "/var/run/dbus/system_bus_socket": No such file or directory
aktiwers@HAL:~$

aktiwers@HAL:~$ sudo dpkg-reconfigure hal
 * Reloading system message bus config...
  Failed to open connection to system message bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
invoke-rc.d: initscript dbus, action "force-reload" failed.
 * Starting Hardware abstraction layer hald
aktiwers@HAL:~$

Thats what happends.. and the error is still there.

Any Ideas?

Thanks!

Revision history for this message
Torsten Krah (tkrah) wrote :

I got a "new" addition to this.

If the user is taken from AD through pam_winbind, the same does happen.

User on local passwd file -> All ok.
Delete the user from passwd/shadow and take the one from AD -> Auth & Co does work but the HAL bug does happening.

I got no idea whats wrong - the same configuration does work on Gentoo for example.

PS: Did post this in a duplicate, sorry - ignore it there, this is the bug for the problem.

Changed in dbus:
status: Fix Released → Incomplete
Revision history for this message
Torsten Krah (tkrah) wrote :

Addition:

I set the status to incomplete, because the bug is still there - the proposed fix does not solve the issue (in all cases, as i think i've got a new one).

Revision history for this message
hindukush (agambh) wrote :

Hi Guys,
I have the same problem aswell.
i get the following output
I also have a little red cross over the network icon that appears on the system tray, I think this has some connection with the HAL error.

ag@ubuntu:~$ sudo /etc/init.d/dbus start
 * system message bus already started; not starting.
 * Starting system message bus dbus
ag@ubuntu:~$ ps -p $(< /var/run/dbus/pid)
  PID TTY TIME CMD
 5758 ? 00:00:00 dbus-daemon
ag@ubuntu:~$ pidof hald

(after typing the last command i.e pidof hald, i do not get any output, just get the command prompt.

Please help me guys, this is veyyyy frustratingggggggggg

Revision history for this message
Peter Enzerink (launchpad-enzerink) wrote :

Summarising the workaround above by jmrasor, running the four commands below then relogging fixes the problem temporarily. I have to do this on every boot to get my USB attached harddrives to be recognised, which is thankfully infrequent ;).

sudo mkdir /var/run/dbus
sudo chown messagebus:messagebus /var/run/dbus
sudo dbus-daemon --system
sudo dpkg-reconfigure hal

Revision history for this message
Peter Enzerink (launchpad-enzerink) wrote :

Yay! Thanks to this thread I've just noticed that /etc/rc2.d/S12dbus was missing.

After copying it from /etc/rc3.d/S12dbus I no longer get this error on my up to date Breezy->Feisty->Gutsy machine.

Revision history for this message
Torsten Krah (tkrah) wrote :

I still have the error like mentioned above, although i tried all fixes which are told here - no success yet. Peters "way" doesn't help either.

Changed in dbus:
status: Incomplete → New
Martin Pitt (pitti)
Changed in dbus:
status: New → Incomplete
miked (miked11)
Changed in dbus:
status: Incomplete → New
Martin Pitt (pitti)
Changed in dbus:
status: New → In Progress
milestone: none → ubuntu-8.04-beta
Martin Pitt (pitti)
Changed in dbus:
status: In Progress → Fix Committed
Changed in dbus:
status: Fix Committed → Fix Released
114 comments hidden view all 194 comments
Revision history for this message
Bruce R (bm007a0030) wrote : Re: [Bug 25931] Fix not working.

Hi Daniel Rheinbay - in case it helps.

I didn't Upgrade but made a fresh, internet-connected Manual
method install to 'free space' which resulted in HAL initialization
failure. ReStarting in recovery mode I obtained an indication
that my Zarlink DVB-T chip used by my AverTV A777 was not
being recognised, making ALL other messages irrelevant and
revealing that the release version was lacking DVB-T drivers of
earlier releases. So, could you have another item that's not being
recognised ? Recovery mode could provide a clue.
As I am NOT a Linux expert, please ignore this if it doesn't apply.

Revision history for this message
Martin Pitt (pitti) wrote :

Daniel,

indeed the priorities are wrong for you. It should be S24, not S12 (that's too early and races with dbus). So far the upgrade only forces the symlinks to be correct for upgrades from dapper, not from gutsy. Seems we have to do that for those upgrades as well.

Changed in dbus:
milestone: ubuntu-8.04-beta → ubuntu-8.04.1
status: Fix Released → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Argh, that was solved for dbus already.

description: updated
Changed in dbus:
milestone: ubuntu-8.04.1 → ubuntu-8.04
status: In Progress → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

BTW, did you guys use automatix, or any other third-party "tune your system" application? I wonder how you ended up with those broken RC levels in the first place.

Changed in hal:
importance: Undecided → High
milestone: none → ubuntu-8.04.1
status: New → In Progress
assignee: nobody → pitti
Revision history for this message
Martin Pitt (pitti) wrote :

Uploaded, awaiting peer review in the queue now:

hal (0.5.11~rc2-1ubuntu8) hardy-proposed; urgency=low

  * debian/hal.postinst: If hal has any start rc symlinks, force them back to
    24. A lot of people end up with priority 12 for some reason, which races
    with dbus startup, especially with CONCURRENCY=shell. (LP: #25931)

 -- Martin Pitt <email address hidden> Mon, 28 Apr 2008 07:44:11 +0200

http://bazaar.launchpad.net/~ubuntu-core-dev/hal/ubuntu/revision/230

Revision history for this message
Justin Clift (justinclift) wrote :

Hi,

Mine was (probably) unusual, in that I upgraded a (newly installed and patched) 6.06 installation straight to 8.04.

Did this because my father has a PC running 6.06, and he never receives the "newer distribution available" update notice when he runs the update manager.

To see what might be going on, 6.06 got installed from CD into a VMware virtual machine, and then latest updates applied. Yep, he's right, there's no notification of a newer Ubuntu version being available.

Instead, ran the command to check if there are any development versions that can be upgraded to, and it suggested 8.04 (pre release at the time).

As this was a virtual machine I thought "what the heck" and let it proceed. Everything seemed ok afterwards except for the HAL initialisation failure error, that turned out to be because it wasn't in the rc levels after the upgrade.

Hope that helps. :)

Revision history for this message
petit-prince (petit-prince) wrote :

Martin,

your fix appears to do the job. Though I didn't actually build a new package, I just ran
update-rc.d -f hal remove
update-rc.d hal start 24 2 3 4 5 . stop 16 1 .
which resulted in hal's priorities being deferred to S24. Everything's running smooth now.
Looking at hal's postinst script, I'm wondering why we don't invoke update-rc.d regardless of the hal version? Just to be on the safe side...
Glad we got this one squashed though :)

And, just for the records:
@Martin: Nope, haven't used Automatix.
@Bruce: Thanks for your comment, but my Inspiron 6400n (aka e1505) came pre-installed with Ubuntu, all of its components are supported by Ubuntu and I don't have any peripheral devices attached to it.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 25931] Re: Failed to initalize HAL.

Hi Daniel,

Daniel Rheinbay [2008-04-28 17:48 -0000]:
> Looking at hal's postinst script, I'm wondering why we don't invoke
> update-rc.d regardless of the hal version? Just to be on the safe
> side...

Because forcibly removing and reinstalling the symlinks is already a
gross violation of Policy. We just clobber an administrator's
configuration without asking. So it should always be a last resort,
and not be done with every upgrade.

--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Revision history for this message
Steve Langasek (vorlon) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in trunk, will upload to intrepid once the archive is open.

Changed in hal:
milestone: ubuntu-8.04.1 → none
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into hardy-proposed. Please test the packages from the archive and give feedback here. Thank you!

Changed in hal:
status: In Progress → Fix Committed
Revision history for this message
finlay (finlay-moeraki) wrote :

After upgrading from gutsy to hardy I experienced this problem of hald not starting and avahi-daemon also not starting. I redid the symlinks for hal (12->24) and gdm (13->30) but that didn't cure the problem.

Starting hald manually indicated that it was failing while trying to open /usr/local/var/run/dbus/system_bus_socket. In desperation I symlinked /usr/local/var/run/dbus/system_bus_socket to /var/run/dbus/system_bus_socket. That seemed to cure my problem. I don't know why /usr/local/var/run/dbus/system_bus_socket is needed.

Revision history for this message
Martin Pitt (pitti) wrote :

hi finlay,

finlay [2008-04-30 11:59 -0000]:
> Starting hald manually indicated that it was failing while trying to
> open /usr/local/var/run/dbus/system_bus_socket.

Ugh, how weird. That's an entirely different issue then, can you
please file a new bug with the hal log? Thank you!

Revision history for this message
petit-prince (petit-prince) wrote :

Martin,

just tested the new version in hardy-proposed. Works like a charme. Good job!

Thanks,
Daniel

Revision history for this message
Brian Murray (brian-murray) wrote :

I recreated the problem using hal package version 0.5.11~rc2-1ubuntu7 from Hardy. I then installed package version 0.5.11~rc2-1ubuntu8 from hardy-proposed and the symlinks were set properly.

I did not use the CONCURRENCY=shell option as it wasn't clear to from the test case what to look for.

description: updated
Revision history for this message
a09uj (giyuaasd) wrote :

I'm experiencing the same problem.
I tried many workaround but none seemed to work.
Here are my rc2.d links:
[...]
S12dbus -> ../init.d/dbus
[...]
S13hal -> ../init.d/hal
[...]
S30gdm -> ../init.d/gdm
[...]

I tried to reinstall hal, using
#sudo aptitude reinstall hal
but it not worked because hald cannot find the required file: /var/run/dbus/system_bus_socket indeed the directory is EMPTY!!!
Any suggestion about how to solve this annoying problem?

Revision history for this message
a09uj (giyuaasd) wrote :

I just noticed that /var/run/dbus/system_bus_socket was hidden.
By the way it cannot be found by the hal.

Revision history for this message
a09uj (giyuaasd) wrote :

Ok, I resolved the problem.

I would like to inform that the users whose are having the problem with:
log_daemon_msg : Not found

can try this workaround:
$ sudo mv init-functions.old init-functions

I tried to search the word: log_daemon inside init-functions but there was no match.
Then I found it in the .old, so I renamed .old to init-functions and rebooted with:
$ sudo reboot

Now everything works fine.

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to hardy-updates.

Changed in hal:
status: Fix Committed → Fix Released
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hal - 0.5.11~rc2-1ubuntu9

---------------
hal (0.5.11~rc2-1ubuntu9) intrepid; urgency=low

  * Add 03_increase_helper_timeout.patch: Increase helper timeout from 10 to
    20 seconds. Some CD-ROMs are too slow to do all the detection in 10
    seconds. (LP: #218834)

hal (0.5.11~rc2-1ubuntu8) hardy-proposed; urgency=low

  * debian/hal.postinst: If hal has any start rc symlinks, force them back to
    24. A lot of people end up with priority 12 for some reason, which races
    with dbus startup, especially with CONCURRENCY=shell. (LP: #25931)
  * Add 00upstream-fix-macbook-backlight.patch: Fix backlight control on
    MacBooks. Thanks to godlygeek! (LP: #206921)

 -- Martin Pitt <email address hidden> Wed, 30 Apr 2008 11:00:07 +0200

Changed in hal:
status: Fix Committed → Fix Released
Revision history for this message
Thomas Hammerl (thomas-hammerl) wrote :

I just ran into this problem after updating to hal 0.5.11~rc2-1ubuntu8 (which was supposed to fix this bug for some people if I got the discussion right) on my Samung R20 running Hardy. Neither the subsequent update to 0.5.11~rc2-1ubuntu8.1 nor the downgrade to 0.5.11~rc2-1ubuntu7 did help. After logging in with gdm I get the infamous "Failed to initialize HAL" message. Wifi isn't working at first but comes up after about 30 seconds.

$ ls -l /etc/rc*/*dbus*
/etc/rc1.d/K88dbus -> ../init.d/dbus
/etc/rc2.d/S12dbus -> ../init.d/dbus
/etc/rc3.d/S12dbus -> ../init.d/dbus
/etc/rc4.d/S12dbus -> ../init.d/dbus
/etc/rc5.d/S12dbus -> ../init.d/dbus
$ ls -l /etc/rc*/*hal
/etc/rc1.d/K16hal -> ../init.d/hal
/etc/rc2.d/S24hal -> ../init.d/hal
/etc/rc3.d/S24hal -> ../init.d/hal
/etc/rc4.d/S24hal -> ../init.d/hal
/etc/rc5.d/S24hal -> ../init.d/hal
$ ls -l /etc/rc*/*gdm*
/etc/rc0.d/K01gdm -> ../init.d/gdm
/etc/rc1.d/K01gdm -> ../init.d/gdm
/etc/rc2.d/S13gdm -> ../init.d/gdm
/etc/rc3.d/S13gdm -> ../init.d/gdm
/etc/rc4.d/S13gdm -> ../init.d/gdm
/etc/rc5.d/S13gdm -> ../init.d/gdm
/etc/rc6.d/K01gdm -> ../init.d/gdm

Revision history for this message
Thomas Hammerl (thomas-hammerl) wrote :
Revision history for this message
Thomas Hammerl (thomas-hammerl) wrote :
Revision history for this message
Thomas Hammerl (thomas-hammerl) wrote :

changing the priority of hal in rc2.d from 24 to 13 seems to fix the problem for me.

by the way, my upgrade history is feisty -> gutsy -> hardy.

Revision history for this message
Martin Pitt (pitti) wrote :

Hi Thomas,

your rc* symlinks are correct, so hal fails for some other reason on
your system. Your hal.log looks good, it doesn't seem to have crashed
(I guess you used Control-C to stop it). Can you please file a new bug
about this? I guess we have to debug that differently. Thanks!

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, sorry. You still have gdm on level 13, but it shuold be at 30. I guess you did not change that manually, so it is an upgrade bug from Feisty. Can you please create a new bug report against gdm for that? Thank you!

BTW, if you just wait a bit on the gdm prompt, it should work fine.

Revision history for this message
Thomas Hammerl (thomas-hammerl) wrote :

Thanks! I've changed the level of gdm to 30 and everything's fine now. I've created a new bug report against gdm which can be found at https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/227838

Revision history for this message
Aleksander Demko (ademko) wrote :

I also get the "failed to initilize hal" error, but ONLY if autologin is enabled. I guess it logs in too quickly because of an incorrect priority list?

rc0.d/K01gdm rc2.d/S13gdm rc4.d/S13gdm rc6.d/K01gdm
rc1.d/K01gdm rc3.d/S13gdm rc5.d/S13gdm

rc1.d/K88dbus rc2.d/S12dbus rc3.d/S12dbus rc4.d/S12dbus rc5.d/S12dbus

rc1.d/K16hal rc2.d/S24hal rc3.d/S24hal rc4.d/S24hal rc5.d/S24hal

rc0.d/K16dhcdbd rc2.d/S24dhcdbd rc4.d/S24dhcdbd rc6.d/K16dhcdbd
rc1.d/K16dhcdbd rc3.d/S24dhcdbd rc5.d/S24dhcdbd

This is a Thinkpad X40, running Hardy, which was upgraded from Fiesty.

Revision history for this message
Christian Reis (kiko) wrote :

As Martin said above, Aleksander, your GDM is starting too early. It's S13 -- it should be S30.

Revision history for this message
ManfredBremen (noregrets60) wrote :

I had the similar problem. The problem appeared after I had upgraded from Ubuntu 7.10 to Ubuntu 8.04 (64bit, Intel Core-Duo) via the update manager. The system worked more or less fine for a couple of weeks. One of the glitches was that it took a 10-20 seconds after login to recognize the network connection.

The problem became serious after I ha inserted a data DVD in the DVD drive. The DVD drive on my machine (Dell Optiplex 745) never worked correctly under Ubuntu 7.10. I had to change the BIOS setting at every fresh bootup of Ubuntu to be able to open it and insert a CD/DVD. This is probably an issue of Dell, not of Ubuntu. However, after having inserted the data DVD, it first displayed the contents. At a 2nd trial, it refused to display anything. Only the DVD was spinning for a few seconds. That was the point of time after which I could not boot without the message 'Failed to initialize HAL'. The problems spread over the days to other functions such as access to USB memory sticks. Later, I was no longer able to shutdown (system froze after pressing the power-off icon on the upper right corner of the Gnome display). Fiinally, I was no able to start Gnome (gdm). Only the recovery mode saved me from loosing the PC.

The problem vanished after executing

   sudo mv /etc/rc.d/13gdm /etc/rc.d/30gdm

as advised above.

Revision history for this message
Martin Pitt (pitti) wrote :

Manfred, Christian, Aleksander, as I already wrote, this is bug 227838, and it is in progress.

Revision history for this message
Jeremy Wilkins (wjeremy) wrote :

I don't know if this is a different bug, but I have searched high and low and cannot find a similar bug. This one is the closest to the problems I am having. I have Hardy 64bit (haven't tested 32bit) with a Gateway MX6433 (There are many other similar laptops from Gateway 6000 series) which has a Turion64 single core cpu and and I upgraded to Hardy from Gutsy. I use the -rt kernel for multimedia editing.
I tried to fix the problem using the notes above, but I run in KDE and kdm, not Gnome and my rc2.d links are all correct as noted above. Nothing changes it.
Here is the problem and here is the dmesg log section that identifies what happened:
[ 4233.202422] dbus-daemon[5257]: segfault at 7fe705dd18e0 rip 7fe704eedae2 rsp 7fff0daa4778 error 4
I will attach a full log.

I have no idea what error 4 is, but this seems to happen randomly whether I am at my machine or not. When dbus fails networkmanger and the battery monitor fail to report properly in KDE and it says that network manager is not running and the battery is not present. It is this second notification that alerts me when dbus crashes since network manager doesn't tell me it isn't running unless I go to use it. This doesn't seem to interrupt my use of the internet or local LAN however so it isn't a total show stopper, but it does prevent me from using my DVD writer (which also doesn't burn properly since Hardy either). DBus worked fine in Gutsy so this is definitely a regression of some kind or maybe a conflict with the new ATI drivers. I haven't had a chance to check this.

Revision history for this message
Martin Pitt (pitti) wrote :

hi,
DaFlame [2008-05-22 17:53 -0000]:

> I don't know if this is a different bug

It is. Can you please open a separate report? This issue is already
closed.

> [ 4233.202422] dbus-daemon[5257]: segfault at 7fe705dd18e0 rip 7fe704eedae2 rsp 7fff0daa4778 error 4

Eww. Maybe you can enable the crash reporter again by setting
"enabled=1" in /etc/default/apport and have apport file the crash bug?
Thanks!

Revision history for this message
Jeremy Wilkins (wjeremy) wrote :

Thank you. I will do just that. It may also give me insight to it as well.

Revision history for this message
el es (el-es-poczta) wrote :

I confirm : on Hardy (8.04) I found /etc/rc2.d/S50dbus - after renaming to S12dbus (ie. must be less than gdm, pulseaudio and avahi), the system starts normally. Prior to that, there used to be a message after login 'Internal error : failed to initialize HAL' and NM and other things were not working. My system is https://wiki.ubuntu.com/LaptopTestingTeam/AcerAspire3023, with all recent updates.

Revision history for this message
^rooker (rooker) wrote :

Ran into this bug when doing a dist-upgrade from Edgy to Hardy (yes. directly!). Since I'm using KDE, I've moved /etc/rc[1-5].d/S13kdm to "S30kdm" and then rebooted my system - It's running fine now.
Maybe the S13 >> S30 wasn't even necessary...

Revision history for this message
Jean-Peer Lorenz (peer.loz) wrote :

I experienced this behaviour today (2009-01-19) on Ubuntu 8.10:

everything worked for me after the dist-upgrade some time ago.

But, today I accidentally disabled the 'dbus' service within the services-admin tool. The X server was restarted automatically and I was not able to login anymore. The cursor was blinking but no mouse or keyboard was usable. Switching to a shell by Alt+F6 was possible. Here I manaully started the dbus service and I could login again.

So, I opened the services-admin tool to re-enable the dbus service, rebooted the machine...and was not able to login. Same thing as before. I tried re-installing dbus, hal, system-tools-backends...no results.

I was able to fix the problem by changing the priority of the rc2.d/dbus script:

after disabling dbus in GUI:

user@host:/etc$ ls -l /etc/rc*/*dbus*
lrwxrwxrwx 1 root root 14 2008-04-28 18:11 /etc/rc1.d/K88dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root 14 2009-01-19 22:38 /etc/rc2.d/S50dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root 14 2008-04-28 18:11 /etc/rc3.d/S12dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root 14 2008-04-28 18:11 /etc/rc4.d/S12dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root 14 2008-04-28 18:11 /etc/rc5.d/S12dbus -> ../init.d/dbus
user@host:/etc$ ls -l /etc/rc*/*hal*
lrwxrwxrwx 1 root root 14 2008-04-28 18:11 /etc/rc0.d/S90halt -> ../init.d/halt
lrwxrwxrwx 1 root root 13 2008-05-09 17:36 /etc/rc1.d/K16hal -> ../init.d/hal
lrwxrwxrwx 1 root root 13 2008-05-09 17:36 /etc/rc2.d/S24hal -> ../init.d/hal
lrwxrwxrwx 1 root root 13 2008-05-09 17:36 /etc/rc3.d/S24hal -> ../init.d/hal
lrwxrwxrwx 1 root root 13 2008-05-09 17:36 /etc/rc4.d/S24hal -> ../init.d/hal
lrwxrwxrwx 1 root root 13 2008-05-09 17:36 /etc/rc5.d/S24hal -> ../init.d/hal
user@host:/etc$ ls -l /etc/rc*/*gdm*
lrwxrwxrwx 1 root root 13 2008-04-28 18:11 /etc/rc0.d/K01gdm -> ../init.d/gdm
lrwxrwxrwx 1 root root 13 2008-04-28 18:11 /etc/rc1.d/K01gdm -> ../init.d/gdm
lrwxrwxrwx 1 root root 13 2008-04-28 18:11 /etc/rc2.d/S30gdm -> ../init.d/gdm
lrwxrwxrwx 1 root root 13 2008-04-28 18:11 /etc/rc3.d/S30gdm -> ../init.d/gdm
lrwxrwxrwx 1 root root 13 2008-04-28 18:11 /etc/rc4.d/S30gdm -> ../init.d/gdm
lrwxrwxrwx 1 root root 13 2008-04-28 18:11 /etc/rc5.d/S30gdm -> ../init.d/gdm
lrwxrwxrwx 1 root root 13 2008-04-28 18:11 /etc/rc6.d/K01gdm -> ../init.d/gdm

Fix:
user@host:/etc$ sudo mv /etc/rc2.d/S50dbus /etc/rc2.d/S12dbus
user@host:/etc$ ls -l /etc/rc*/*dbus*
lrwxrwxrwx 1 root root 14 2008-04-28 18:11 /etc/rc1.d/K88dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root 14 2009-01-19 22:38 /etc/rc2.d/S12dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root 14 2008-04-28 18:11 /etc/rc3.d/S12dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root 14 2008-04-28 18:11 /etc/rc4.d/S12dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root 14 2008-04-28 18:11 /etc/rc5.d/S12dbus -> ../init.d/dbus

Finally everything is working again - but somewhere weird things happen.

CHANIYARA (malhar-ice)
Changed in hal (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
Revision history for this message
otakuj462 (otakuj462) wrote :

The issue persists for me on Ubuntu 8.04. It occurs about %50 of the time after every reboot.

Revision history for this message
otakuj462 (otakuj462) wrote :

Forgot to mention:

jacob@jacob-laptop:/etc$ ls -l /etc/rc?.d/*dbus*
lrwxrwxrwx 1 root root 14 2008-04-29 03:54 /etc/rc1.d/K88dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root 14 2008-04-29 03:54 /etc/rc2.d/S12dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root 14 2008-04-29 03:54 /etc/rc3.d/S12dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root 14 2008-04-29 03:54 /etc/rc4.d/S12dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root 14 2008-04-29 03:54 /etc/rc5.d/S12dbus -> ../init.d/dbus
jacob@jacob-laptop:/etc$ ls -l /etc/rc?.d/*hal*
lrwxrwxrwx 1 root root 14 2007-01-04 13:08 /etc/rc0.d/S90halt -> ../init.d/halt
lrwxrwxrwx 1 root root 13 2008-05-09 05:05 /etc/rc1.d/K16hal -> ../init.d/hal
lrwxrwxrwx 1 root root 13 2008-05-09 05:05 /etc/rc2.d/S24hal -> ../init.d/hal
lrwxrwxrwx 1 root root 13 2008-05-09 05:05 /etc/rc3.d/S24hal -> ../init.d/hal
lrwxrwxrwx 1 root root 13 2008-05-09 05:05 /etc/rc4.d/S24hal -> ../init.d/hal
lrwxrwxrwx 1 root root 13 2008-05-09 05:05 /etc/rc5.d/S24hal -> ../init.d/hal
jacob@jacob-laptop:/etc$ ls -l /etc/rc?.d/*gdm*
lrwxrwxrwx 1 root root 13 2007-06-04 17:03 /etc/rc0.d/K01gdm -> ../init.d/gdm
lrwxrwxrwx 1 root root 13 2007-06-04 17:03 /etc/rc1.d/K01gdm -> ../init.d/gdm
lrwxrwxrwx 1 root root 13 2007-06-04 17:03 /etc/rc2.d/S13gdm -> ../init.d/gdm
lrwxrwxrwx 1 root root 13 2007-06-04 17:03 /etc/rc3.d/S13gdm -> ../init.d/gdm
lrwxrwxrwx 1 root root 13 2007-06-04 17:03 /etc/rc4.d/S13gdm -> ../init.d/gdm
lrwxrwxrwx 1 root root 13 2007-06-04 17:03 /etc/rc5.d/S13gdm -> ../init.d/gdm
lrwxrwxrwx 1 root root 13 2007-06-04 17:03 /etc/rc6.d/K01gdm -> ../init.d/gdm

Revision history for this message
otakuj462 (otakuj462) wrote :

It seems like this is my issue, as mentioned above:

https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/227838

Displaying first 40 and last 40 comments. View all 194 comments or add a comment.