Blame SOURCES/0001-local-display-factory-pause-for-a-few-seconds-before.patch

7b586f
From f9662449f0f7dbb452ba11fe85a3c81b386f6dab Mon Sep 17 00:00:00 2001
7b586f
From: Ray Strode <rstrode@redhat.com>
7b586f
Date: Mon, 29 Oct 2018 06:57:59 -0400
7b586f
Subject: [PATCH] local-display-factory: pause for a few seconds before falling
7b586f
 back to X
7b586f
7b586f
logind currently gets confused if a session is started immediately as
7b586f
one is shutting down.
7b586f
7b586f
Workaround this problem by adding an artificial delay when falling
7b586f
back to X.
7b586f
7b586f
http://bugzilla.redhat.com/1643874
7b586f
---
7b586f
 daemon/gdm-local-display-factory.c | 5 +++++
7b586f
 1 file changed, 5 insertions(+)
7b586f
7b586f
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
7b586f
index 403921d32..ab7e12e91 100644
7b586f
--- a/daemon/gdm-local-display-factory.c
7b586f
+++ b/daemon/gdm-local-display-factory.c
7b586f
@@ -283,60 +283,65 @@ on_display_status_changed (GdmDisplay             *display,
7b586f
                 /* if this is a local display, do a full resync.  Only
7b586f
                  * seats without displays will get created anyway.  This
7b586f
                  * ensures we get a new login screen when the user logs out,
7b586f
                  * if there isn't one.
7b586f
                  */
7b586f
                 if (is_local) {
7b586f
                         /* reset num failures */
7b586f
                         factory->priv->num_failures = 0;
7b586f
 
7b586f
                         gdm_local_display_factory_sync_seats (factory);
7b586f
                 }
7b586f
                 break;
7b586f
         case GDM_DISPLAY_FAILED:
7b586f
                 /* leave the display number in factory->priv->used_display_numbers
7b586f
                    so that it doesn't get reused */
7b586f
                 gdm_display_store_remove (store, display);
7b586f
 
7b586f
                 /* Create a new equivalent display if it was static */
7b586f
                 if (is_local) {
7b586f
 
7b586f
                         factory->priv->num_failures++;
7b586f
 
7b586f
                         if (factory->priv->num_failures > MAX_DISPLAY_FAILURES) {
7b586f
                                 /* oh shit */
7b586f
                                 g_warning ("GdmLocalDisplayFactory: maximum number of X display failures reached: check X server log for errors");
7b586f
                         } else {
7b586f
 #ifdef ENABLE_WAYLAND_SUPPORT
7b586f
                                 if (g_strcmp0 (session_type, "wayland") == 0) {
7b586f
                                         g_free (session_type);
7b586f
                                         session_type = NULL;
7b586f
+
7b586f
+                                        /* workaround logind race for now
7b586f
+                                         * bug 1643874
7b586f
+                                         */
7b586f
+                                        sleep (2);
7b586f
                                 }
7b586f
 
7b586f
 #endif
7b586f
                                 create_display (factory, seat_id, session_type, is_initial);
7b586f
                         }
7b586f
                 }
7b586f
                 break;
7b586f
         case GDM_DISPLAY_UNMANAGED:
7b586f
                 break;
7b586f
         case GDM_DISPLAY_PREPARED:
7b586f
                 break;
7b586f
         case GDM_DISPLAY_MANAGED:
7b586f
                 break;
7b586f
         default:
7b586f
                 g_assert_not_reached ();
7b586f
                 break;
7b586f
         }
7b586f
 
7b586f
         g_free (seat_id);
7b586f
         g_free (session_type);
7b586f
 }
7b586f
 
7b586f
 static gboolean
7b586f
 lookup_by_seat_id (const char *id,
7b586f
                    GdmDisplay *display,
7b586f
                    gpointer    user_data)
7b586f
 {
7b586f
         const char *looking_for = user_data;
7b586f
         char *current;
7b586f
         gboolean res;
7b586f
-- 
7b586f
2.19.1
7b586f