Disable Plymouth for smoother (& faster) default boot?

I wonder if we could consider selectively displaying the bootsplash? On SSDs I find it displaying for just a couple seconds (which is not a “proper” flicker but flicker like cause it goes so fast).

Is there any way to enable it only if:

  • You use LUKS encryption
  • The bootup is taking longer than 20 seconds (although I’m thinking if boots take longer than 60 seconds we should display some errors?) - alternatively we could do it based on disk speed during install?

We also still want plymouth for shutting down and installing updates, etc.

I actually did some tests a bit ago and found out that in a VM remove plymouth has a nice impact on boot times (systemd-analyze):
Plymouth removed - 2.2 seconds
Default - 4.7 seconds

I don’t expect that much impact on a real machine though.

(Previously part of this discussion - https://community.ubuntu.com/t/boot-animation/1849/2)

1 Like

If we trust systemd-analyze data, the live session (in kvm/virt-manager) goes from ~35s to ~16s if you disable splash (mostly from plymouth-quit-wait)

1 Like

What is it that’s taking twice as long? Booting to the login screen?

Regardless, that sounds like a bug if plymouth is having such a dramatic impact (or any impact) on performance. Ideally we should just fix the bug.

3 Likes

Remember that plymouth is also used to correctly multiplex terminal I/O from multiple concurrent startup processes. If you start plymouth after the boot is delayed, it’s too late; the user may see garbled output, which won’t help in fixing the situation.

See Plymouth is not a bootsplash. This was written before systemd, though. I don’t know to what extent systemd makes some plymouth functionality redundant (if any).

3 Likes

@rbasak
I was thinking if we detect they are on a slow disk (with a guesstimate of 20 seconds or more), then default to still have plymouth

@vanvugt
See Test:Userspace here: https://www.phoronix.com/scan.php?page=article&item=11-linux-boot&num=3

My initial guess is that the those who have <1 second boot time is due to them not using plymouth.
So far I’ve just testing Solus which doesn’t appear to use Plymouth. Obviously, this could still just be a bad bug.

I did some tests too on a desktop environment and I don’t think systemd-analyze is a reliable way to measure bootspeed and fully understand what is slow. It tells when the system reaches graphical.target but it does not mean the boot is over and all the services required for a full user session are ready.

On my tests (on a very slow system I admittedly) with plymouth enabled:

  • systemd-analyze boot time is 1min27s
  • gdm starts at 58s
  • xorg starts at 67s
  • gnome-shell at 86s

With splash screen disabled:

  • systemd-analyze boot time is 1min16s
  • gdm starts at 57s
  • xorg starts at 67s
  • gnome-shell starts at 86s

So, despite systemd-analyze showing a boot time 10s faster without splash screen, the graphical environment starts almost exactly at the same time.

Thanks for those tests! I’ve been relying mostly on systemd-analyze so my suggestions could be meaningless if it’s inaccurate. Will run some more tests.