Change the splash screen

By default, Ubuntu Core does not display a splash screen when a device is booting or shutting down. However, on Ubuntu Core 22 (and later), a splash screen can be enabled, either to display the built-in Ubuntu Core branding, or to display custom vendor branding or imagery.

Ubuntu Core Splash

Ubuntu Core’s splash screen is based on Ubuntu’s Plymouth-based splash screen implementation. It’s enabled by adding quiet splash as a kernel boot parameter:

quiet splash

On Ubuntu Core 22 and later, when using the default GNU GRUB bootloader, kernel boot parameters can be configured either in the Gadget snap, or through system options. See Modifying kernel boot parameters for further details on each process.

Customised splash screen

The splash screen can be customised in two different ways, either by including a new logo or image file, or by completely replacing the Plymouth theme used to generate the splash screen.

Ubuntu Core vendor splash screen,  50%

A PNG-formatted vendor logo, or any other PNG-formatted image, can be placed within a new /splash directory in the root of the Gadget snap. The image file must be called vendor-logo.png:

.
├── cmdline.extra
├── grub.conf
├── grubx64.efi
├── meta
│   ├── gadget.yaml
│   ├── gui
│   ├── hooks
│   │   └── configure
│   └── snap.yaml
├── pc-boot.img
├── pc-core.img
├── shim.efi.signed
├── snap
│   ├── command-chain
│   │   └── snapcraft-runner
│   └── hooks
│       └── configure
└── splash
   └── vendor-logo.png

The image will be scaled accordingly and images with a 2:1 aspect ratio work best (such as images with resolution of 800x400). Larger files will obviously increase the size of the gadget snap and the resulting Ubuntu Core image.

Replacement Plymouth theme

The most flexible way to change the appearance of the Ubuntu Core splash screen is to install a replacement Plymouth theme.

While Plymouth itself supports a variety of different splash plugins, Ubuntu Core’s implementation only supports its Scripts (script.so) plugin. This is the most flexible plugin as it provides its own feature-rich scripting language.

A new theme must be placed within a /splash/plymouth/themes/vendor directory in the root of the Gadget snap:

$GADGET/splash/plymouth/themes/vendor/

Pathnames specified in a custom Plymouth config file need to use the prefix /run/mnt/gadget/splash/ rather than /snap/gadget-snap/current/splash/ as the former is mounted in the initramfs before Plymouth is starts, whereas the latter is not.

It can also help to lower the kernel console logging verbosity by specifying loglevel=3 (or lower) on the kernel command line. See Customise the kernel command line for further details.

A good custom Plymouth theme example for Ubuntu Core is its own default theme:
https://github.com/snapcore/core-splash

Note that the configuration file inside the vendor/ directory must be named vendor.plymouth. Configuration inside will point to the script file.

See Building a gadget snap for details on how to create a custom gadget snap.

3 Likes

This page should make it clear that all of this is for UC22, and not for UC20.

1 Like

Another thing to note is ensuring that pathnames specified in the custom plymouth config file use the prefix /run/mnt/gadget/splash/... instead of /snap/gadget-snap/current/... as the former is mounted in the initramfs before plymouth is started whereas the latter is not.

It also may help to lower the kernel console logging verbosity even lower by specifying loglevel=3 (or lower) on the kernel command line.

1 Like

Thanks for these suggestions. I’ve added them to the document.

We should probably directly link to our reference AMD64 and ARM64 gadget snaps which allow for this behavior.

This comment is also redundant with (slightly contradictory to?) the comment at the end of this document:

I would reconcile these two bits into a single comment; I would probably migrate the clause with this comment to the top of the document as it really doesn’t fit into the section of this doc it is currently in (what does this information have to do with changing the Plymouth theme?).

1 Like