Find a file
Gaël PORTAY e733f2b41d main: Retain splash on on_show_splash() and on_hide_splash()
The function ply_device_manager_activate_keyboard() asserts for positive
file-descriptors.

However, the daemon aborts after the splash screen is shown again after
being hidden; the virtual terminal file-descriptor is -1 (i.e. plymouth
show-splash; plymouth hide-splash; plymouth-show-spash).

The three helpers on_show_splash(), on_hide_splash() and on_quit() share
the same function dump_details_and_quit_splash().

This function calls on_hide() and on_quit(); the later deallocates and
closes the virtual terminal if the flag should_retain_splash is not set.
This is always the case on both on_show_splash() and on_hide_splash().
Only on_quit() has the ability to set that flag. Therefore, the virtual
terminal is always deallocated and closed on on_hide_splash (), and in a
some condition on on_show_splash().

The virtual terminal is allocated by ply_device_manager_new() in the
function main() and it is deallocated in the function quit_program()
(i.e. at the begining and at the end of the daemon). The function
quit_program() is called either by on_quit() or by on_boot_splash_idle()
(on quit only, not on deactivate). The two helpers on_show_splash() and
on_hide_splash() *MUST NOT* dealocates and closes the virtual terminal.

This sets the flag should_retain_splash in both helpers on_show_splash()
and on_hide_splash() to prevent them from deallocation the virtual
terminal.

Fixes:

	01:24:16.983 ply-event-loop.c:732:ply_event_loop_watch_fd                  : fd: 9
	01:24:16.994 ply-boot-server.c:393:print_connection_process_identity       : connection is from pid 8474 (plymouth show-splash) with parent pid 2137 (-ash)
	01:24:16.994 ply-boot-server.c:492:ply_boot_connection_on_request          : got show splash request
	01:24:16.994 main.c:832:plymouth_should_ignore_show_splash_calls           : checking if plymouth should be running
	01:24:16.994 main.c:933:on_show_splash                                     : at least one display already available, so loading splash
	01:24:16.994 main.c:864:plymouth_should_show_default_splash                : checking if plymouth should show default splash
	01:24:16.994 main.c:892:plymouth_should_show_default_splash                : using default splash because kernel command line has option "splash"
	01:24:16.994 main.c:445:show_default_splash                                : Showing splash screen
	01:24:16.994 main.c:459:show_default_splash                                : Trying distribution default splash
	01:24:16.994 main.c:1692:load_theme                                        : Loading boot splash theme '/usr/share/plymouth/themes/spinner/spinner.plymouth'
	01:24:16.995 ply-key-file.c:175:ply_key_file_load_group                    : trying to load group Plymouth Theme
	01:24:16.995 ply-key-file.c:175:ply_key_file_load_group                    : trying to load group two-step
	01:24:16.995 ply-key-file.c:175:ply_key_file_load_group                    : trying to load group boot-up
	01:24:16.995 ply-key-file.c:175:ply_key_file_load_group                    : trying to load group shutdown
	01:24:16.995 ply-key-file.c:175:ply_key_file_load_group                    : trying to load group reboot
	01:24:16.995 ply-key-file.c:175:ply_key_file_load_group                    : trying to load group updates
	01:24:16.995 ply-key-file.c:175:ply_key_file_load_group                    : trying to load group system-upgrade
	01:24:16.996 ply-key-file.c:175:ply_key_file_load_group                    : trying to load group firmware-upgrade
	01:24:16.996 ply-key-file.c:262:ply_key_file_load_groups                   : key file has no more groups
	01:24:16.996 plugin.c:1030:create_plugin                                   : Using '/usr/share/plymouth/themes/spinner' as working directory
	01:24:16.996 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'ProgressBarHorizontalAlignment'
	01:24:16.996 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'ProgressBarVerticalAlignment'
	01:24:16.996 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'ProgressBarWidth'
	01:24:16.996 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'ProgressBarHeight'
	01:24:16.996 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'SuppressMessages'
	01:24:16.997 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'ProgressBarShowPercentComplete'
	01:24:16.997 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'UseProgressBar'
	01:24:16.997 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'UseFirmwareBackground'
	01:24:16.997 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'Title'
	01:24:16.997 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'SubTitle'
	01:24:16.997 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'SuppressMessages'
	01:24:16.997 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'ProgressBarShowPercentComplete'
	01:24:16.997 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'UseProgressBar'
	01:24:16.997 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'UseFirmwareBackground'
	01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'Title'
	01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'SubTitle'
	01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'SuppressMessages'
	01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'ProgressBarShowPercentComplete'
	01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'UseProgressBar'
	01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'UseFirmwareBackground'
	01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'Title'
	01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'SubTitle'
	01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'UseFirmwareBackground'
	01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'UseFirmwareBackground'
	01:24:17.331 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'UseFirmwareBackground'
	01:24:17.332 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'DialogClearsFirmwareBackground'
	01:24:17.332 ply-key-file.c:359:ply_key_file_get_raw_value                 : key file does not have entry for key 'ProgressFunction'
	01:24:17.332 main.c:1708:load_theme                                        : attaching plugin to event loop
	01:24:17.332 main.c:1711:load_theme                                        : attaching progress to plugin
	01:24:17.332 ply-boot-splash.c:138:ply_boot_splash_add_pixel_display       : adding 1920x1080 pixel display
	01:24:17.332 plugin.c:1563:add_pixel_display                               : adding pixel display to plugin
	01:24:17.332 ply-device-manager.c:1028:ply_device_manager_activate_renderer: activating renderers
	01:24:17.332 plugin.c:918:activate                                         : taking master and scanning out
	01:24:17.332 ply-terminal.c:242:ply_terminal_unlock                        : couldn't unlock terminal settings: Bad file descriptor
	01:24:17.332 plugin.c:693:ply_renderer_head_set_scan_out_buffer            : Setting scan out buffer of 1920x1080 head to our buffer
	01:24:17.333 plugin.c:1693:flush_head                                      : Needed to reset scan out buffer on 1920x1080 renderer head
	01:24:17.334 ply-boot-splash.c:486:ply_boot_splash_show                    : showing splash screen
	01:24:17.334 plugin.c:1621:show_splash_screen                              : loading lock image
	01:24:17.335 plugin.c:1626:show_splash_screen                              : loading box image
	01:24:17.335 plugin.c:1635:show_splash_screen                              : loading corner image
	01:24:17.335 plugin.c:1644:show_splash_screen                              : loading header image
	01:24:17.335 plugin.c:1653:show_splash_screen                              : loading background tile image
	01:24:17.335 plugin.c:1681:show_splash_screen                              : loading watermark image
	01:24:17.335 plugin.c:615:view_load                                        : loading entry
	01:24:17.340 ply-keymap-icon.c:158:ply_keymap_icon_load                    : loading '/usr/share/plymouth/themes/spinner/keyboard.png': success
	01:24:17.495 ply-keymap-icon.c:165:ply_keymap_icon_load                    : loading '/usr/share/plymouth/themes/spinner/keymap-render.png': success
	01:24:17.496 plugin.c:625:view_load                                        : loading progress animation
	01:24:17.497 ply-progress-animation.c:373:ply_progress_animation_add_frames: could not find any progress animation frames
	01:24:17.497 plugin.c:627:view_load                                        : optional progress animation wouldn't load
	01:24:17.498 plugin.c:636:view_load                                        : loading throbber
	01:24:17.531 plugin.c:1697:show_splash_screen                              : starting boot animations
	01:24:17.531 plugin.c:1336:start_progress_animation                        : starting animation
	01:24:17.587 ply-terminal.c:242:ply_terminal_unlock                        : couldn't unlock terminal settings: Bad file descriptor
	01:24:17.599 ply-terminal.c:242:ply_terminal_unlock                        : couldn't unlock terminal settings: Bad file descriptor
	01:24:17.599 ply-device-manager.c:1061:ply_device_manager_activate_keyboard: activating keyboards
	Assertion failed: fd >= 0 (ply-event-loop.c: ply_event_loop_watch_fd: 732)
	Aborted

Signed-off-by: Gaël PORTAY <gael.portay@collabora.com>
2021-03-27 17:58:23 +01:00
docs docs: fix man page cross-reference 2020-05-30 13:51:47 +02:00
images ship bizcom unconditionally 2008-06-22 00:49:24 -04:00
po Added translation using Weblate (Sinhala) 2021-03-23 10:41:42 +01:00
scripts scripts: Remove new-object.sh 2021-03-06 10:40:36 +01:00
src main: Retain splash on on_show_splash() and on_hide_splash() 2021-03-27 17:58:23 +01:00
systemd-units systemd: switch to KillMode=mixed 2021-02-22 12:45:11 +00:00
themes autogoo: use /proc/self/fd/0 instead of /dev/stdin 2020-07-09 09:34:36 -04:00
.gitignore gitignore: Add translation related generated files to .gitignore 2019-10-15 11:33:55 +02:00
.gitlab-ci.yml Apply suggestion to .gitlab-ci.yml 2020-07-08 19:20:46 +00:00
acinclude.m4 [configure] Add AS_AC_EXPAND for configured dirs 2009-08-07 16:32:32 -04:00
AUTHORS Add Peter to AUTHORS 2008-06-10 21:59:10 -04:00
autogen.sh build-goo: get rid of warnings related to non-GNU systems 2013-12-11 13:32:54 -05:00
ChangeLog Put in ChangeLog request to not use ChangeLog 2008-05-20 15:15:03 -04:00
configure.ac The use of AM_GNU_GETTEXT_VERSION in configure.ac instructs autopoint to 2021-03-09 12:12:23 +00:00
COPYING initial import 2007-05-08 17:48:00 -04:00
INSTALL build-goo: Remove vestigial remnants of old GDM integration code. 2020-03-07 00:36:54 +08:00
Makefile.am po: drop intltool usage 2020-07-08 15:12:54 -04:00
NEWS initial import 2007-05-08 17:48:00 -04:00
README README: add link to Code of Conduct 2018-08-06 14:58:18 -04:00
TODO Add hack to make maintenance mode probably work when 2008-06-30 17:55:15 -04:00

plymouth - graphical boot animation and logger

Plymouth is an application that runs very early in the boot process
(even before the root filesystem is mounted!) that provides a graphical
boot animation while the boot process happens in the background.

It is designed to work on systems with DRM modesetting drivers. The idea
is that early on in the boot process the native mode for the computer is
set, plymouth uses that mode, and that mode stays throughout the entire
boot process up to and after X starts. Ideally, the goal is to get rid
of all flicker during startup.

For systems that don't have DRM mode settings drivers, plymouth falls
back to text mode (it can also use a legacy /dev/fb interface).

In either text or graphics mode, the boot messages are completely
occluded.  After the root file system is mounted read-write, the
messages are dumped to /var/log/boot.log. Also, the user can see the
messages at any time during boot up by hitting the escape key.

Plymouth isn't really designed to be built from source by end users. For
it to work correctly, it needs integration with the distribution.
Because it starts so early, it needs to be packed into the
distribution's initial ram disk, and the distribution needs to poke
plymouth to tell it how boot is progressing.

plymouth ships with two binaries: /sbin/plymouthd and /bin/plymouth

The first one, plymouthd, does all the heavy lifting. It logs the
session and shows the splash screen. The second one, /bin/plymouth, is
the control interface to plymouthd.

It supports things like plymouth show-splash, or plymouth
ask-for-password, which trigger the associated action in plymouthd.

Plymouth supports various "splash" themes which are analogous to
screensavers, but happen at boot time. There are several sample themes
shipped with plymouth, but most distributions that use plymouth ship
something customized for their distribution.

Plymouth isn't done yet. It's still under active development, but is
used in several popular distros already, including Fedora, Mandriva,
Ubuntu and others.  See the distributions page for more information.

As with other projects hosted on freedesktop.org, Plymouth follows its
Code of Conduct, based on the Contributor Covenant. Please conduct
yourself in a respectful and civilized manner when using the above
mailing lists, bug trackers, etc:

	https://www.freedesktop.org/wiki/CodeOfConduct