HAL Fails to initilize at startup

Bug #24029 reported by David Reagan
14
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
Fix Released
Medium
Martin Pitt
Edgy
Invalid
Undecided
Unassigned

Bug Description

Whenever I login to gnome I get the following error:
"Internal error

failed to initialize HAL!"

I have asked for help on the forums, but have not been able to resolve the issue
yet. Since I have seen several other people with the same problem I decided to
post a bug.

The forum topic is: http://www.ubuntuforums.org/showthread.php?p=412516

I am using the i386 version of breezy on a AMD64 chip, if that has anything to
do with this.

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

Did you happen to enable DMA for your CD-ROM device? Can you please send the
output of

  sudo hdparm /dev/hdb

?

Also, please do

  dmesg > dmesg.txt

and attach dmesg.txt here. Thanks!

Revision history for this message
David Reagan (jerrac) wrote :

Here is the hdparm. :D

firstuser@jerrac:~$ sudo hdparm /dev/hdb
Password:
/dev/hdb: No such file or directory
firstuser@jerrac:~$ sudo hdparm /dev/hdc

/dev/hdc:
 IO_support = 1 (32-bit)
 unmaskirq = 1 (on)
 using_dma = 0 (off)
 keepsettings = 0 (off)
 readonly = 0 (off)
 readahead = 256 (on)
 HDIO_GETGEO failed: Invalid argument
firstuser@jerrac:~$

Revision history for this message
David Reagan (jerrac) wrote :

Created an attachment (id=4726)
dmesg output that was requested.

Is this the right place for this file?

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

Thanks for the hdparm and dmesg outputs. Both look good, so we need to dig deeper.

1. Confirm that hal is not running: "pidof hald" should not print out anything.
2. Check whether dbus is running: If /var/run/dbus/pid exists, and "ps -p $(<
/var/run/dbus/pid)" prints out a line which says "dbus-daemon", it is running,
otherwise not.
3. Try to start dbus and hal manually: "sudo /etc/init.d/dbus restart". Please
give me the output.
4. Check whether hal is running: If "pidof hald" prints out a number, it is running.

Based on the answers to these four questions, I have further debugging steps.
Thanks!

Revision history for this message
David Reagan (jerrac) wrote :

firstuser@jerrac:~$ pidof hald

firstuser@jerrac:~$ cd /var/run/dbus
firstuser@jerrac:/var/run/dbus$ dir
firstuser@jerrac:/var/run/dbus$ ls
firstuser@jerrac:/var/run/dbus$ sudo /etc/init.d/dbus restart
Password:
 * Stopping Hardware abstraction layer: [ ok ]
 * Stopping system message bus... [ ok ]
 * Starting system message bus... [ ok ]
 * Starting Hardware abstraction layer: [ ok ]
firstuser@jerrac:/var/run/dbus$ pidof hald
11521
firstuser@jerrac:/var/run/dbus$

(In reply to comment #4)
> Thanks for the hdparm and dmesg outputs. Both look good, so we need to dig deeper.
>
> 1. Confirm that hal is not running: "pidof hald" should not print out anything.
> 2. Check whether dbus is running: If /var/run/dbus/pid exists, and "ps -p $(<
> /var/run/dbus/pid)" prints out a line which says "dbus-daemon", it is running,
> otherwise not.
> 3. Try to start dbus and hal manually: "sudo /etc/init.d/dbus restart". Please
> give me the output.
> 4. Check whether hal is running: If "pidof hald" prints out a number, it is
running.
>
> Based on the answers to these four questions, I have further debugging steps.
> Thanks!

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

(In reply to comment #5)
> firstuser@jerrac:~$ pidof hald
>
> firstuser@jerrac:/var/run/dbus$ ls
>

Thanks; so dbus was never started at all, I assume. What is the output of

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

?

This suspiciously sounds like #13333, which was fixed a while ago. Did you
happen to upgrade your box from a breezy pre-release? If the /etc/rc2.d/S*dbus
symlink is missing, then you might have had the bad luck of installing a bad
version. Please follow the steps in comment #16 of that bug to fix your box.

Revision history for this message
David Reagan (jerrac) wrote :

Yes! That fixed it! Wish I had found that bug when I did my search... :D

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

(In reply to comment #7)
> Yes! That fixed it! Wish I had found that bug when I did my search... :D

It requires some more effort to search in bugs that are not open any more.

Revision history for this message
encompass (encompass) wrote :
Download full text (18.8 KiB)

I know what I did before getting this error... I was fiddling with the services-admin program...
After click on, if I remember, the printer servers, it stalled for a moment and killed on me. I then got this...
When I try to start the services-admin again... I have tried running it at sudo and as sudo su with no luck.
I don't remember tuning on the hdparm service... I was just shutting off things like my bluetooth and printer services which I don't use.

jason@tabby:~$ sudo hdparm /dev/hda

/dev/hda:
 multcount = 0 (off)
 IO_support = 0 (default 16-bit)
 unmaskirq = 0 (off)
 using_dma = 1 (on)
 keepsettings = 0 (off)
 readonly = 0 (off)
 readahead = 256 (on)
 geometry = 36481/255/63, sectors = 586072368, start = 0
jason@tabby:~$
 ----
dmesg....
jason@tabby:~$ dmesg
[17179569.184000] Linux version 2.6.17-10-generic (root@vernadsky) (gcc version 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)) #2 SMP Fri Oct 13 18:45:35 UTC 2006 (Ubuntu 2.6.17-10.33-generic)
[17179569.184000] BIOS-provided physical RAM map:
[17179569.184000] BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
[17179569.184000] BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
[17179569.184000] BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
[17179569.184000] BIOS-e820: 0000000000100000 - 000000001f6f0000 (usable)
[17179569.184000] BIOS-e820: 000000001f6f0000 - 000000001f6f3000 (ACPI NVS)
[17179569.184000] BIOS-e820: 000000001f6f3000 - 000000001f700000 (ACPI data)
[17179569.184000] BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)
[17179569.184000] 0MB HIGHMEM available.
[17179569.184000] 502MB LOWMEM available.
[17179569.184000] found SMP MP-table at 000f4dc0
[17179569.184000] On node 0 totalpages: 128752
[17179569.184000] DMA zone: 4096 pages, LIFO batch:0
[17179569.184000] Normal zone: 124656 pages, LIFO batch:31
[17179569.184000] DMI 2.2 present.
[17179569.184000] ACPI: RSDP (v000 XPC ) @ 0x000f6880
[17179569.184000] ACPI: RSDT (v001 XPC AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1f6f3000
[17179569.184000] ACPI: FADT (v001 XPC AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1f6f3040
[17179569.184000] ACPI: MADT (v001 XPC AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1f6f6240
[17179569.184000] ACPI: DSDT (v001 XPC ST62 0x00001000 MSFT 0x0100000e) @ 0x00000000
[17179569.184000] ATI board detected. Disabling timer routing over 8254.
[17179569.184000] ACPI: PM-Timer IO Port: 0x4008
[17179569.184000] ACPI: Local APIC address 0xfee00000
[17179569.184000] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
[17179569.184000] Processor #0 15:4 APIC version 20
[17179569.184000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)
[17179569.184000] Processor #1 15:4 APIC version 20
[17179569.184000] ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
[17179569.184000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[17179569.184000] ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
[17179569.184000] IOAPIC[0]: apic_id 2, version 17, address 0xfec00000, GSI 0-23
[17179569.184000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[17179569.184000] ACPI: INT_SRC_O...

Revision history for this message
encompass (encompass) wrote :

And as with other posts here... I get the no hal now too... I am not upgrading... this is a fairly clean install.

Revision history for this message
encompass (encompass) wrote :

Think I fixed it... had to do with the dbus... some how it got unchecked and gnome and other what nots in ubuntu couldn't handle the situation without paniking. (I guess I would freak too if I lost one of my vitals, like an arm or leg :P ) Anyway, started up the service manually... you know /etc/init.d dbus start and everything started working. I then tried that services-admin program and it worked... I found that dbus was unchecked and checked it. Seems to be all hunky doory now.

Revision history for this message
Peter Salomonsen (petersalo) wrote :

I have a ASUS A6KM (AMD64) laptop and what I have noticed is that if I don't plug in the AC adapter, HAL seems to work, and I don't get this message. I can also run commands such as lshal.

However when I plug in the AC adapter, or if I boot with the AC adapter, I'll get this message "Failed to Initialize HAL". If running lshal I get this:

error: libhal_ctx_init: (null): (null)
Could not initialise connection to hald.
 Normally this mean the HAL daemon (hald) is not running or not ready.

if I do ps -ax, this is the state of my hal processes:

4359 ? Ds 0:02 /usr/sbin/hald
 4360 ? S 0:00 hald-runner
 4366 ? S 0:00 /usr/lib/hal/hald-addon-acpi
 4369 ? S 0:00 /usr/lib/hal/hald-addon-keyboard
 4372 ? S 0:00 /usr/lib/hal/hald-addon-keyboard
 4382 ? S 0:00 /usr/lib/hal/hald-addon-keyboard
 4396 ? S 0:00 /usr/lib/hal/hald-addon-storage

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

Closing unrelated edgy task.

Changed in hal:
status: Unconfirmed → Rejected
Revision history for this message
demagogue (heartless1) wrote :

I'm having the same problem and I have no idea where to begin with starting to try to fix it.

Revision history for this message
Peter Salomonsen (petersalo) wrote : Re: [Bug 24029] Re: HAL Fails to initilize at startup

Hi,

I'm not experienced in kernel module programming - but I know this used to
work on 6.06 (Dapper). I've heard that it's probably fixed in a later kernel
than the one used in EDGY today.

Without going into any code, I've found that this only happens when my laptop
is powered - and also hibernate doesn't work to good either...

cheers,

Peter

On Wednesday 13 December 2006 04:14, demagogue wrote:
> I'm having the same problem and I have no idea where to begin with
> starting to try to fix it.

Revision history for this message
demagogue (heartless1) wrote :

I'm running a desktop, so that laptop thing doesn't apply.

Revision history for this message
qburn (qburn) wrote :

Here the same problem , upgrade to 6.10 , and HAl fail to initilaize at startup , dbus is running , it dies with :

00:08:53.544 [I] hald.c:82: Added device to GDL; udi=/org/freedesktop/Hal/devices/platform_serial8250
00:08:53.544 [I] hotplug.c:205: /sys/class/tty/ttyS53 is a class device (devpath)
00:08:53.544 [I] classdev.c:1348: class_add: subsys=tty sysfs_path=/sys/class/tty/ttyS53 dev= physdev=0x08088138
Segmentation fault

please , someone knows how to fix this ?

Revision history for this message
Peter Salomonsen (petersalo) wrote :

I added the feisty repositories to my sources.list and installed the
kernel-image + dependencies (restricted-modules) only. The 2.6.19 kernel
seems to fix this issue..

On Sunday 17 December 2006 00:10, qburn wrote:
> Here the same problem , upgrade to 6.10 , and HAl fail to initilaize at
> startup , dbus is running , it dies with :
>
> 00:08:53.544 [I] hald.c:82: Added device to GDL;
> udi=/org/freedesktop/Hal/devices/platform_serial8250 00:08:53.544 [I]
> hotplug.c:205: /sys/class/tty/ttyS53 is a class device (devpath)
> 00:08:53.544 [I] classdev.c:1348: class_add: subsys=tty
> sysfs_path=/sys/class/tty/ttyS53 dev= physdev=0x08088138 Segmentation fault
>
> please , someone knows how to fix this ?

Revision history for this message
qburn (qburn) wrote :

Thank you for help , kernel 2.6.19 seems to solve the problem , however my poor linux skills did not let me install in it porperly.... he he ... so system starts 8 min and there is no network interfaces, however hald runs ... have you installed something more than kernel image and restricted modules from feisty repositories !?

Revision history for this message
Peter Salomonsen (petersalo) wrote :

No that was all, there were a few additional dependencies when upgrading the
kernel (I chose the linux-image-generic package) - such as libc etc. But they
should be automatic if you choose the generic package.

On Monday 18 December 2006 10:19, qburn wrote:
> Thank you for help , kernel 2.6.19 seems to solve the problem , however
> my poor linux skills did not let me install in it porperly.... he he ...
> so system starts 8 min and there is no network interfaces, however hald
> runs ... have you installed something more than kernel image and
> restricted modules from feisty repositories !?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.