From 0e59dde83afa2521bc548c587eaccbce1550bcfd Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sat, 27 Mar 2021 16:34:28 +0100 Subject: [PATCH] details: Clear newly added text-display before replaying log messages When switching between the "text" splash and the "details" splash the "text" splash's hide function clears the console/terminal before the "details" splash replays the log messages. So on each switch the user sees all the log messages once. But when switching between a graphical/pixel splash and details, the console/terminal is not touched by the graphical splash's hide function; and the details splash's hide function deliberately does not clear the terminal on hide, so that when booting in detailed mode, the log messages stay on the console when plymouth exits. This means that when switching graphical-splash -> details -> graphical-splash -> details, the second time the details splash gets shown, the previous set of replayed log messages is still on the terminal and all messages are now shown twice. (and toggling back and forth a third time makes them all show 3 times, etc). Fix this by clearing the terminal on show, before replaying the log messages. Signed-off-by: Hans de Goede --- src/plugins/splash/details/plugin.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/splash/details/plugin.c b/src/plugins/splash/details/plugin.c index f534450b..254f682b 100644 --- a/src/plugins/splash/details/plugin.c +++ b/src/plugins/splash/details/plugin.c @@ -237,8 +237,10 @@ add_text_display (ply_boot_splash_plugin_t *plugin, view = view_new (plugin, display); terminal = ply_text_display_get_terminal (view->display); - if (ply_terminal_open (terminal)) + if (ply_terminal_open (terminal)) { + ply_text_display_clear_screen (view->display); ply_terminal_activate_vt (terminal); + } ply_list_append_data (plugin->views, view); -- 2.47.3