From 6451e2dc99735f6f43befdba0955ea7b4cdbe95320d585fe88ff75827382588d Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Tue, 24 Apr 2018 06:59:37 +0000 Subject: [PATCH 1/2] Accepting request 599911 from home:zhangxiaofei:branches:GNOME:Factory - Add gdm-quit-plymouth-on-headless.patch: Stop boot splash whenever a display is managed, to avoid systems without monitor from hanging (boo#1089673 bgo#795477). OBS-URL: https://build.opensuse.org/request/show/599911 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gdm?expand=0&rev=396 --- gdm-quit-plymouth-on-headless.patch | 70 +++++++++++++++++++++++++++++ gdm.changes | 7 +++ gdm.spec | 3 ++ 3 files changed, 80 insertions(+) create mode 100644 gdm-quit-plymouth-on-headless.patch diff --git a/gdm-quit-plymouth-on-headless.patch b/gdm-quit-plymouth-on-headless.patch new file mode 100644 index 0000000..fa0a1a2 --- /dev/null +++ b/gdm-quit-plymouth-on-headless.patch @@ -0,0 +1,70 @@ +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 + diff --git a/gdm.changes b/gdm.changes index 73c9ef4..dea69f4 100644 --- a/gdm.changes +++ b/gdm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Apr 23 07:59:36 UTC 2018 - fezhang@suse.com + +- Add gdm-quit-plymouth-on-headless.patch: Stop boot splash + whenever a display is managed, to avoid systems without monitor + from hanging (boo#1089673 bgo#795477). + ------------------------------------------------------------------- Fri Apr 13 10:07:57 UTC 2018 - bjorn.lie@gmail.com diff --git a/gdm.spec b/gdm.spec index 32748fd..253ee49 100644 --- a/gdm.spec +++ b/gdm.spec @@ -58,6 +58,8 @@ Patch41: gdm-plymouth-vt1.patch Patch42: gdm-fails-to-restart-gnome-shell.patch # PATCH-FIX-UPSTREAM gdm-add-runtime-option-to-disable-starting-X-server-as-u.patch bnc#1075805 bgo#793255 msrb@suse.com -- Add runtime option to start X under root instead of regular user. Necessary if no DRI drivers are present. Patch43: gdm-add-runtime-option-to-disable-starting-X-server-as-u.patch +# PATCH-FIX-UPSTREAM gdm-quit-plymouth-on-headless.patch boo#1089673 bgo#795477 fezhang@suse.com -- Quit plymouth whenever a display is managed, to avoid system without monitor hanging. +Patch44: gdm-quit-plymouth-on-headless.patch ### NOTE: Keep please SLE-only patches at bottom (starting on 1000). # PATCH-FIX-SLE gdm-disable-gnome-initial-setup.patch bnc#1067976 qzhao@suse.com -- Disable gnome-initial-setup runs before gdm, g-i-s will only serve for CJK people to choose the input-method after login. Patch1002: gdm-disable-gnome-initial-setup.patch @@ -201,6 +203,7 @@ cp %{SOURCE8} . %patch41 -p1 %patch42 -p1 %patch43 -p1 +%patch44 -p1 # SLE-only patches start at 1000 %if !0%{?is_opensuse} %patch1002 -p1 From a454a9fd67a332bdbc22a5b6c106ff672d0b6c621fe1a0c9d38fe7da200040c3 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Tue, 24 Apr 2018 11:05:20 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gdm?expand=0&rev=397 --- gdm.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gdm.spec b/gdm.spec index 253ee49..e2f3887 100644 --- a/gdm.spec +++ b/gdm.spec @@ -19,7 +19,6 @@ %define systemdsystemunitdir %(pkg-config --variable=systemdsystemunitdir systemd) # FIXME: need to check what should be done to enable this (at least adapt the pam files). See bnc#699999 %define enable_split_authentication 0 - Name: gdm Version: 3.28.1 Release: 0 @@ -39,7 +38,7 @@ Source6: gdmflexiserver-wrapper Source7: X11-displaymanager-gdm # GDM does not boostrap using gnome-autogen.sh, but has it's own bootstrap script Source8: autogen.sh -# PATCH-FIX-UPSTREAM gdm-disable-wayland-on-unsupported-chipsets.patch bgo#794106 bsc#1083609 boo#1088539 yfjiang@suse.com -- Disable Wayland on unsupported chipsets +# PATCH-FIX-UPSTREAM gdm-disable-wayland-on-unsupported-chipsets.patch bgo#789081 bgo#794106 boo#1059356 boo#1083609 boo#1088539 fezhang@suse.com -- Disable Wayland on unsupported chipsets Patch1: gdm-disable-wayland-on-unsupported-chipsets.patch # WARNING: do not remove/significantly change patch3 without updating the relevant patch in accountsservice too # PATCH-FIX-OPENSUSE gdm-sysconfig-settings.patch bnc432360 bsc#919723 hpj@novell.com -- Read autologin options from /etc/sysconfig/displaymanager; note that accountsservice has a similar patch (accountsservice-sysconfig.patch)