hal takes about 60 seconds to start up
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | HAL |
Fix Released
|
Medium
|
||
| | hal (Ubuntu) |
Medium
|
Unassigned | ||
Bug Description
Binary package hint: hal
Hal takes a long time to start, around 60 seconds. This is on my laptop. On my desktop it doesn't take a noticable time.
lspci
00:00.0 Host bridge: ATI Technologies Inc RS200/RS200M AGP Bridge [IGP 340M] (rev 02)
00:01.0 PCI bridge: ATI Technologies Inc PCI Bridge [IGP 340M]
00:02.0 USB Controller: ALi Corporation USB 1.1 Controller (rev 03)
00:03.0 Modem: ALi Corporation M5457 AC'97 Modem Controller
00:04.0 Multimedia audio controller: ALi Corporation M5451 PCI AC-Link Controller Audio Device (rev 02)
00:06.0 Bridge: ALi Corporation M7101 Power Management Controller [PMU]
00:07.0 ISA bridge: ALi Corporation M1533/M1535 PCI to ISA Bridge [Aladdin IV/V/V+]
00:0b.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5901 100Base-TX (rev 01)
00:0c.0 CardBus bridge: Texas Instruments PCI1510 PC card Cardbus Controller
00:0f.0 IDE interface: ALi Corporation M5229 IDE (rev c4)
01:05.0 VGA compatible controller: ATI Technologies Inc Radeon IGP 330M/340M/350M
| C de-Avillez (hggdh2) wrote : | #1 |
| C de-Avillez (hggdh2) wrote : | #2 |
startup hal takes more than 30 seconds. On shutdown, for my surprise, it was seamless, with absolutely no waits. This is today, yesterday it was not behaving like this.
| Martin Pitt (pitti) wrote : | #3 |
Can you please get a hal debug output, as described on the second half of https:/
Thanks!
| Changed in hal: | |
| status: | Unconfirmed → Needs Info |
| C de-Avillez (hggdh2) wrote : | #4 |
Restarted hald in verbose mode. first timestamp is 09:31:43.595, last timestamp is 09:32:32.162, so about 50 seconds.
There is a forced 1000 ms wait at blockdev (see timestamps 09:32:10.650 onward) for each device found; this piece of init takes about 20 seconds to complete.
Have not yet looked fully into it. I intend to change hald init to verbose & try again.
|
|
#5 |
In above bug, hal takes about a minute to start up. A large chunk seems to come from a long series like this:
09:32:11.652 [I] blockdev.c:686: Looking in /sys/block/
09:32:11.653 [I] blockdev.c:698: /sys/block/
09:32:11.653 [I] blockdev.c:698: /sys/block/
09:32:11.653 [I] blockdev.c:734: Done looking in /sys/block/
09:32:11.653 [I] blockdev.c:740: Ignoring hotplug event - no parent
09:32:11.653 [W] blockdev.c:1152: Not adding device object
09:32:11.654 [I] blockdev.c:638: block_add: sysfs_path=
09:32:11.655 [I] blockdev.c:681: Waiting 1000ms to wait for device mapper to be ready
09:32:12.656 [I] blockdev.c:686: Looking in /sys/block/
[...]
This does not seem to happen on the majority of computers.
|
|
#6 |
Created an attachment (id=9249)
verbose hal log
hal debug output
| Changed in hal: | |
| importance: | Undecided → Medium |
| status: | Needs Info → Confirmed |
| Changed in hal: | |
| status: | Unknown → Confirmed |
Which HAL version is this? I could not find the message (Waiting 1000ms to wait for device mapper to be ready) in current HAL git master code.
|
|
#8 |
This is the latest stable release, 0.5.8.1. This comes from hald/linux/
/* sleep one second since device mapper needs additional
* time before the device file is ready
*
* this is a hack and will only affect device mapper block
* devices. It can go away once the kernel emits a "changed"
* event for the device file (this is about to go upstream)
* and we can depend on a released kernel with this feature.
*/
if (strncmp (hal_util_
}
Indeed git head looks completely different, so let's assume for now that this is fixed already. Thank you!
| Changed in hal: | |
| status: | Confirmed → Needs Info |
| Changed in hal: | |
| status: | Needs Info → Fix Released |
| Chris Samuel (chris-csamuel) wrote : | #9 |
I see the same thing here with Feisty Kubuntu (up to date), each of my LVM's results in a 1 second wait:
"Waiting 1000ms to wait for device mapper to be ready"
So my boot time here has almost doubled from just over 1m to 1m 52s (+/- 3s) - a bit disappointing really as I upgrade thinking I'd see a faster boot! :-(
I've attached the resulting hal.log from here and will attach the bootcharts for my last Edgy boot and latest Feisty boot for comparison.
| Chris Samuel (chris-csamuel) wrote : | #10 |
Bootchart from Kubuntu Edgy immediately prior to upgrade to Feisty showing a boot time of 1m 4s.
| Chris Samuel (chris-csamuel) wrote : | #11 |
Bootchart from Kubuntu Feisty with current updates showing a boot time of 1m 57s, over 50 seconds longer than Edgy.
ACPI?
I noticed starting gkrellm today that it took an oddly long time to startup so I straced it, it was hanging on batt and ac acpi for a long time.
Then I started hal with --verbose=yes --use-syslog and restarted dbus, hal also hung for a long time on those same acpi parts.
Startup w/o acpi modules for batt and ac:
root@jkd:~# time /etc/init.d/dbus start
* Starting system message bus dbus [ OK ]
* Starting Hardware abstraction layer hald [ OK ]
* Starting DHCP D-Bus daemon dhcdbd [ OK ]
* Starting network connection manager NetworkManager [ OK ]
* Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon [ OK ]
* Starting network events dispatcher NetworkManagerD
real 0m6.661s
user 0m0.169s
sys 0m0.097s
root@jkd:~# modprobe ac
root@jkd:~# modprobe battery
root@jkd:~# time /etc/init.d/dbus start
* Starting system message bus dbus [ OK ]
* Starting Hardware abstraction layer hald [ OK ]
* Starting DHCP D-Bus daemon dhcdbd [ OK ]
* Starting network connection manager NetworkManager [ OK ]
* Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon [ OK ]
* Starting network events dispatcher NetworkManagerD
real 1m10.391s
user 0m0.261s
sys 0m0.149s
And this is what syslog says:
Mar 31 01:17:06 jkd hald[8852]: 01:17:06.499 [I] acpi.c:1225: acpi_add: acpi_path=
Mar 31 01:17:44 jkd hald[8852]: 01:17:44.505 [D] acpi.c:162: Current voltage is unknown, smaller than 501001765435r greater than design
Mar 31 01:17:44 jkd hald[8852]: 01:17:44.519 [I] acpi.c:1197: Add callouts completed udi=/org/
Mar 31 01:17:44 jkd hald[8852]: 01:17:44.520 [I] hald.c:106: Added device to GDL; udi=/org/
Mar 31 01:17:44 jkd hald[8852]: 01:17:44.520 [I] acpi.c:1225: acpi_add: acpi_path=
Mar 31 01:17:44 jkd hald[8852]: 01:17:44.534 [I] acpi.c:1197: Add callouts completed udi=/org/
Mar 31 01:17:44 jkd hald[8852]: 01:17:44.534 [I] hald.c:106: Added device to GDL; udi=/org/
Mar 31 01:17:44 jkd hald[8852]: 01:17:44.534 [I] acpi.c:1225: acpi_add: acpi_path=
Mar 31 01:18:05 jkd hald[8852]: 01:18:05.011 [D] acpi.c:162: Current voltage is unknown, smaller than 501001765435r greater than design
Mar 31 01:18:05 jkd hald[8852]: 01:18:05.055 [I] acpi.c:1197: Add callouts completed udi=/org/
Mar 31 01:18:05 jkd hald[8852]: 01:18:05.055 [I] hald.c:106: Added device to GDL; udi=/org/
Mar 31 01:18:05 jkd hald[8852]: 01:18:05.056 [I...
| David Meier (droebbel-melta) wrote : | #14 |
Same Problem here, waiting 1 sec for each device manager (evms) device.
This seems to be a kernel problem, it takes a long time just to modprobe battery and thermal as well.
| Chris Samuel (chris-csamuel) wrote : | #16 |
I think Jason is looking at a different problem, the slowdown I see is purely down to HAL as I'm running on a desktop with no battery or thermal ACPI modules loaded and the HAL message is quite explicit that it is HAL itself waiting for 1 second per logical volume and the upstream bug report shows the code in HAL that causes this problem.
See https:/
I now see this on every box that is running Feisty that has a number of logical volumes.. :-(
Any ideas when the upstream fix will be available in Feisty ?
yes, I've found that my problem is actually the kernel, 2.6.20 doesn't play well with ACPI on quite a few systems, it shows it's head when I modprobe battery,ac and thermal with longer than usual pauses, and then really shows up with applications like kpowermanager, gkrellm, and hal.
| Martin Pitt (pitti) wrote : | #18 |
Jason, can you please file a separate bug against linux-source-
Apparently fixed upstream, so this will get fixed in gutsy when we'll move to hal 0.5.9.
| Changed in hal: | |
| status: | Confirmed → In Progress |
| Chris Samuel (chris-csamuel) wrote : | #19 |
Is a fix going to get backported to Feisty or do we just have to put up with much slower boot times ?
Hi Chris,
Chris Samuel [2007-04-17 11:44 -0000]:
> Is a fix going to get backported to Feisty or do we just have to put up
> with much slower boot times ?
I am afraid not, hal 0.5.9 has major architectural changes which are
inappropriate for feisty-updates. *However*, if we find some people
who test it, we can put it into feisty-backports. Right now I do not
see a principal reason why 0.5.9 should not work at all on Feisty.
| C de-Avillez (hggdh2) wrote : | #21 |
@Martin: if it helps any, I can test it.
| Martin Pitt (pitti) wrote : | #22 |
For anyone who is interested to test hot new crack, I prepared hal 0.5.9 packages which work on current Feisty for me:
http://
They will be uploaded to gutsy as soon as it opens. NB that you need hal-info_
Feedback appreciated!
| Chris Samuel (chris-csamuel) wrote : | #23 |
Hi Martin, thanks for the response!
I guess what I'm puzzled about is that looking at what has changed in that part of the code of hald/linux/
/* sleep one second since device mapper needs additional
* time before the device file is ready
*
* this is a hack and will only affect device mapper block
* devices. It can go away once the kernel emits a "changed"
* event for the device file (this is about to go upstream)
* and we can depend on a released kernel with this feature.
*/
If the current Feisty kernel does emit that "changed" event then would it be safe to just make that usleep() go away ?
Yours,
Confused of Melbourne. :-)
| C de-Avillez (hggdh2) wrote : | #24 |
I downloaded, created the packages, and installed on my Feisty. No problems, and boot time indeed got better. The enforced delay is gone. No side effects, at least not visible.
| Matti Lindell (mlind) wrote : | #25 |
I'd be very interested to see Gutsy's hal appear in feisty-backports. I rebuilt current hal and hal-info from gutsy's archive for feisty, and there's no delay on bootup anymore.
I haven't spotted any regressions so far, but I'm not using any exotic gadgets either. I'll post back the results after few days. Thanks pitti for your efforts on this subject!
| Craig S. Prevallet (csprevallet) wrote : | #26 |
I downloaded the debs for libhal, libhalstorage1, hal, and hal-info packages for Gutsy directly from launchpad and installed (via dpkg). I am also happy to report no noticeable side effects (or other weirdness). I can also confirm a reduction in boot speed (5 seconds on my box) and the desire to see Gutsy's hal in feisty-backports. Kudos to M. Pitt and upstream.
| C de-Avillez (hggdh2) wrote : | #27 |
Updated from source package (as provided by Martin above) to Gutsy version. So far no regressions.
| Matti Lindell (mlind) wrote : | #28 |
Thank you for recent feisty-backports upload. I've had zero problems with new hal.
This is probably "Fix Released" now.
| Chris Samuel (chris-csamuel) wrote : | #29 |
Having just stumbled across the backports repositories ( https:/
Excellent work folks, my boot time is down over 20 seconds from 1:15 yesterday to 0:54 today.
| Martin Pitt (pitti) wrote : | #30 |
Excellent, thanks for testing the backports.
| Changed in hal: | |
| status: | In Progress → Fix Released |
| Changed in hal: | |
| importance: | Unknown → Medium |
| Changed in hal: | |
| importance: | Medium → Unknown |
| Changed in hal: | |
| importance: | Unknown → Medium |

Similar here on a laptop with AMD64, but it is most visible on shutdown, when I lose usplash when shutting down dbus & friends. Takes about a minute to shutdown dbus.
On startup... I will check next boot.