Difference between revisions of "Plymouth"

From ArchWiki
Jump to navigation Jump to search
m (reorder warnings)
 
(30 intermediate revisions by 19 users not shown)
Line 5: Line 5:
 
[[it:Plymouth]]
 
[[it:Plymouth]]
 
[[ja:Plymouth]]
 
[[ja:Plymouth]]
 +
[[pt:Plymouth]]
 
[[ru:Plymouth]]
 
[[ru:Plymouth]]
 
[[zh-hans:Plymouth]]
 
[[zh-hans:Plymouth]]
[[pt:Plymouth]]
+
{{Related articles start}}
[http://www.freedesktop.org/wiki/Software/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.
+
{{Related|Silent boot}}
 +
{{Related articles end}}
 +
 
 +
[http://www.freedesktop.org/wiki/Software/Plymouth Plymouth] is a project from Fedora and now listed among the [https://www.freedesktop.org/wiki/Software/#graphicsdriverswindowsystemsandsupportinglibraries freedesktop.org's official resources] 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.
  
 
== Preparation ==
 
== Preparation ==
  
Plymouth primarily uses [[KMS]] (Kernel Mode Setting) to display graphics. If you can't use KMS (e.g. because you are using a proprietary driver) you will need to use [[Framebuffer#Framebuffer_Resolution|framebuffer]]{{Broken section link}} instead. In EFI/UEFI systems, plymouth can utilize the EFI framebuffer, otherwise [[Uvesafb]] is recommended as it can function with widescreen resolutions.
+
''Plymouth'' primarily uses [[KMS]] (Kernel Mode Setting) to display graphics. In EFI/UEFI systems, ''plymouth'' can utilize the EFI framebuffer. If you can't use KMS, e.g. because you are using a proprietary driver, or if you don't want to use the EFI framebuffer, consider using [[Uvesafb]] as it works with widescreen resolutions.
  
If you have neither KMS nor a framebuffer, Plymouth will fall back to text-mode.
+
If you have neither KMS nor a framebuffer, ''Plymouth'' will fall back to text-mode.
  
 
== Installation ==
 
== Installation ==
Line 24: Line 28:
 
=== The plymouth hook ===
 
=== The plymouth hook ===
  
Add {{ic|plymouth}} to the HOOKS array in [[mkinitcpio.conf]]. It '''must''' be added '''after''' {{ic|base}} and {{ic|udev}} for it to work:
+
Add {{ic|plymouth}} to the {{ic|HOOKS}} array in [[mkinitcpio.conf]]. It '''must''' be added '''after''' {{ic|base}} and {{ic|udev}} for it to work:
  
{{hc|/etc/mkinitcpio.conf|2=HOOKS="base udev plymouth [...] "}}
+
{{hc|/etc/mkinitcpio.conf|2=HOOKS=(base udev plymouth [...])}}
  
 
{{Warning|
 
{{Warning|
* If you use [[System Encryption with LUKS for dm-crypt|hard drive encryption]] with the {{ic|encrypt}} hook, you '''must''' replace the {{ic|encrypt}} hook with {{ic|plymouth-encrypt}} in order to get to the TTY password prompts.
+
* If you use [[System Encryption with LUKS for dm-crypt|hard drive encryption]] with the {{ic|encrypt}} hook, you '''must''' replace the {{ic|encrypt}} hook with {{ic|plymouth-encrypt}} and add it after the {{ic|plymouth}} hook in order to get to the TTY password prompts.
* Using PARTUUID or PARTLABEL in {{ic|1=cryptdevice=}} parameter does '''not''' work with {{ic|plymouth-encrypt}} hook.
+
* Using {{ic|PARTUUID}} or {{ic|PARTLABEL}} in {{ic|1=cryptdevice=}} parameter does '''not''' work with {{ic|plymouth-encrypt}} hook.
* For a [[Installing Arch Linux on ZFS#Native encryption|ZFS encrypted root]], you '''must''' install {{AUR|plymouth-zfs}} and replace {{ic|zfs}} hook with {{ic|plymouth-zfs}}
+
* For a [[Installing Arch Linux on ZFS#Native encryption|ZFS encrypted root]], you '''must''' install {{AUR|plymouth-zfs}} and replace the {{ic|zfs}} hook with {{ic|plymouth-zfs}}
 
}}
 
}}
  
 
After adding the {{ic|plymouth-encrypt}} hook, if input goes to the background in plaintext instead of into the password prompt you need to add your (kernel) graphics driver to your initramfs. For example, if using intel:
 
After adding the {{ic|plymouth-encrypt}} hook, if input goes to the background in plaintext instead of into the password prompt you need to add your (kernel) graphics driver to your initramfs. For example, if using intel:
  
{{hc|/etc/mkinitcpio.conf|2=MODULES="i915 [...]"}}
+
{{hc|/etc/mkinitcpio.conf|2=MODULES=(i915 [...])}}
 +
 
 +
This might also be a step needed for some themes to work.
  
 
=== Alternative plymouth hook (systemd) ===
 
=== Alternative plymouth hook (systemd) ===
 
If your [[mkinitcpio.conf]] includes the {{ic|systemd}} hook, then replace {{ic|plymouth}} with {{ic|sd-plymouth}}. Additionally, if using hard drive encryption, use {{ic|sd-encrypt}} instead of {{ic|encrypt}} or {{ic|plymouth-encrypt}}:
 
If your [[mkinitcpio.conf]] includes the {{ic|systemd}} hook, then replace {{ic|plymouth}} with {{ic|sd-plymouth}}. Additionally, if using hard drive encryption, use {{ic|sd-encrypt}} instead of {{ic|encrypt}} or {{ic|plymouth-encrypt}}:
  
{{hc|/etc/mkinitcpio.conf|2=HOOKS="base systemd sd-plymouth [...] sd-encrypt [...]"}}
+
{{hc|/etc/mkinitcpio.conf|2=HOOKS=(base systemd sd-plymouth [...] sd-encrypt [...])}}
  
 
=== The kernel command line ===
 
=== The kernel command line ===
  
You now need to set {{ic|quiet splash}} as your kernel command line parameter in your bootloader. See [[Kernel parameters]] for more info.
+
You now need to append the {{ic|1=quiet splash loglevel=3 rd.udev.log_priority=3 vt.global_cursor_default=0}} [[kernel parameters]]. See [[Silent boot]] for other parameters to limit the output to the console.
  
 
Rebuild your initrd image (see [[mkinitcpio]] article for details), for example:
 
Rebuild your initrd image (see [[mkinitcpio]] article for details), for example:
Line 57: Line 63:
 
To enable ''smooth transition'' (if supported) you have to:
 
To enable ''smooth transition'' (if supported) you have to:
  
# Disable your [[Display manager]] Unit, e.g. {{ic|systemctl disable gdm.service}}
+
# [[Disable]] your [[display manager]] unit, e.g. {{ic|gdm.service}}
# Enable the respective DM-plymouth Unit (GDM, LXDM, SLiM, LightDM, SDDM units provided), e.g. {{ic|systemctl enable gdm-plymouth.service}}
+
# [[Enable]] the respective DM-plymouth unit (GDM, LXDM, SLiM, LightDM, SDDM units provided), e.g. {{ic|gdm-plymouth.service}}
  
 
=== Show Delay ===
 
=== Show Delay ===
Line 69: Line 75:
 
}}
 
}}
  
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.
+
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 {{ic|ShowDelay}} to an interval (in seconds) longer than your boot time to prevent this flicker and only show a blank screen.
 
The default is 5 seconds, but you may wish to change this to a lower value to see your splash earlier during boot.
 
The default is 5 seconds, but you may wish to change this to a lower value to see your splash earlier during boot.
  
Line 84: Line 90:
 
# ''('''Text''': "Text mode theme with tricolor progress bar")''
 
# ''('''Text''': "Text mode theme with tricolor progress bar")''
 
# ''('''Details''': "Verbose fallback theme")''
 
# ''('''Details''': "Verbose fallback theme")''
 +
 +
Development version of Plymouth ({{AUR|plymouth-git}}) also comes with the '''BGRT''' (Boot Graphics Resource Table) theme, which is a variation of Spinner that keeps the OEM logo if available.
  
 
In addition you can install other themes from [[AUR]], just have a look at the "Required by"-Array on {{AUR|plymouth}}.
 
In addition you can install other themes from [[AUR]], just have a look at the "Required by"-Array on {{AUR|plymouth}}.
Line 106: Line 114:
 
}}
 
}}
  
Themes can be previewed without rebuilding, press {{ic|Ctrl+Alt+F2}} to change to console, log in as root and type:
+
Themes can be previewed without rebuilding, press {{ic|Ctrl+Alt+F6}} to switch to a text terminal, log in as root and type:
  
 
  # plymouthd
 
  # plymouthd
 
  # plymouth --show-splash
 
  # plymouth --show-splash
  
To quit the preview, press {{ic|Ctrl+Alt+F2}} again and type:
+
To quit the preview, press {{ic|Ctrl+Alt+F6}} again and type:
  
 
  # plymouth --quit
 
  # plymouth --quit
Line 117: Line 125:
 
Every time a theme is changed, the kernel image must be rebuilt:
 
Every time a theme is changed, the kernel image must be rebuilt:
  
  # plymouth-set-default-theme -R <theme>
+
  # plymouth-set-default-theme -R ''theme''
  
 
Reboot to apply the changes.
 
Reboot to apply the changes.
Line 124: Line 132:
  
 
====Show kernel messages====
 
====Show kernel messages====
During boot you can switch to kernel messages by pressing "Home" (or "Escape") key.
+
During boot you can switch to kernel messages by pressing the {{ic|Home}} or {{ic|Esc}} keys.
 +
 
 +
===Adding Arch Logo to spinner and BGRT themes===
 +
To add the Arch Logo to the ''spinner'' and ''BGRT'' themes copy the Arch logo to the spinner theme directory with the name {{ic|watermark.png}}:
 +
 
 +
# cp /usr/share/plymouth/arch-logo.png /usr/share/plymouth/themes/spinner/watermark.png
  
 
===Replacing the Arch Logo and creating custom themes===
 
===Replacing the Arch Logo and creating custom themes===

Latest revision as of 10:45, 27 November 2019

Plymouth is a project from Fedora and now listed among the freedesktop.org's official resources 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.

Preparation

Plymouth primarily uses KMS (Kernel Mode Setting) to display graphics. In EFI/UEFI systems, plymouth can utilize the EFI framebuffer. If you can't use KMS, e.g. because you are using a proprietary driver, or if you don't want to use the EFI framebuffer, consider using Uvesafb as it works with widescreen resolutions.

If you have neither KMS nor a framebuffer, Plymouth will fall back to text-mode.

Installation

Plymouth is available from the AUR: the stable package is plymouthAUR and the development version is plymouth-gitAUR.

If you also use GDM, you should install the gdm-plymouthAUR, which compiles gdm with plymouth support.

The plymouth hook

Add plymouth to the HOOKS array in mkinitcpio.conf. It must be added after base and udev for it to work:

/etc/mkinitcpio.conf
HOOKS=(base udev plymouth [...])
Warning:
  • If you use hard drive encryption with the encrypt hook, you must replace the encrypt hook with plymouth-encrypt and add it after the plymouth hook in order to get to the TTY password prompts.
  • Using PARTUUID or PARTLABEL in cryptdevice= parameter does not work with plymouth-encrypt hook.
  • For a ZFS encrypted root, you must install plymouth-zfsAUR and replace the zfs hook with plymouth-zfs

After adding the plymouth-encrypt hook, if input goes to the background in plaintext instead of into the password prompt you need to add your (kernel) graphics driver to your initramfs. For example, if using intel:

/etc/mkinitcpio.conf
MODULES=(i915 [...])

This might also be a step needed for some themes to work.

Alternative plymouth hook (systemd)

If your mkinitcpio.conf includes the systemd hook, then replace plymouth with sd-plymouth. Additionally, if using hard drive encryption, use sd-encrypt instead of encrypt or plymouth-encrypt:

/etc/mkinitcpio.conf
HOOKS=(base systemd sd-plymouth [...] sd-encrypt [...])

The kernel command line

You now need to append the quiet splash loglevel=3 rd.udev.log_priority=3 vt.global_cursor_default=0 kernel parameters. See Silent boot for other parameters to limit the output to the console.

Rebuild your initrd image (see mkinitcpio article for details), for example:

# mkinitcpio -p linux

Configuration

Smooth transition

To enable smooth transition (if supported) you have to:

  1. Disable your display manager unit, e.g. gdm.service
  2. Enable the respective DM-plymouth unit (GDM, LXDM, SLiM, LightDM, SDDM units provided), e.g. gdm-plymouth.service

Show Delay

Plymouth has a configuration option to delay the splash screen:

/etc/plymouth/plymouthd.conf
[Daemon]
Theme=spinner
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 5 seconds, but you may wish to change this to a lower value to see your splash earlier during boot.

Changing the Theme

Plymouth comes with a selection of themes:

  1. Fade-in: "Simple theme that fades in and out with shimmering stars"
  2. Glow: "Corporate theme with pie chart boot progress followed by a glowing emerging logo"
  3. Script: "Script example plugin" (Despite the description seems to be a quite nice Arch logo theme)
  4. Solar: "Space theme with violent flaring blue star"
  5. Spinner: "Simple theme with a loading spinner"
  6. Spinfinity: "Simple theme that shows a rotating infinity sign in the center of the screen"
  7. (Text: "Text mode theme with tricolor progress bar")
  8. (Details: "Verbose fallback theme")

Development version of Plymouth (plymouth-gitAUR) also comes with the BGRT (Boot Graphics Resource Table) theme, which is a variation of Spinner that keeps the OEM logo if available.

In addition you can install other themes from AUR, just have a look at the "Required by"-Array on plymouthAUR.

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

$ plymouth-set-default-theme -l

or:

$ ls /usr/share/plymouth/themes
details  glow    solar       spinner  tribar
fade-in  script  spinfinity  text

By default, the spinner theme is selected. The theme can be changed by editing /etc/plymouth/plymouthd.conf, for example:

/etc/plymouth/plymouthd.conf
[Daemon]
Theme=spinner
ShowDelay=5

Themes can be previewed without rebuilding, press Ctrl+Alt+F6 to switch to a text terminal, log in as root and type:

# plymouthd
# plymouth --show-splash

To quit the preview, press Ctrl+Alt+F6 again and type:

# plymouth --quit

Every time a theme is changed, the kernel image must be rebuilt:

# plymouth-set-default-theme -R theme

Reboot to apply the changes.

Tips and tricks

Show kernel messages

During boot you can switch to kernel messages by pressing the Home or Esc keys.

Adding Arch Logo to spinner and BGRT themes

To add the Arch Logo to the spinner and BGRT themes copy the Arch logo to the spinner theme directory with the name watermark.png:

# cp /usr/share/plymouth/arch-logo.png /usr/share/plymouth/themes/spinner/watermark.png

Replacing the Arch Logo and creating custom themes

The following themes use the Arch Linux logo supplied by Plymouth in /usr/share/plymouth/arch-logo.png: fade-in, script, solar, spinfinity. If you want to use another logo, you can take one of them or one of the plymouth themes in AUR, edit the file *.plymouth (and maybe *.script, too) and replace this image with one of your choice. You should create a package from your newly created theme, because changes in /usr/share/plymouth may not be persistent across package upgrades.

After installing and selecting your theme, you should rebuild the initrd image to use the new splash.

See also