Table of Contents

Note

plymouth can be used to create a splash image that will be displayed during boot and during shutdown. The following notes describe the process of enabling plymouth on Debian.

Setup

plymouth requires a framebuffer. Without a configured framebuffer, plymouth will load in text-mode with a progressbar, such that even if you attempt to change the theme with plymouth-set-theme, it will still revert to the progress bar rendering the changes ineffective. The most common is to use uvesafb:

aptitude install v86d
modprobe uvesafb

and then to pick a resolution. Some of the most common ones are:

1024x768-16
1024x768-32
1024x768-8
1280x1024-16
1280x1024-8
1600x1200-16
1600x1200-8
320x200-16
320x200-32
320x200-8
320x240-16
320x240-32
320x240-8
320x400-16
320x400-32
320x400-8
640x400-16
640x400-32
640x400-8
640x480-16
640x480-32
640x480-8
800x600-16
800x600-32
800x600-8

This resolution has to be added to either grub, or to lilo (using append). In order to add the resolution to grub, the /etc/defaults/grub file has to be added in order to change the GRUB_COMMANDLINE_LINUX_DEFAULT such that it includes:

quiet splash video=uvesafb:mode_option=640x400-32,mtrr=3,scroll=ywrap

Next, the GRUB_GFXMODE parameter in /etc/defaults/grub has to be updated to reflect this change:

GRUB_GFXMODE=640x400

Now, the uvesafb module has to be configured as well, by editing /etc/initramfs-tools/modules and adding:

uvesafb mode_option=640x400-32 mtrr=3 scroll=ywrap

Next, an option has to be passed so that the initrd image will load the framebuffer. This can be done by creating /etc/initramfs-tools/conf.d/splash and adding one line:

FRAMEBUFFER=y

Lastly, for the changes to take place, issue:

update-initramfs -u
update-grub

which will start plymouth on the next boot.

Creating a Logo for Boot-Up and Shutdown

On Debian, themes are stored in /usr/share/plymouth/themes/. To create a theme, create a subdirectory under that parent and give it the name of your theme. In this example, we will use the spectacledowl theme, and we thus create /usr/share/plymouth/themes/spectacledowl.

The theme directory will contain two images, spectacledowl-boot.png and spectacledowl-shutdown.png. Along with those two images, a configuration file spectacledowl.plymouth is added that will use the script plymouth plugin and run spectacledowl.script on every boot, shutdown, resume and suspend events:

[Plymouth Theme]
Name=spectacledowl
Description=Wallpaper
ModuleName=script

[script]
ImageDir=/usr/share/plymouth/themes/spectacledowl
ScriptFile=/usr/share/plymouth/themes/spectacledowl/spectacledowl.script

The spectacledowl.script file, maps the two images to each event and then resizes the images so that they match he framebuffer resolution. This resizing is preformed because the framebuffer resolution may change at run-time:

if(Plymouth.GetMode() == "boot") {
	wallpaper_image=Image("spectacledowl-boot.png");
}
else {
	wallpaper_image=Image("spectacledowl-shutdown.png");
}
screen_width=Window.GetWidth();
screen_height=Window.GetHeight();
resized_wallpaper_image=wallpaper_image.Scale(screen_width,screen_height);
wallpaper_sprite=Sprite(resized_wallpaper_image);
wallpaper_sprite.SetZ(-100);

The scripting language is described on the plymouth freedesktop page.

Setting the Theme

If you are under Debian, you may get the error:

/usr/lib/x86_64-linux-gnu/plymouth/script.so does not exist

in which case, you will need to install plymouth-drm:

aptitude install plymouth-drm

After that, the theme, in the previous example, called spectacledowl can be set as the default:

plymouth-set-default-theme spectacledowl