Back screen during boot (plymouth related)

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Looking at your custom Plymouth setup, I can identify several issues that are preventing your splash screen from displaying. Let me walk you through the corrections needed based on the Toradex documentation.

Issues with Your Current Setup

1. File Installation Path Errors

Your .bbappend file has incorrect file paths for the PNG images:

install -m 0644 ${WORKDIR}/frame01.png ${D}${datadir}/plymouth/themes/custom/frame01
install -m 0644 ${WORKDIR}/frame02.png ${D}${datadir}/plymouth/themes/custom/frame02

(1)

These should include the .png extension in the destination paths.

2. Script File Error

Your custom.script file has a typo - spr.SetZ(15); should be sprite.SetZ(15);.

3. Configuration File Location

The plymouthd.defaults file should be installed to /etc/plymouth/ rather than /usr/share/plymouth/.

Corrected Implementation

Based on the official Toradex documentation (1), here’s how you should structure your files:

Updated plymouth_%.bbappend

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI += " \
    file://custom.plymouth \
    file://custom.script \
    file://frame01.png \
    file://frame02.png \
"

EXTRA_OECONF += "--with-runtimedir=/run"

do_install:append () {
    install -d ${D}${datadir}/plymouth/themes/custom
    install -m 0644 ${WORKDIR}/custom.plymouth ${D}${datadir}/plymouth/themes/custom/custom.plymouth
    install -m 0644 ${WORKDIR}/custom.script ${D}${datadir}/plymouth/themes/custom/custom.script
    install -m 0644 ${WORKDIR}/frame01.png ${D}${datadir}/plymouth/themes/custom/frame01.png
    install -m 0644 ${WORKDIR}/frame02.png ${D}${datadir}/plymouth/themes/custom/frame02.png
}

(1)

Corrected custom.script

image = Image("frame01.png");

pos_x = Window.GetWidth()/2 - image.GetWidth()/2;
pos_y = Window.GetHeight()/2 - image.GetHeight()/2;

sprite = Sprite(image);
sprite.SetX(pos_x);
sprite.SetY(pos_y);

fun refresh_callback () {
    sprite.SetOpacity(1);
    sprite.SetZ(15);
}

Plymouth.SetRefreshFunction (refresh_callback);

(1)

Theme Selection Method

Instead of using plymouthd.defaults, you should set the theme using a post-process command in your image recipe or local.conf. Add this to your local.conf:

ROOTFS_POSTPROCESS_COMMAND += "set_plymouth_theme;"

set_plymouth_theme() {
    plymouth-set-default-theme custom --rebuild-initrd
}

(2)

Alternative Approach Using Toradex Example

The official Toradex documentation (1) shows a simpler approach using the existing spinner theme structure:

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI += " \
    file://frame01.png \
    file://spinner.plymouth \
"

EXTRA_OECONF += "--with-runtimedir=/run"

do_install:append () {
    install -m 0644 ${WORKDIR}/frame01.png ${D}${datadir}/plymouth/themes/spinner/watermark.png
    install -m 0644 ${WORKDIR}/spinner.plymouth ${D}${datadir}/plymouth/themes/spinner/spinner.plymouth
}

(1)

This approach modifies the existing spinner theme rather than creating a completely new theme, which can be more reliable.

Build Process

Make sure you’re building with the correct image recipe (3):

$ bitbake tdx-reference-multimedia-image

(3)

Verification Steps

After deployment, verify:

  1. Your theme files are present in /usr/share/plymouth/themes/custom/
  2. Check the active theme: plymouth-set-default-theme --list
  3. Ensure Plymouth is enabled in the boot process

The black screen issue is likely due to the file path errors and the script typo preventing Plymouth from loading your custom theme properly.

Best regards, Toradex AI Assistant.