Opened 6 months ago

Last modified 3 weeks ago

#18669 new enhancement

Show some on-screen activity at boot during the rocket stage

Reported by: haikupr Owned by: nobody
Priority: normal Milestone: R1/beta5
Component: - General Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Contrary to BeOS which was lightning fast to boot, Haiku can spend during the rocket stage a fair amount of time mounting package filesystems. Sometimes I'm even under the (false) impression that the boot process has halted. At that moment I wish there was some sort of on-screen indicator showing activity or, even better, progression. For this purpose I suggest that the rocket should be animated.

For an activity indication, the rocket could be shown spinning around its vertical axis, the animation would step by one frame for every mounted package---or two or three of them. For a progression indicator, the rocket could be shown through its voyage from the ground launch pad (before the first package gets mounted) to orbit (when the last package is mounted), traveling an ever thinner atmosphere, crossing the path of clouds, meteorites, lightning, sprites, aurora borealis, the space station and artificial satellites.

The first option is light as it require the storage of very few frames (4 or 5 should be enough). The second is heavy because it require the work of an artist and will need a significantly larger amount of storage for 80+ frames.

Attachments (1)

syslog (218.5 KB ) - added by pulkomandy 3 weeks ago.
syslog with bootsplash tracing and launch daemon debug enabled

Download all attachments as: .zip

Change History (9)

comment:1 by waddlesplash, 6 months ago

Component: System/Kernel- General
Keywords: boot rocket removed

The major premise of this ticket is false, as packagefs is mounted at the "disks" icon, long before the "rocket" icon. The "rocket" icon is reserved for actually launching userspace (app_server, etc.) and is normally very fast. I don't know that I've ever seen it linger for more than a second or two.

How long does it exactly spend for you? Generally anything more than 5 seconds on the rocket is indicative of some major problem.

A syslog might indicate what's happening at this stage. I would recommend trying booting with "fail-safe graphics" enabled, and (separately) with "Disable ACPI" enabled, from the bootloader options, to see if either makes any difference with how long the rocket lingers.

in reply to:  1 comment:2 by madmax, 5 months ago

Replying to waddlesplash:

Generally anything more than 5 seconds on the rocket is indicative of some major problem.

Unless you have slow storage, I guess. While my desktop with an SSD takes about 3 seconds there and a VM booting from a drive in the host's RAM even less, my older laptop with an HD is 12 seconds in the rocket and about the same in the disks icon.

comment:3 by bipolar, 5 months ago

Adding to madmax data... On the same Phenom II X4 (bare-metal) I get:

  • Slightly outdated beta4 on SSD: 3 seconds on the Rocket icon before Desktop.
  • Up-to-date beta4 on HDD: 22 seconds on the Rocket icon before Desktop.

(I remember the later not being so slow on fresh install, I should try to see where the big slow down comes from).

Last edited 5 months ago by bipolar (previous) (diff)

comment:4 by pulkomandy, 5 months ago

On my very fast laptop (11 gen core i7 with nvme), it also takes what looks like a long time to me recently. Maybe in the 2 to 5 seconds range, but compared to what I'm used to in Haiku, this is an eternity already.

But rather than adding on-screen animations, we should fix the problem and make it boot faster, of course. Why does it take so long?

comment:5 by waddlesplash, 5 months ago

Milestone: UnscheduledR1/beta5

comment:6 by KitsunePrefecture, 5 months ago

Against that animation .. can we rahter get short text about achieved progress like as in case it was in LiLo ?

As I've seen - in a Youtube video - a Debian Linux still does something similar - enlist a status message about boot progress and launched stuff with OK or not OK. It would be more detailed than icons which are enlighting or not.

Of course with a toggle on / off for them who does not need such text messages or annoying.

I know that syslog can be switched to be printed while booting, but that requires knowledge to interpret, I think something more simple and straight statements that despite it can give a glue about the failure - if any - where it happened and if possible : what ?

At least who reports something in a ticket or on the forum ask for help - can give a better hint what arised at them as an error / problem during boot.

Of course the investigation and resolution of reason of slowness also welcomed, but maybe some details about progress.

comment:7 by pulkomandy, 3 weeks ago

I made a test on my machine.

Haiku currently boots in 11 seconds (from selecting it in refind to showing the desktop) which I think isn't that bad.

I enabled syslog timestamps in kernel settings and had to increase the syslog buffer size. I only have about 5 seconds of logs, I guess not everything in the boot process is logging to syslog and maybe we should add logs when we light up icons and also when launch_daemon starts differernt things?

Anyway, on my machine this breaks out to, roughly:

  • 1 second for early init of kernel, identifying CPUs, start loading drivers
  • 3 seconds of logs from the intel_extreme driver, which is scanning all video outputs sequentially over I2C (a somewhat slow protocol and also most of this is timing out since there are 6 or 7 ports, but only one connected to a display
  • 1 second of logs from HDA audio and PS2 drivers

This is all in the "PCI card" stage of the boot screen (hardware init) as far as I can tell. Indeed I think this is where my machine spends the most time now.

by pulkomandy, 3 weeks ago

Attachment: syslog added

syslog with bootsplash tracing and launch daemon debug enabled

comment:8 by pulkomandy, 3 weeks ago

I have attached a syslog with timestamps enabled, as well as trace messages from both the bootsplash and the launch daemon.

I can see that we get to stage 6 (rocket) very quickly, apparently in less than 1 second. But after that, it takes several seconds for everything else to complete.

The main reason for this appears to be the new driver model: since the drivers are loaded lazily, it doesn't happen early for most drivers, and so, few initializations are done early on. For example, the soundcard is only initialized when media_server is started, likewise for the graphics card and app_server.

One option would be to redistribute the icons a bit better over the boot process duration, however, it seems some work would be needed, because the rocket icon marks the startup of userspace, at that point, some part of the boot argument memory is freed, and that includes the boot icons (there is a TODO about it in the bootsplash code).

And, one way to make the boot faster is indeed to optimize the drivers initialization.

Note: See TracTickets for help on using tickets.