[PATCH] Update splash_delay based on previous boot's time
@jwrdegoede
Submitted by Hans de Goede Assigned to Ray Strode @halfline
Link to original bug (#107264)
Description
Created attachment 140668 [PATCH 1/2] progress: Save total boot/shutdown/update time
Hi,
Attached are 2 patches which make plymouth's splash_delay / ShowDelay handling a bit smarter.
Currently we delay showing the splash for 5 seconds (by default), this means that if the boot takes 5.5 seconds we show the splash for 0.5 seconds which looks quite ugly.
To do something about this we need to know how long the boot is going to take, so we can decide to show the splash earlier for systems taking longer then splash_delay to boot.
The first commit adds storing the total-time to the progress cache (which sofar only contained percentages), so that we can use this in a follow-up commit to be smarter wrt the splash_delay.
The second commit gets the total-time of the previous boot from the progress cache and then if based on that it looks like we will show the splash anyways changes splash_delay to 0 so that the splash gets shown immediately.
In case it looks like the splash will not be shown, the delay gets increased by 2 seconds, so that if the boot takes slightly longer then the splash_delay we do not do the show the splash for 0.5 seconds thing, if however the boot takes significantly longer this time we will still show the splash after splash_delay + 2 seconds.
Regards,
Hans
Patch 140668, "[PATCH 1/2] progress: Save total boot/shutdown/update time":
0001-progress-Save-total-boot-shutdown-update-time.patch