Plymouth flicker-free shutdown side-effect

João Paulo Rechi Vita jprvita at gmail.com
Tue Jan 1 01:08:30 UTC 2019


Hello Hans,

Firstly, thanks for your flicker-free boot work, it is really nice to
finally see a completely smooth boot process on the Linux desktop.

I've been integrating your work on Endless, where we do not want to
show the BGRT graphics for the entirety of the boot process, but use a
fully Endless-branded splash animation instead. With your kernel
changes to have fbcon defer its setup, have efifb copy the BGRT
graphics to the framebuffer, the flicker-free changes to grub, shim
and Plymouth, and and passing i915.fastboot=1 on the kernel command
line, I'm able to have a 100% flicker-free boot process.

That being said these also bring a side-effect that makes the shutdown
process very unpleasant. After X is shut down the BGRT logo will be
displayed for a moment, then the shutdown splash will be shown, and
finally the BGRT logo will be displayed for a moment again before the
machine powers off. Before the flicker-free changes, this would be a
clblack text console with a blinking cursor on the first character
position, but with these changes the console was never setup and the
BGRT logo is still on the TTY frame buffer.

For some reason I cannot reproduce this on an up-to-date Fedora 29
box, which IIUC has all the changes mentioned above in place. Using
Wayland I see a blank black screen on shutdown before the shutdown
splash, and using X I sometimes see the same as with Wayland,
sometimes a clean text terminal. Do you have any idea of what cleans
up the TTY on Fedora 29?

I'm not sure what the best solution is, but I was able to work around
this problem in two different ways:

 1. Clearing the frame buffer on efifb's probe instead of rebuilding
the BGRT logo, at the same point where efifb_show_boot_graphics is
currently called. This has the obvious disadvantage that we are
inserting a black screen for a moment between showing the BGRT logo
and Plymouth's boot splash, but it also gets rid of the BGRT logo on
shutdown and we see a blank screen instead. I not suggesting this as a
solution as it ruins the smooth boot process.

 2. Adding the following line to gdm3.service: 'ExecStop=/usr/bin/dd
if=/dev/zero of=/dev/fb0'. While this also avoids the problem while
keeping the boot process smooth, it is very fragile as we don't know
if fb0 is actually the right device we want to clean up and there is
really no way to do anything smart from the unit file, so if having
GDM cleanup the framebuffer on shutdown is an approach that makes
sense this will have to be done somewhere in GDM's code.

I believe the above are nothing really more than hacks / POCs, and
that either Plymouth should try to update the TTY frame buffer device
of the same card it is using to render the splash, potentially with
something better than a blank screen, like the last frame of the
animation similar to how --retain-splash works, or that there should
be a better Graphical Enviroment (X / Weston) -> Plymouth transition.

Also, it seems that the problem of showing the TTY after Plymouth
finishes should improve with the proposal of switching back to initrd
on shutdown.

Any ideas how to improve this situation are welcome, even temporary
ones like clearing the frame buffer in a sane way.

--
João Paulo Rechi Vita
http://about.me/jprvita


More information about the plymouth mailing list