Hacker News new | ask | show | jobs
by xfr 1628 days ago
There are several inaccuracies.

Everything after “Darwin Kernel Version 21.2.0” is XNU, not iBoot. This is when macOS starts according to the diagram. You don’t see logs from iBoot.

I have no idea what this means:

> The end of the kernel-only phase, which is entirely iBoot, comes almost 20 seconds after the start.

3 comments

> You don’t see logs from iBoot.

IIRC there's a serial console according to Asahi Linux people. Not sure if iBoot logs anything to it.

It does not. Apparently these days iBoot only logs to a proprietary USB debug protocol we haven't figured out yet.
> comes almost 20 seconds after the start.

Wait... an M1 Mac takes 20 seconds to boot?? A middle of the range windows machine in 1996 booted quicker than that...

It does not, not fresh and without boot time actions to take. Certainly not the laptops.

The Mac Mini used to have a larger delay dependent on the monitor attached, due to monitor detection times; about 7 seconds to the XNU kernel being launched, or 13 without a monitor (I guess it waits for monitor detection to time out), but now that Apple removed boot-time display support on those I imagine it no longer matters. The laptops have a much shorter time since they only have to deal with a well controlled internal display.

So it's possible that an M1 Mac Mini with no monitor attached pre macOS 12.1 took 20 seconds to boot to a login screen, but that's the worst case configuration.

(Yes, removing the bootloader framebuffer is stupid; I have a bug filed with them about this, but haven't gotten a response yet)

Just to follow up, it's about 16 seconds on a MacBook Air. 7 seconds of that are iBoot, and 9 are macOS. If you turn off the startup chime sound (which is a checkbox in system settings), that cuts out 2 seconds of iBoot time and makes it 14 seconds total.

For comparison, a ThinkPad X230 running Arch takes 7 seconds to GRUB (which I skipped through as fast as possible), FDE unlock prompt at the 12 sec mark, and after typing in my password it takes a further 13 seconds to get to a graphical login prompt (so 25 seconds total time).

Honestly, adjusting for the fact that Linux does fewer things before the FDE unlock than macOS, and more things after it and before the login prompt (I've got a few extra daemons and thing installed), I'd say they're quite comparable. The MacBook is a bit better (2s faster firmware without the chime).

Of course, half the point of these machines is they can run weeks while in sleep mode (or even while powered on as long as the CPU is idle and the display is off) and they have practically instant wake. So boot time isn't really relevant, since you rarely have to shut down.

> If you turn off the startup chime sound (which is a checkbox in system settings), that cuts out 2 seconds of iBoot time and makes it 14 seconds total.

Lol, wait, so the startup chime blocks the rest of the boot process?! I would have expected the system to be working on booting while the chime was playing.

Now I'm not sure whether I should keep the chime turned on. I like the chime, but I'm not sure I want to pay two extra seconds for it. :)

I think it's mostly that by the time the system is ready to play the chime, it takes less than two seconds to do whatever is left before transferring control to iBoot2, and of course you can't leave audio playing as you call a new piece of code... so even if the playback happens in the background, it would still have to wait for it to finish.
That doesn't seem right - though I must say macs have always felt to me as if the boot->user desktop takes way longer than other OS'es.

I guess the M1 counterpoint is the very, very fast sleep->wake speed.

> I have no idea what this means:

Userland is instantiated.