Splash Screen on BSP 6.0

I am trying to setup a custom splash screen using Plymouth as suggested in:

How to Add a Custom Splash Screen (Linux) | Toradex Developer Center.

For the most part I have things working as expected. I just have 2 issues:

  1. When the system boots up it outputs the linux start up for a few seconds onto the display before switching to the display
  2. Once the splash screen turns off I again see the linux console messages before my qt application launches.

How can I setup my system such that when I power up my system I see my splash screen followed by my application. No Linux console messages.

Same with shutdown. Application → Splash Screen → Display Off

My image is based off the latest kirkstone branch.

Hey @nmohan86,

It sounds like you want to disable the console output logs.
This article should help you, it involves disabling the framebuffer console.

-Eric

Thank you. That solved my issue.

I do have another question though. I am still seeing a blank screen for about 2 seconds between my splash screen and my qt application starting. How can I get rid of the blank screen such that the splash screen directedly transitions into my Qt application.

Hey @nmohan86,

Great!

You should be able to keep the splash screen displayed via a systemd service that adds a delay. Here is the write up via archlinux.org : Plymouth - ArchWiki

You will also need to enable this service.

I found this information via another post that may interest you: I want Multimedia Reference Image BSP + Plymouth showing splash-screen as Torizon does - #2 by Pipe

-Eric

I created a service that looks like this:

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

[Service]
Type=oneshot
ExecStart=/usr/bin/sleep 10

[Install]
WantedBy=plymouth-start.service

But this seems to have no effect. The splash screen shows for 2 seconds and the I see a blank screen for 1 second followed by my UI.

Hey @nmohan86,

It may be that the application takes control of the display rendering and produces the blank screen while it loads your UI.

Are you able to look at the logs and see when Plymouth ends and when your application begins rendering?

-Eric

It seems like the “retain splash” feature is not working on the plymouth quit command.

I have a simple bash script to simulate a bootup

/sbin/plymouthd --mode=boot  --kernel-command-line="splash plymouth.ignore-serial-consoles" --pid-file=/run/plymouth/pid --attach-to-session
plymouth show-splash

sleep 5
plymouth quit --retain-splash

/opt/qtApp

I see a blank screen for a second before the qt app launches. If I start the qt app before calling quit it does not work. Some how I need to be able to start the qt app in the background while still showing the splash screen.

@nmohan86 ,

How are you doing on this issue? Has the linked post given you any helpful solutions? There could be a similar solution for when your programs start/stop in relationship to plymouth-quit.service

Additional:

There are a few things to note about your service example that need modification.

ExecStart=/usr/bin/sleep 10 

need to reference /bin/sleep

and our BSP images does not use display-manager.service

Also Is your QT application using weston?

-Eric

I have still not been able to resolve this issue.

Yes the Qt Application is using weston.

I have a script that simulates the startup:

/sbin/plymouthd --mode=boot --kernel-command-line="splash plymouth.ignore-serial-consoles" --pid-file=/run/plymouth/pid --attach-to-session
plymouth show-splash

sleep 5
plymouth quit --retain-splash

/opt/qtApp

In the above screen I see a blank screen for about 2-3 seconds when transitioning from plymouth --quit to the Qt App.

If I start the Qt App before calling plyomouth --quit I get an error. See attached screenshot.

Hey @nmohan86,

Have you tried the corrected information in your plymouth-wait-for-animation.service file? I’m referring to:

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

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

[Install]
WantedBy=plymouth-start.service

As welll as enabling the service via systemctl enable plymouth-wait-for-animation.

In our TorizonCore image plymouth-quit.service is delayed via a patch, you can see this here: https://github.com/toradex/meta-toradex-torizon/blob/kirkstone-6.x.y/recipes-core/plymouth/files/0001-disable-boot-splash-later.patch you may want to implement this as well.

You can can also use systemd-analyze plot > chain.svg and view the chain.svg file to get a visualization of what is happening on boot. This will give you a visualization on when processes start.

-Eric