knowledge/technology/linux/Plymouth.md
2024-12-20 09:52:58 +01:00

3.6 KiB

obj arch-wiki rev
application https://wiki.archlinux.org/title/Plymouth 2024-12-20

Plymouth

Plymouth is a project from Fedora providing a flicker-free graphical boot process. It relies on kernel mode setting (KMS) to set the native resolution of the display as early as possible, then provides an eye-candy splash screen leading all the way up to the login manager.

Setup

By default, Plymouth logs the boot messages into /var/log/boot.log, and does not show the graphical splash screen.

  • If you want to see the splash screen, append splash to the kernel parameters.
  • If you want silent boot, append quiet too.
  • If you want to disable the logging, append plymouth.boot-log=/dev/null. Alternatively, add plymouth.nolog which also disables console redirection.

To start Plymouth on early boot, you must configure your initramfs generator to create images including Plymouth.

For mkinitcpio, add plymouth to the HOOKS array in mkinitcpio.conf:

# /etc/mkinitcpio.conf

HOOKS=(... plymouth ...)

If you are using the systemd hook, it must be before plymouth.

Furthermore make sure you place plymouth before the crypt hook if your system is encrypted with dm-crypt.

Configuration

Plymouth can be configured in file /etc/plymouth/plymouthd.conf. You can see the default values in /usr/share/plymouth/plymouthd.defaults.

Changing the theme

Plymouth comes with a selection of themes:

  • BGRT: A variation of Spinner that keeps the OEM logo if available (BGRT stands for Boot Graphics Resource Table)
  • Fade-in: "Simple theme that fades in and out with shimmering stars"
  • Glow: "Corporate theme with pie chart boot progress followed by a glowing emerging logo"
  • Script: "Script example plugin" (Despite the description seems to be a quite nice Arch logo theme)
  • Solar: "Space theme with violent flaring blue star"
  • Spinner: "Simple theme with a loading spinner"
  • Spinfinity: "Simple theme that shows a rotating infinity sign in the center of the screen"
  • Tribar: "Text mode theme with tricolor progress bar"
  • (Text: "Text mode theme with tricolor progress bar")
  • (Details: "Verbose fallback theme")

The theme can be changed by editing the configuration file:

# /etc/plymouth/plymouthd.conf

[Daemon]
Theme=theme

or by running:

plymouth-set-default-theme -R theme

Every time a theme is changed, the initrd must be rebuilt. The -R option ensures that it is rebuilt (otherwise regenerate the initramfs manually).

Install new themes

All currently installed themes can be listed by using this command:

plymouth-set-default-theme -l
# or:
ls /usr/share/plymouth/themes

Show delay

Plymouth has a configuration option to delay the splash screen:

# /etc/plymouth/plymouthd.conf

[Daemon]
ShowDelay=5

On systems that boot quickly, you may only see a flicker of your splash theme before your DM or login prompt is ready. You can set ShowDelay to an interval (in seconds) longer than your boot time to prevent this flicker and only show a blank screen. The default is 0 seconds, so you should not need to change this to a different value to see your splash earlier during boot.

HiDPI

Edit the configuration file:

# /etc/plymouth/plymouthd.conf

[Daemon]
DeviceScale=an-integer-scaling-factor

and regenerate the initramfs.

Misc

Show boot messages

During boot you can switch to boot messages by pressing the Esc key.

Disable with kernel parameters

If you experience problems during boot, you can temporary disable Plymouth with the following kernel parameters:

plymouth.enable=0 disablehooks=plymouth