[systemd-devel] reboot splash screen

Andrey Borzenkov arvidjaar at gmail.com
Fri Jan 31 23:20:01 PST 2014


В Fri, 31 Jan 2014 18:11:10 -0500
Cliff Brake <cliff.brake at gmail.com> пишет:

> Hi,
> 
> I'm trying to get systemd to display a splash screen on powerdown.
> I've tried using something similar to these recipes:
> 
> http://cgit.freedesktop.org/plymouth/tree/systemd-units
> 
> But, for some reason my service is not being activated (included below):
> 
> root at q7imx6:~# more /lib/systemd/system/reboot-splash.service
> [Unit]
> Description=Test unit
> Before=systemd-reboot.service
> DefaultDependencies=no
> 
> [Service]
> Environment=DISPLAY=:0
> ExecStart=/usr/bin/lcd-test-qt /usr/share/pixmaps/poweroff-splash.png

If your program need X, it is very unlikely to work as a service. Did
you test if manually starting it does anything?

> KillMode=none
> SendSIGKILL=no
> 
> [Install]
> WantedBy=reboot.target
> 
> (I've been testing with reboot command).
> 

Did you enable it? [Install] section only tells which links should be
created by "systemctl enable", it does not cause unit to be pulled in.

> Additionally, shutdown seems to be hanging at:
> [  OK  ] Reached target Shutdown.
> 
> Running systemd v206
> 
> Does systemd-reboot.service run at the start of a "reboot"?
> 

No, it runs at the very end of reboot sequence.

> Appreciate any ideas on the best way to do this.  The goal is to get
> the splash screen to display as quickly as possible after reboot
> command is issued.

This is counterpart of "how do I start service after everything else is
started on bootup". As it stands now, there is no easy way to do it (and
plymouth splash screen appears also far too late during reboot). To
make splash screen appear before anything else on shutdown you
literally need something that is ordered after everything else on
startup.

This probably involves new special unit boot-final.target which is
ordered After every other unit. This gives defined point in time where
both "late boot" and "early shutdown" services can run.


>                    I may end up patching systemd to simply start the
> splash program if I can't figure out how to make it happen in a
> service.
> 



More information about the systemd-devel mailing list