Plymouth
Plymouth is a bootsplash used to show splash screens during system boot and shutdown.
Plymouth provides flicker-free animated boot splashes with support for progress bars, solar flares, and other nifty things. In addition to OpenRC, it has full systemd support.
Installation
Kernel
Specific kernel options must be altered in order to get Plymouth working properly. If using a distribution kernel, continue at installing Plymouth.
Bootup logo
It is highly advised to disable the Linux bootup logo. On some systems having the bootup logo displayed seems to cause problems.
Device Drivers ---> Graphics Support ---> [ ] Bootup logo --->
Be sure to enable kernel modesetting (KMS) for the system's graphics card.
KMS for Intel cards
Device Drivers ---> Graphics Support ---> <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) ---> <*> Intel 8xx/9xx/G3x/G4x/HD Graphics [*] Enable modesetting on intel by default
If this is the user's first time modifying settings for on-board Intel GPUs the Intel article should be referenced for additional configuration.
KMS for Nvidia cards (Nouveau drivers)
Device Drivers ---> Graphics support ---> <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) ---> <*> Nouveau (nVidia) cards
If this is the user's first time changing settings for the NVIDIA graphics card using the nouveau driver be sure to reference the nouveau article for additional information.
KMS for Nvidia cards (official drivers)
To use the official Nvidia drivers see the wiki's official Nvidia-drivers article.
So far the results of using official Nvidia-drivers are untested with Plymouth.
KMS for Radeon cards
Device Drivers ---> [*] Staging drivers ---> [*] Enable modesetting on radeon by default
If this is the user's first time setting up a Radeon graphics card be sure to reference the radeon article for further information.
USE flags
USE flags for sys-boot/plymouth Graphical boot animation (splash) and logger
+drm
Provides abstraction to the DRM drivers (intel, nouveau and vmwgfx at this moment)
+gtk
Add support for x11-libs/gtk+ (The GIMP Toolkit)
+pango
Adds support for printing text on splash screen and text prompts, e.g. for password
+split-usr
Enable this if /bin and /usr/bin are separate directories
+udev
Enable virtual/udev integration (device discovery, power and storage device support, etc)
debug
Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
doc
Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
freetype
Build with freetype support (if enabled, used for encryption prompts)
selinux
!!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur
static-libs
Build static versions of dynamic libraries as well
systemd
Enable use of systemd-specific libraries and features like socket activation or session tracking
Emerge
The sys-boot/plymouth package can be installed by running:
root #emerge --ask sys-boot/plymouthConfiguration
/etc/plymouth/plymouthd.conf - the sole configuration file for Plymouth. It can be left untouched. Selecting theme is described in further section.
Building Initramfs
Bootsplashes are loaded by initramfs so they need to be included in it.
Initramfs Generators
Dracut
Dracut (sys-kernel/dracut ) is an initramfs generator created by the Fedora development team. Fun fact: Plymouth and Dracut are both cities in Massachusetts. Though this is speculation, the creators of these programs might have taken this into consideration.
Dracut should enable Plymouth automatically if it is installed. See the Dracut installation instructions.
Some themes such as kde-plasma/breeze-plymouth require certain files to be included in the initramfs such as label plugins and fonts. These currently have to be added manually using
install_items[1] . See this section on the Dracut page for customizing the image, and the example mkinitcpio hook for which files to add.[2] Manual initramfs creation
When creating a manual initramfs, for example using Custom Initramfs, it is possible to bundle Plymouth.
First, disable udev USE flag for Plymouth (it will not display anything until udev is properly initialized). Otherwise udev will need to be added to the initramfs as well.
root #echo "sys-boot/plymouth -udev" >> /etc/portage/package.useroot #emerge sys-boot/plymouthThen, populate the initramfs with the plymouth files and theme. While it may be done manually, the better way is utilizing /usr/libexec/plymouth/plymouth-populate-initrd. It will deliver all the binaries, config and themes needed (only the theme that is enabled, so do not forget to re-execute when changing theme).
The script will copy all the files to selected directory.
Add this code snippet to the initramfs generation script, just before the initramfs packing:
/path/to/the/generator.shInitramfs generation script.... # populate plymouth if available if[-x/usr/libexec/plymouth/plymouth-populate-initrd] then /usr/libexec/plymouth/plymouth-populate-initrd-t$INITRAM_DIR fi ....
Finally, update the actual init script in initramfs:
/path/to/initExample init file.... # Plymouth needs /dev/pts mounted mount-tdevtmpfsnone/dev mkdir/dev/pts mount-tdevpts/dev/pts/dev/pts .... # early in the process start plymouthd and show splash if[[-x/usr/sbin/plymouthd-a-x/usr/bin/plymouth]] then mkdir-p/run/plymouth /usr/sbin/plymouthd--attach-to-session--pid-file/run/plymouth/pid--mode=boot /usr/bin/plymouthshow-splash fi ....
Init systems
systemd
Plymouth automatically registers itself with systemd to show splash screens during shutdown and restart. No additional configuration is required.
OpenRC
There is a plugin for Plymouth that extends a single line version of OpenRC's status to the framebuffer. It can be installed via:
root #emerge --ask sys-boot/plymouth-openrc-pluginNext, ensure OpenRC is not running interactively:
/etc/rc.confRC configuration for Plymouth examplerc_interactive="NO"
Plymouth should run next time the system boots. To remove this functionality simply uninstall the plugin.
Bootloaders
GRUB
When using GRUB, it must be configured to enable the splash screen during early boot. Append the options quiet splash to the GRUB_CMDLINE_LINUX_DEFAULT variable. It may be desirable to adjust the resolution in the GRUB_GFXMODE variable to match the desired resolution for the monitor, and set GRUB_GFXPAYLOAD_LINUX to "keep" in order to preserve the graphics mode during the entire boot.
/etc/default/grubConfiguring GRUB for PlymouthGRUB_CMDLINE_LINUX_DEFAULT='quiet splash' GRUB_GFXMODE=1366x768x24 GRUB_GFXPAYLOAD_LINUX=keep
Themes
After emerging Plymouth, a number of themes will be pulled in automatically, however more Plymouth themes can be downloaded from the web and installed manually. Extract the downloaded themes to the Plymouth theme directory: /usr/share/plymouth/themes
Make sure each new theme is contained in its own folder (just like the default themes that are installed) or they will not be detected by Plymouth.
Once the themes have been extracted, verify successful extraction by requesting Plymouth generate a list of all available themes. Do this using the plymouth-set-default-theme command:
root #plymouth-set-default-theme --listTo get a preview of the individual themes the following command can be used. Running plymouth from within X can stay on top, preventing the usage of the desktop, hence the killall command after five seconds. It will set a theme, start plymouthd and show the theme, wait five seconds and then kill plymouthd to again allow access to the X session:
root #plymouth-set-default-theme solar; plymouthd; plymouth --show-splash; sleep 5; killall plymouthdAssuming the solar theme is desired as the system's theme, run:
root #plymouth-set-default-theme solarThe solar theme will be used for the rest of the examples in this article. Simply replace
solar anywhere it appears with one of the other themes listed when using the plymouth-set-default-theme command, to set a different theme.It is possible to create themes for Plymouth. See the Theme creation article for more information.
There is also a Theming guide which provides a detailed introduction into creating themes.
Usage
Check for the latest kernel using:
root #eselect kernel listRegenerate the initramfs using the dracut command:
root #dracut --kver <latest kernel> --forceAs long as the configuration has been performed properly, this will pack the selected Plymouth theme into the initramfs.
Finally, regenerate GRUB config to use the initramfs and apply the GRUB graphical settings:
root #grub-mkconfig -o /boot/grub/grub.cfgAlternatively, portage can be used to used regenerate the initramfs on distribution kernels, if sys-kernel/installkernel has initramfs and the correct bootloader USE flags set:
root #emerge --config gentoo-kernelFor users using binary distribution kernels:
root #emerge --config gentoo-kernel-binFor Plymouth to work as intended, the proper GRUB video modules must also be loaded. Generally the correct video modules are loaded by default on Gentoo, so inserting additional ones is not usually needed. If frame buffer or video problems are being experienced with GRUB, be sure to investigate missing modules as a possible culprit.
Tips
According to the README file distributed with Plymouth, boot messages are dumped to /var/log/boot.log after the root filesystem has been mounted read-write.
External resources
- Plymouth on gentoo - Anders Evenrud's Blog (old)
- Red Hat 7's Plymouth documentation - Describes how to create a theme using the two-step plugin.
- Theming guide for creating themes using the script plugin.