summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaël PORTAY <gael.portay@collabora.com>2020-12-18 06:24:09 -0500
committerHans de Goede <hdegoede@redhat.com>2021-03-27 17:58:23 +0100
commite733f2b41dc5dcd815a654e6cef2fc1eb367069b (patch)
treec37f7608b2f74ea41c1c330e041848af63c5c3dd
parent8a3c9bbf24ce61c72364ae6e6394e5efe6834758 (diff)
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>
-rw-r--r--src/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index ab614ca1..0ad34fc4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -919,6 +919,7 @@ on_show_splash (state_t *state)
if (plymouth_should_ignore_show_splash_calls (state)) {
ply_trace ("show splash called while ignoring show splash calls");
+ state->should_retain_splash = true;
dump_details_and_quit_splash (state);
return;
}
@@ -1173,6 +1174,7 @@ on_hide_splash (state_t *state)
return;
ply_trace ("hiding boot splash");
+ state->should_retain_splash = true;
dump_details_and_quit_splash (state);
}