Plymouth flicker-free shutdown side-effect

Hans de Goede hdegoede at redhat.com
Mon Jan 21 10:25:53 UTC 2019


Hi,

On 21-01-19 10:50, Daniel Drake wrote:
> On Mon, Jan 21, 2019 at 5:33 PM Hans de Goede <hdegoede at redhat.com> wrote:
>> For your use-case we really only need to patch the xorg modesetting
>> driver (as Daniel points out in his reply) and plymouth to use the new
>> API, then the 2 flickers on shutdown should go away.
> 
> Is it as straightforward as you make it sound there? Would the
> modesetting driver always use this ioctl on X server shutdown? (I
> guess it doesn't have knowledge of if plymouth is/isn't going to step
> in momentarily after)
> I am wondering if there would then be cases where X still looks like
> it's running even though it has exited,

Hmm, that is a good question.

If this new ioctl is used then it will indeed look like X is still
running but not responding (cursor won't move, etc.).

Until something else installs a new framebuffer. On exit the xserver
puts the VT back in textmode, which will make fbcon immediately install
its own framebuffer, fixing this problem.

But if the system is using deferred fbcon takeover and no console
messages have been shown (and the user has not switched to a VC
which is running getty using ctrl + alt + F#), then fbcon won't
be bound to the VTs so this will not happen and instead the last
X framebuffer will stick around till plymouth kicks in, which I
believe is what you want in your case.

But you're right that if plymouth never starts and things hang
after the xserver has made the new ioctl to keep the fb around,
then it will look like the xserver is hangingen on logout, while
it might be another problem.

> or if there would be
> security/privacy concerns about the contents of the last X framebuffer
> being held around.

That too is a good question. Arguably the modesetting driver's CloseScreen
method should only make this ioctl on a clean logout, which the
xserver does not know.

So I guess simply filling fb0 with the endless logo (in the right
size and format) at some point during boot is not such a bad idea.

With mutter I guess we now we are doing a clean exit (and we
could first render a frame showing only the users background)
but with the xserver there is no way to detect a clean exit of
the user session.

Regards,

Hans



More information about the plymouth mailing list