Plymouth boot animation gets killed in few seconds

my boot animation gets killed in 3 seconds and i also have blank screen before and after the boot :

root@apalis-imx8-15310003:~# journalctl -u plymouth-quit.service
Dec 27 18:31:07 apalis-imx8-15310003 systemd[1]: Starting Terminate Plymouth Boot Screen...
Dec 27 18:31:10 apalis-imx8-15310003 systemd[1]: Finished Terminate Plymouth Boot Screen.

NB i added a plymouth-wait-for-animation.service as you see

[Unit]
Description=Waits for Plymouth animation to finish
Before=plymouth-quit.service display-manager.service

[Service]
Type=oneshot
ExecStart=/bin/sleep 5

[Install]
WantedBy=plymouth-start.service

this is the plymouth-quit.service

root@apalis-imx8-15310003:~# cat /etc/systemd/system/plymouth-quit.service 
[Unit]
Description=Terminate Plymouth Boot Screen
After=rc-local.service plymouth-start.service systemd-user-sessions.service qt_app.service plymouth-wait-for-animation.service
Wants=plymouth-wait-for-animation.service
 
[Service]
ExecStart=-/bin/plymouth quit --retain-splash
Type=oneshot
RemainAfterExit=yes

don’t get what’s the matter cause there are no errors showing up

from what i observed sleep command only increase or decrease the blank screen time but the animation still get killed at the same spot it doesn’t show the rest of the frames so sleep isn’t affecting the boot animation at all why do the rest of the frames don’t show

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

It seems you’re encountering an issue with the Plymouth boot animation on your Apalis iMX8 module, where it stops prematurely. Let’s explore some steps to help you troubleshoot and resolve this:

  1. Service Dependencies and Order: Double-check the plymouth-quit.service to ensure it isn’t being triggered too early by other services. The After and Wants directives should accurately reflect the necessary dependencies. Make sure all required services complete their tasks before plymouth-quit.service is executed.

  2. Adjust the Wait Service: The plymouth-wait-for-animation.service you created uses a sleep command, which only affects the timing of the blank screen, not the animation itself. You might try increasing the sleep duration to see if it impacts the animation timing. Ensure this service is correctly integrated into the boot process.

  3. Plymouth Configuration: Review the Plymouth configuration files to confirm that the animation is set up correctly. Verify that the theme and animation files are complete and properly referenced.

  4. Log Examination: Use journalctl to check for any errors or warnings related to Plymouth. This might provide insights into why the animation is terminating early.

  5. Test with a Simple Theme: Consider switching to a simpler Plymouth theme temporarily to determine if the issue is with the theme itself or the Plymouth setup.

By following these steps, you should be able to identify the cause of the premature termination of the Plymouth animation and adjust the configuration accordingly.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Issues Adding Custom Splash Screen Using Plymouth.

Hi @rania !

This is due to how you are designing your system. It is related to how you implemented Plymouth and also to the services you are using.

From you shared here and in all the other threads, doesn’t seem like you are incurring in an error.

About the initial blank screen before your splash screen

From what I saw you implemented Plymouth without initramfs. Therefore it will start latter than it would with initramfs. To get instantaneous splash screen, you would even need to modify your bootloader, which I am not sure it is supported by NXP on i.MX8QM.

About the blank screen after your splash screen

This is mos probably Weston starting right after plymouth-quit.service because of wayland-app-launch.service, which is expected. This time between Weston starting and your application starting is something that you could overcome by optimizing your application/GUI framework to start using the screen as quickly as possible. You could also customize weston.ini to show something that makes sense for your device, so you don’t have a blank screen.

About the splash screen quitting too quickly

I guess this is because weston.service/wayland-app-launch.service is starting, therefore they are using the display, so the splash screen ends abruptly. If you don’t want it, you need to check how the services are configured, so Weston takes a bit longer to start and you have more splash screen time. For example: have you tried to add plymouth-quit.service to weston.service’s After= property and add the the sleep 5 to plymouth-quit.service? Be sure to watch out for cyclic dependencies on Systemd: they show up on your boot logs (and dmesg). Example:

...
[ SKIP ] Ordering cycle found, skipping Start a wayland application
...

Some tips to check what is going on on Systemd

Please be aware that some of them are meant to run on your module an some are meant to run on your computer (which will SSH into the module)

Get the complete boot chart of your system:

You need to execute it from your computer. The computer must be able to SSH into the module.

ssh root@192.168.11.1 "systemd-analyze plot" | tee boot.svg && inkscape boot.svg &

Here I am using Inkscape because I like it and I can search for service names. You can use any image viewer that is SVG-capable. This is an example of what you get (here I zoomed into the botom part of the graph):

Get the dependencies of services

This command you need to run on the module.

root@verdin-imx8mp-15247228:~# systemctl list-dependencies plymouth-quit.service
plymouth-quit.service
● ├─system.slice
● └─sysinit.target
●   ├─dev-hugepages.mount
●   ├─dev-mqueue.mount
●   ├─kmod-static-nodes.service
○   ├─ldconfig.service
●   ├─plymouth-read-write.service
●   ├─plymouth-start.service
●   ├─rngd.service
○   ├─run-postinsts.service
●   ├─sys-fs-fuse-connections.mount
●   ├─sys-kernel-config.mount
●   ├─sys-kernel-debug.mount
○   ├─sys-kernel-tracing.mount
○   ├─systemd-ask-password-console.path
○   ├─systemd-hwdb-update.service
○   ├─systemd-journal-catalog-update.service
●   ├─systemd-journal-flush.service
●   ├─systemd-journald.service
○   ├─systemd-machine-id-commit.service
●   ├─systemd-modules-load.service
●   ├─systemd-network-generator.service
○   ├─systemd-pstore.service
●   ├─systemd-random-seed.service
●   ├─systemd-sysctl.service
○   ├─systemd-sysusers.service
●   ├─systemd-timesyncd.service
●   ├─systemd-tmpfiles-setup-dev.service
●   ├─systemd-tmpfiles-setup.service
●   ├─systemd-udev-trigger.service
●   ├─systemd-udevd.service
○   ├─systemd-update-done.service
●   ├─systemd-update-utmp.service
●   ├─local-fs.target
●   │ ├─-.mount
●   │ ├─systemd-fsck-root.service
●   │ ├─systemd-remount-fs.service
●   │ ├─tmp.mount
○   │ ├─var-volatile-cache.service
○   │ ├─var-volatile-lib.service
○   │ ├─var-volatile-spool.service
○   │ ├─var-volatile-srv.service
●   │ └─var-volatile.mount
●   └─swap.target

With this, you can check which dependencies the service has.
You can also get the services that depend on a given service:

root@verdin-imx8mp-15247228:~# systemctl list-dependencies --reverse plymouth-quit.service
plymouth-quit.service
● └─multi-user.target
●   └─graphical.target

Please be sure to use the tools available in Systemd to check what is going on with the services you are using. Checking Systemd’s documentation you can also find more [sub]commands and arguments that can help you to debug the what is happening.

Best regards,

i tried adding plymouth-quit-wait.service to weston but this causes a loop of the boot animation i also have tried to add plymouth-quit.service to weston.service’s After= property and add the the sleep 5 to plymouth-quit.service but didn’t solve the problem

root@apalis-imx8-15310003:/etc/systemd/system# systemctl list-jobs
JOB UNIT                                 TYPE  STATE
124 weston.service                       start waiting
1   graphical.target                     start waiting
119 serial-getty@ttyLP1.service          start waiting
98  systemd-update-utmp-runlevel.service start waiting
114 getty.target                         start waiting
123 pixii_app_gps.service                start waiting
94  plymouth-quit-wait.service           start running
2   multi-user.target                    start waiting

i am now stuck in a loop as u see
this is from weston.service

# Make sure we are started after logins are permitted.
Requires=systemd-user-sessions.service
After=systemd-user-sessions.service plymouth-start.service

# If Plymouth is used, we want to start when it is on its way out.
After=plymouth-quit-wait.service plymouth-quit.service

this is from plymouth-quit.service

[Unit]
Description=Terminate Plymouth Boot Screen
After=rc-local.service plymouth-start.service systemd-user-sessions.service pixii_app_gps.service

this is from plymouth-quit_wait.service

[Unit]
Description=Hold until boot process finishes up
After=rc-local.service plymouth-start.service systemd-user-sessions.service

[Service]
ExecStart=-/bin/plymouth --wait
Type=oneshot
RemainAfterExit=yes
TimeoutSec=0

when i comment that it doesn’t appear at all

Hi @rania !

I see you have pixii_app_gps.service on plymouth-quit.service. This might cause the issue you are getting. It depends on what the service does.

I tried a bit more on my side and the following video is my result. Please note that the red solid background is Weston, which I deliberately configured this way to understand when it was starting.

In the beginning of the video I release the reset button so the module starts booting. The screen remains black until plymouth is loaded. It respects my sleep 5 (see plymouth-quit.service below) then there is a slight black screen and Weston comes up (red screen). Right after that the Qt Cinematic application starts.

And this is the related bootchart:

Here are the related files and configuration (besides adding plymouth to the image when building on Yocto).

  • U-boot environment variable:
setup=setenv setupargs quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:1
  • plymouth-quit.service
[Unit]
Description=Terminate Plymouth Boot Screen
After=rc-local.service plymouth-start.service systemd-user-sessions.service

[Service]
ExecStartPre=sleep 5
ExecStart=-/bin/plymouth quit --retain-splash
Type=oneshot
RemainAfterExit=yes
TimeoutSec=20
  • plymouth-quit-wait.service
[Unit]
Description=Hold until boot process finishes up
After=rc-local.service plymouth-start.service systemd-user-sessions.service

[Service]
ExecStart=-/bin/plymouth --wait
Type=oneshot
RemainAfterExit=yes
TimeoutSec=0
  • wayland-app-launch.service
[Unit]
Description=Start a wayland application
After=weston.service
Requires=weston.service

[Service]
Type=simple
User=root
PAMName=login
Environment=WAYLAND_DISPLAY=/run/wayland-0
Environment=QT_QPA_PLATFORM=wayland-egl
ExecStart=/usr/share/cinematicexperience-1.0/Qt5_CinematicExperience --fullscreen
Restart=on-failure
RestartSec=1

[Install]
WantedBy=graphical.target
  • weston.service
# This is a system unit for launching Weston with auto-login as the
# user configured here.
#
# Weston must be built with systemd support, and your weston.ini must load
# the plugin systemd-notify.so.
[Unit]
Description=Weston, a Wayland compositor, as a system service
Documentation=man:weston(1) man:weston.ini(5)
Documentation=http://wayland.freedesktop.org/

# Make sure we are started after logins are permitted.
Requires=systemd-user-sessions.service
After=systemd-user-sessions.service

# D-Bus is necessary for contacting logind. Logind is required.
Wants=dbus.socket
After=dbus.socket plymouth-quit.service

# Ensure the socket is present
Requires=weston.socket

# Since we are part of the graphical session, make sure we are started before
# it is complete.
Before=graphical.target

# Prevent starting on systems without virtual consoles, Weston requires one
# for now.
ConditionPathExists=/dev/tty0

[Service]
# Requires systemd-notify.so Weston plugin.
Type=notify
EnvironmentFile=/etc/default/weston
ExecStart=/usr/bin/weston --modules=systemd-notify.so

# Optional watchdog setup
#TimeoutStartSec=60
#WatchdogSec=20

# The user to run Weston as.
User=root
Group=root

# Make sure the working directory is the users home directory
WorkingDirectory=/home/weston

# Set up a full user session for the user, required by Weston.
PAMName=weston-autologin

# A virtual terminal is needed.
TTYPath=/dev/tty7
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes

# Fail to start if not controlling the tty.
StandardInput=tty-fail
StandardOutput=journal
StandardError=journal

# Log this user with utmp, letting it show up with commands 'w' and 'who'.
UtmpIdentifier=tty7
UtmpMode=user

[Install]
# Note: If you only want weston to start on-demand, remove this line with a
# service drop file
WantedBy=graphical.target

Please note that there is nothing specific about Toradex modules here. This is simply Systemd/services configuration that you need to customize for your specific use case.

Best regards,