Power off image

This forum is for discussion about general software issues.

Power off image

Postby mashley » Sun Apr 20, 2014 12:43 pm

Hi all

With some great help in the Raspberry Pi forum I've managed to get plymouth-lite working to provide a boot up splash screen. I have also enabled the service which provides a shutdown splash screen when the machine is shutting down. The problem I now have is that shutting down splash stays on the screen even after the machine has (presumably) reached runlevel 0. Here is my power off service:

$this->bbcode_second_pass_code('', '[Unit]
Description=Show Plymouth-lite Poweroff Screen
DefaultDependencies=no
Before=poweroff.service
After=plymouth-lite-start.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/chvt 6 ; /usr/bin/ply-image /usr/share/plymouth/nintendo-wide.png

[Install]
WantedBy=poweroff.target
')

The image exists and is accessible. I have enabled the service using:

$this->bbcode_second_pass_code('', '# systemctl enable plymouth-lite-poweroff')

Here is the reported status of the service:

$this->bbcode_second_pass_code('', '# systemctl status plymouth-lite-poweroff
* plymouth-lite-poweroff.service - Show Plymouth-lite Poweroff Screen
Loaded: loaded (/etc/systemd/system/plymouth-lite-poweroff.service; enabled)
Active: inactive (dead)')

I'm assuming it's ok for it to say "inactive (dead)" since my shutdown image service shows the same status and works just fine. I don't know how to check if there are any errors occurring during the running of the power off service (if it even runs) since the machine has halted by that point.

Any help would be much appreciated!
mashley
 
Posts: 28
Joined: Wed Apr 16, 2014 8:31 pm

Re: Power off image

Postby mashley » Sun Apr 20, 2014 1:32 pm

Ahh, it seems that poweroff.target is only reached if you issue the poweroff command (i.e. not "halt"). If I do this then the shutting down image does not appear, and the power off image appears briefly before the video signal goes (which does not happy when halting).

So, I need to display the power off image when the system has finished halting. Is there any way to do that?

Thanks in advance.
mashley
 
Posts: 28
Joined: Wed Apr 16, 2014 8:31 pm

Re: Power off image

Postby WarheadsSE » Sun Apr 20, 2014 3:34 pm

You realize it that systemd has a habit of shutting down extremely fast, and this could be a portion of the cause of it being so brief? Also, when it properly is powered off, it is off therefore the signal to the display should cease.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Power off image

Postby mashley » Mon Apr 21, 2014 4:24 pm

Thanks for your reply. Yes I now realise the difference between "halt" and "poweroff", and I do think that the image is displayed so briefly after reaching poweroff.target because it is so fast. The raspberry pi I'm running on has to be switched off manually (in my case using the power switch on a SNES case) so I wanted the "power off" image to remain on the screen as a reminder to turn the pi off. The only way I could get this to happen in the end was to use halt instead of poweroff, and specify "Before=umount.target" in the service file. That way the power off image stayed on the screen indefinitely. However, I don't really feel comfortable with this as a problem reaching umount.target could result in the filesystems not being unmounted, and the power off image therefore being misleading.

Is there any way to stop poweroff.target actually powering anything off after stopping all tasks and unmounting the filesystem?
mashley
 
Posts: 28
Joined: Wed Apr 16, 2014 8:31 pm

Re: Power off image

Postby timmgleason » Wed May 14, 2014 8:09 pm

Did you ever find a solution to this issue?

I am having a similar problem with plymouth leaving the 'Shutting down...' message on the display after the system is ready to power off.

Regards
timmgleason
 
Posts: 1
Joined: Wed May 14, 2014 8:06 pm


Return to General

Who is online

Users browsing this forum: No registered users and 7 guests

cron