Plymouth

From Gentoo Wiki
Jump to: navigation, search
Resources

Plymouth is used to show splash screens during system boot and shutdown. It is a more modern alternative to fbsplash and provides flicker-free animated boot splashes with support for progress bars, solar flares, and other nifty things. In addition to OpenRC, it also has full systemd support. Since it is a boot splash tool, Plymouth does not provide background eye-candy for the ttys way fbsplash does (meaning it shows no decoration on the consoles after the system has booted).

Installation

Kernel

Specific kernel options must be altered in order to get Plymouth working properly. Use the genkernel --menuconfig all command (or equivalent) in order to modify the kernel configuration.

It is highly advised to disable the Linux bootup logo. On some systems having the bootup logo displayed seems to cause problems.

KERNEL This example shows the correct way to disable the bootup logo:
Device Drivers --->
   Graphics Support --->
      [ ] Bootup logo  --->
Important
Be sure to enable kernel modesetting (KMS) for the system's respective graphics card.

KMS for Intel cards

KERNEL Intel onboard GPUs set to use modesetting:
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
Important
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)

KERNEL NVIDIAGPU set to use Nouveau:
Device Drivers  --->
    Graphics support  --->
        <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
            <*> Nouveau (nVidia) cards
Important
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.

Note
So far the results of using official Nvidia-drivers are untested with Plymouth.

KMS for Radeon cards

KERNEL Radeon GPU set to use modesetting:
Device Drivers --->
   [*] Staging drivers  --->
      [*]     Enable modesetting on radeon by default
Important
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

gdm Enables smooth transition to GDM local
libkms Provides abstraction to the DRM drivers (intel, nouveau and vmwgfx at this moment) local
pango Adds support for printing text on splash screen and text prompts, e.g. for password local
static-libs Build static versions of dynamic libraries as well global

Emerge

The sys-boot/plymouth package can be installed by running:

root #emerge --ask sys-boot/plymouth

Configuration

/etc/plymouth/plymouthd.conf - the sole configuration file for Plymouth. It can be left untouched. Selecting theme is described in further section.

Initramfs generators

There are currently two initramfs generators that support Plymouth. Either one will produce essentially the same result. Determining which to use, is entirely the choice of the user. This article does not go into detail on troubleshooting failed results. So, choosing the more comfortable initramfs would be a wise choice. Using genkernel-next is recommended, since many users are already familiar with using genkernel.

At this point in time, normal genkernel cannot create an initramfs with a Plymouth theme included. Therefore, in order to proceed, either dracut or sys-kernel/genkernel-next will need to be selected, in order to build an initramfs capable of including a Plymouth theme. From this point onward, this configuration guide will continue presuming genkernel-next has been selected, since it is marked stable in the Portage tree and is essentially a drop in replacement for normal genkernel. Instructions for Dracut will be provided, although they are far from a full configuration.

Genkernel-Next

Continue by enabling the plymouth USE flag in /etc/portage/package.use in order for Portage to emerge genkernel-next properly:

root #echo "sys-kernel/genkernel-next plymouth" >> /etc/portage/package.use
root #emerge --ask sys-kernel/genkernel-next

Use a text editor of choice to enable Plymouth and the Plymouth theme in genkernel-next's configuration file:

FILE /etc/genkernel.confConfiguring Genkernel for Plymouth
# Enable splashutils in early space (initrd). Default is "no".
# SPLASH="no"

# Installs (or not if set to "no") Plymouth into the initramfs. If "splash" will be
# passed to GRUB_CMDLINE_LINUX_DEFAULT at boot Plymouth will be activated.
PLYMOUTH="yes"

# Embeds the given Plymouth theme into the initramfs.
PLYMOUTH_THEME="solar"
Warning
The SPLASH variable listed in the file above should be set to "no". The SPLASH variable configures an option for the fbsplash bootsplash loader (media-gfx/splashutils) NOT Plymouth.

Then use genkernel-next to generate the initramfs (note that Plymouth requires udev):

root #genkernel --udev initramfs

When using genkernel-next, skip the Dracut section, that immediately follows this section.

Dracut

Dracut (sys-kernel/dracut) is an alternative initramfs generator created by the Fedora development team. Before reading the rest of Dracut guide, here is a fun fact: both Plymouth and Dracut are cities in Massachusetts. This is speculation. However, it would appear, the creators of these programs might have taken this into consideration.

Follow this link for Dracut installation instructions. Dracut should enable Plymouth automatically if it is installed.

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-plugin

No additional configuration for the plugin is necessary, it should be operational next time Plymouth is ran. To remove this functionality simply uninstall the plugin.

Additionally, make sure that the RC is non-interactive. Edit the /etc/rc.conf file:

FILE /etc/rc.confRC configuration for Plymouth example
rc_interactive=”NO”

Bootloaders

GRUB2

When using GRUB2, an update to GRUB2's configuration file must be made in order to enable the splash screen during early boot. Append the options quiet splash to the GRUB_CMDLINE_LINUX_DEFAULT variable. You might also want 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.

This all can be performed by modifying the /etc/default/grub configuration file:

FILE /etc/default/grubConfiguring GRUB2 for Plymouth
GRUB_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 to generate a list of all available themes. Do this using the plymouth-set-default-theme command:

root #plymouth-set-default-theme --list

Assuming the solar theme is desired as the system's theme, run:

root #plymouth-set-default-theme solar
Note
The 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.
Important
When using OpenRC with genkernel, the theme will also need to be referenced in genkernel-next's configuration file. This is outlined in the Genkernel-Next configuration section above.

It is possible to create themes for Plymouth. See the Theme creation article for more information.

Usage

Regenerate the initramfs using the genkernel or dracut command, depending on which generator you've chosen earlier:

root #genkernel initramfs

or

root #dracut --force

As long as the configuration has been performed properly, this will pack the selected Plymouth theme into the initramfs.

Then regenerate GRUB config to use the initramfs and apply your GRUB2 graphical settings:

root #grub-mkconfig -o /boot/grub/grub.cfg
Note
For Plymouth to work as intended the proper GRUB2 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 GRUB2, 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.

See also

  • fbsplash - an antiquated alternative to Plymouth.

External resources