In the event that plymouthd is not responding the plymouth client will
wait forever when sending a ping to the daemon.
This commit introduces a timeout of 30 seconds to better cope with a
hung plymouthd process.
(Some small changes to original patch by Ray Strode)
https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/130
At the moment if a client disconnects while the daemon is completely
an asynchronous request, the daemon crashes trying to access a freed
connection object.
This commit changes the boot server code to keep the connection object
alive after the client disconnects, if there's pending work to do.
https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/125
Before this commit we would skip preferred-mode selection if a video=
kernel cmdline is argument, instead relying on the kernel to have activated
all the outputs and then we would inherit those modes.
But this relies on fbcon having initialized the outputs, which it does not
do when deferred-fbcon-takeover is used. Deferred-fbcon-takeover is
necessary for flickerfree boot, so this is now the default in many distros.
Instead of relying on the kernel having setup everything for us, honor
the video= mode selection by checking for modes with a DRM_MODE_TYPE_USERDEF
flag before checking for modes with a DRM_MODE_TYPE_PREFERRED flag.
Note that the DRM_MODE_TYPE_USERDEF flag is only ever set based on a
video= argument. So on systems without a video= argument on the kernel
cmdline nothing changes.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
setlocale was already called on filesystem mounting but that's not enough
to cover all the cases. The call needs to be conditional because doing it
at a time where the locales are not available (in the initrd) would
result in translations to not be working.
Because on some systems (like Ubuntu with its alternatives) the "Theme="
line will be missing from plymouthd.defaults. And bailing out early was
causing other settings like DeviceTimeout to never be loaded, which would
then cause the graphics renderers to fail.
At the moment switching modes affects two aspects of how plymouth
runs.
1) What log file is opened (i.e., boot.log or no log file at all)
2) What type of splash gets shown (the details of which are relegated
to the individual splash plugins)
The mode change handler has a check in place to avoid changing the
type of splash getting shown in the event no splash is supposed to
be shown yet. This check just makes the function return without
doing anything.
Unfortunately, the check is placed at the top of the function, so
it runs before the log file is changed.
This commit moves the check lower down, so the log file gets properly
updated when the mode is changed.
plymouthd can be run in various modes, for, e.g., boot up,
shutdown, and software upgrades.
The mode plymouthd is using can be changed at runtime.
The "boot" mode keeps a log of the console messages that
happen during boot up. At the moment, when changing from
the "boot" mode to any other mode, the log file is kept
open.
That open file can cause problems during shutdown.
This commit makes sure the log file is properly closed when
the mode is changed from boot to another mode.
https://gitlab.freedesktop.org/plymouth/plymouth/issues/88