Display plymouth splash screen earlier in boot process

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

Display plymouth splash screen earlier in boot process

Postby mashley » Mon May 22, 2017 2:53 pm

I have a Pi 2 set up to boot directly to a SNES emulator and running inside a SNES case mod. I made an initrd to include the ply-image binary and loading screen, and the emulator was started using auto-login and a script in .bash_login. This has been working well, but the boot time of 17s bothered me, so I removed the auto-login and tried running the emulator using a systemd service. This got the boot time down to a much more reasonable 10 seconds.

The problem I have is that most of the boot time is spent on a black screen. Once the Plymouth splash screen appears, the emulator service starts almost immediately, resulting in the splash screen being displayed only momentarily. I would prefer for the loading screen to appear much sooner after powering on and remaining on the screen for the duration of the bootup process, only to be replaced once the emulator service starts.

Here is my plymouth start service:

$this->bbcode_second_pass_code('', '
[Unit]
Description=Show Plymouth-lite Start Screen
DefaultDependencies=no
After=systemd-vconsole-setup.service
Before=sysinit.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/echo 0 > /sys.class/graphics/fbcon/cursor_blink ; /usr/bin/e$

[Install]
WantedBy=multi-user.target
')

My emulator service:

$this->bbcode_second_pass_code('', '
[Unit]
Description=Starts SNES Emulator
DefaultDependencies=false # Very important! Without this line, the s$
# would wait until networking.service
# has finished initialization. This could $
# more seconds because of DHCP, IP attribu$

[Service]
Type=simple
ExecStart=/root/snes.sh
WorkingDirectory=/root/

[Install]
WantedBy=local-fs.target
')

And the results of systemd-analyse blame:

$this->bbcode_second_pass_code('', '
[root@alarmpi ~]# systemd-analyze blame
1.229s dev-mmcblk0p2.device
641ms plymouth-lite-start.service
633ms mnt-retrode.mount
459ms systemd-timesyncd.service
328ms systemd-udev-trigger.service
325ms systemd-journald.service
252ms systemd-resolved.service
212ms user@0.service
174ms dev-mqueue.mount
159ms kmod-static-nodes.service
150ms systemd-remount-fs.service
145ms systemd-tmpfiles-setup-dev.service
142ms systemd-networkd.service
126ms systemd-sysctl.service
124ms systemd-modules-load.service
116ms systemd-udevd.service
100ms sys-kernel-debug.mount
90ms systemd-journal-flush.service
78ms systemd-logind.service
75ms tmp.mount
72ms sys-kernel-config.mount
62ms systemd-update-utmp.service
56ms systemd-tmpfiles-setup.service
49ms systemd-random-seed.service
40ms boot.mount
38ms systemd-user-sessions.service
')

As you can see, the plymouth service should be starting immediately after the SD card is mounted, so I'm unsure why the splash screen isn't displayed sooner.

Many thanks in advance for any help!
mashley
 
Posts: 28
Joined: Wed Apr 16, 2014 8:31 pm

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 8 guests