From 0f97c73ef56df6d7cc5d582d9f984ba1e697c734 Mon Sep 17 00:00:00 2001 From: Felix Zhang Date: Mon, 23 Apr 2018 15:01:45 +0800 Subject: [PATCH] manager: always quit plymouth on a managed display, in a lapsed time When booting up gdm without monitor, the display is marked as managed but never gets a connected session client afterwards, causing all the depending systemd targets to hang waiting plymouth to quit. This commit kind of reverts commit 2cbd7ad, to always quit plymouth when a display is managed, but adding a timeout to get around the issue fixed by commit 2cbd7ad1. https://bugzilla.gnome.org/show_bug.cgi?id=795477 --- daemon/gdm-manager.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c index 7539acf1..24b90301 100644 --- a/daemon/gdm-manager.c +++ b/daemon/gdm-manager.c @@ -1673,6 +1673,12 @@ on_display_status_changed (GdmDisplay *display, } if (status == GDM_DISPLAY_MANAGED) { +#ifdef WITH_PLYMOUTH + if (quit_plymouth) { + g_timeout_add_seconds (20, (GSourceFunc) plymouth_quit_with_transition, NULL); + manager->priv->plymouth_is_running = FALSE; + } +#endif greeter_display_started (manager, display); } break; @@ -1954,15 +1960,6 @@ on_user_session_started (GdmSession *session, { g_debug ("GdmManager: session started %d", pid); add_session_record (manager, session, pid, SESSION_RECORD_LOGIN); - -#ifdef WITH_PLYMOUTH - if (g_strcmp0 (service_name, "gdm-autologin") == 0) { - if (manager->priv->plymouth_is_running) { - g_timeout_add_seconds (20, (GSourceFunc) plymouth_quit_with_transition, NULL); - manager->priv->plymouth_is_running = FALSE; - } - } -#endif } static void @@ -2116,13 +2113,6 @@ on_session_client_connected (GdmSession *session, return; } -#ifdef WITH_PLYMOUTH - if (manager->priv->plymouth_is_running) { - plymouth_quit_with_transition (); - manager->priv->plymouth_is_running = FALSE; - } -#endif - g_object_get (G_OBJECT (display), "allow-timed-login", &allow_timed_login, NULL); if (!allow_timed_login) { -- 2.13.6