How to display Plymouth until the stability of my containers

Hello,

I’m using a Verdin imx8mp card to run several Docker containers, including a frontend and a Chromium container.

I would like to know if there is a way to display my Plymouth theme until these containers are stable when starting my verdin ?

Note that I’m building my Tezi image from Yocto with additional layers, including my Plymouth theme, for example.
I tried adding a layer displaying the Plymouth theme while my containers weren’t properly running, but I still get a black screen lasting a few seconds between my Plymouth theme and my Chromium display.

If you have any leads, I’d love to hear them.
Thanks
Simon

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:


Plymouth Theme Display Until Container Stability

Hello Simon,

Based on the Toradex documentation and community experiences with Plymouth on Verdin iMX8MP, here are some approaches to extend your Plymouth theme display until your containers are stable:

Understanding Plymouth Configuration

Plymouth is designed to provide a graphical boot animation while the boot process happens in the background (1). For Verdin iMX8MP specifically, there are some important configuration considerations that have been identified by the community.

Key Configuration Requirements

A community member successfully resolved Plymouth display issues on Verdin iMX8MP by ensuring the correct PACKAGECONFIG settings (2). The critical configuration is:

PACKAGECONFIG:append = " pango drm "

(2)

This ensures that Plymouth has the necessary DRM (Direct Rendering Manager) support for proper display output on the Verdin iMX8MP module (2).

Extending Plymouth Display Duration

To keep Plymouth running until your containers are stable, you can:

1. Control Plymouth Programmatically

You can control Plymouth’s lifecycle using commands like:

plymouthd; plymouth --show-splash;

(2)

2. Integration with Container Startup

Consider creating a systemd service or startup script that:

  • Keeps Plymouth active during container initialization
  • Monitors container health/readiness
  • Only terminates Plymouth when all critical containers are running

3. Kernel Command Line Parameters

You can add Plymouth-specific kernel parameters to improve timing and enable debugging (2). Adding plymouth.debug=1 can help with troubleshooting the display timing issues.

Addressing the Black Screen Issue

The black screen you’re experiencing between Plymouth and Chromium is a common issue. The community has noted that Plymouth typically appears around 10 seconds into the boot process on Verdin iMX8MP (2). This timing can be improved by:

  • Ensuring proper DRM configuration as mentioned above
  • Using initramfs integration
  • Adding appropriate kernel command line arguments

Building Your Custom Image

When building your Tezi image with Yocto, ensure you’re following the complete Plymouth integration process as documented (1):

  1. Add Plymouth to your conf/local.conf:
CORE_IMAGE_EXTRA_INSTALL += "plymouth"

(1)

  1. Create your custom layer with the proper Plymouth configuration including the DRM support mentioned above.

The timing issue you’re experiencing is not uncommon with Plymouth on embedded systems, and the solution often involves fine-tuning the display driver initialization and Plymouth configuration for your specific hardware setup.

Best regards, Toradex AI Assistant.

Thanks you for your anwser

In my plymouth_%.bbappend file I already have :

PACKAGECONFIG = “pango drm”

This is the recipes i try to add :

docker-wait.bb

DESCRIPTION = “Service that waits for Docker containers before quitting Plymouth”LICENSE = “CLOSED”

SRC_URI = “file://docker-wait.servicefile://docker-wait.sh”

S = “${WORKDIR}”

inherit systemd

SYSTEMD_PACKAGES = “${PN}”SYSTEMD_SERVICE:${PN} = “docker-wait.service”

do_install() {

install -d ${D}${systemd_unitdir}/systeminstall -m 0644 ${WORKDIR}/docker-wait.service ${D}${systemd_unitdir}/system/

install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/docker-wait.sh ${D}${bindir}/docker-wait.sh

}

FILES:${PN} += “${systemd_unitdir}/system/docker-wait.service${bindir}/docker-wait.sh”

docker-wait.service :

[Unit]
Description=Wait until Docker containers are running
Requires=docker.service
After=docker.service
[Service]
Type=oneshotUser=root
ExecStart=/usr/bin/docker-wait.sh
ExecStartPost=/bin/sh -c “/usr/bin/plymouth quit; sleep 3”
RemainAfterExit=yesSuccess
ExitStatus=0 1
[Install]
WantedBy=multi-user.target

docker-wait.sh :

#!/bin/sh
set +e
CONTAINERS=(“frontend” “chromium” )
TIMEOUT=120
SLEEP=2
ELAPSED=0
DOCKER_BIN=/usr/bin/docker
while [ $ELAPSED -lt $TIMEOUT ]; do
ALL_RUNNING=true

for c in "${CONTAINERS\[@\]}"; do

    if ! $DOCKER_BIN ps --format '{{.Names}}' | grep -q "^$c\\$"; then

        ALL_RUNNING=false

    fi

done

if \[ "$ALL_RUNNING" = true \]; then

    sleep 10

    exit 0

fi

sleep $SLEEP

ELAPSED=$((ELAPSED+SLEEP))
done
exit 0

and override.conf :

[Unit]

After=docker.service

After=docker.socket

After=docker.target

Does this seem like the right approach to you?
Thanks
Simon

Hi @simon3

This behaviour is exactly what Torizon OS does by default.

Is it not working for you, or is there any other reason why you are trying to remake this?

Plymouth only appears during boot/startup? But the Docker containers are not yet up or fully available.
I have a black screen for several seconds between Plymouth and the appearance of my Chromium.

Hi @simon3

I just tested it here, and it took around 3 seconds between the splash screen and the Chromium app. Is it about the same delay you are getting?


Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           6.6.94-7.3.0-g5a62539de8f9 #1-Torizon SMP PREEMPT Wed Jun 25 09:14:55 UTC 2025
Kernel command line:      root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/8568bef1b4acf89b02595197a2466284bcfc198a3fb59f92ca7236c9f19e7b7d/0
Distro name:              NAME="Torizon OS"
Distro version:           VERSION_ID=7.3.0-build.18
Distro variant:           VARIANT="Docker"
Hostname:                 verdin-imx8mp-15445736
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Verdin iMX8M Plus WB on Verdin Development Board
Toradex version:          0058 V1.1B
Serial number:            15445736
Processor arch:           aarch64
------------------------------------------------------------

@simon3

You may want to check this other thread with a similar question.

1 Like