import gdm-40.0-13.el8

This commit is contained in:
CentOS Sources 2021-09-03 04:19:30 +00:00 committed by Andrew Lukoshko
parent ce2a9b6701
commit 7f1a4ea61e
9 changed files with 374 additions and 171 deletions

View File

@ -1,4 +1,4 @@
From afdaf0c31c7fb44e05a271a9047a0993ff1f4ef2 Mon Sep 17 00:00:00 2001
From e01c0894669f5fe3d1a1c4148b7507e61b95d035 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Mon, 11 Feb 2019 18:14:07 -0500
Subject: [PATCH] data: disable wayland on certain hardware
@ -9,14 +9,14 @@ setups, so disable it in those cases.
Also disable it on server chips for performance reasons.
---
data/61-gdm.rules.in | 36 ++++++++++++++++++++++++++++++++----
1 file changed, 32 insertions(+), 4 deletions(-)
data/61-gdm.rules.in | 39 +++++++++++++++++++++++++++++++++++----
1 file changed, 35 insertions(+), 4 deletions(-)
diff --git a/data/61-gdm.rules.in b/data/61-gdm.rules.in
index b1da191f8..d863a4a4d 100644
index b1da191f..d599a146 100644
--- a/data/61-gdm.rules.in
+++ b/data/61-gdm.rules.in
@@ -1,6 +1,34 @@
@@ -1,6 +1,37 @@
# disable Wayland on Hi1710 chipsets
-ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", RUN+="@libexecdir@/gdm-runtime-config set daemon WaylandEnable false"
-# disable Wayland when using the proprietary nvidia driver
@ -44,6 +44,9 @@ index b1da191f8..d863a4a4d 100644
+SUBSYSTEM=="drm", KERNEL=="card[1-9]*", ENV{GDM_HAS_NVIDIA_DRIVER}=="1", RUN+="@libexecdir@/gdm-disable-wayland"
+ACTION=="add", SUBSYSTEM=="module", KERNEL=="nvidia_drm", ATTR{parameters/modeset}=="N", RUN+="/usr/libexec/gdm-disable-wayland"
+
+# disable Wayland on HyperV guests
+DRIVER=="hyperv_fb", RUN+="@libexecdir@/gdm-disable-wayland"
+
+# disable Wayland on passthrough graphics setups for now (assumes passthrough if
+# there is more than one card, and one of the cards is virt: cirrus, bochs, qxl)
+ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8", ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", ENV{GDM_HAS_VIRTUAL_GPU}="1"
@ -56,5 +59,5 @@ index b1da191f8..d863a4a4d 100644
-IMPORT{cmdline}="nomodeset", RUN+="@libexecdir@/gdm-runtime-config set daemon WaylandEnable false"
+IMPORT{cmdline}="nomodeset", RUN+="@libexecdir@/gdm-disable-wayland"
--
2.31.1
2.27.0

View File

@ -1,4 +1,4 @@
From 8c3a382416729296e1d9ba24af6832c354bd6fc4 Mon Sep 17 00:00:00 2001
From 4ef82bf0fe40dd3952997a77539a57e8cb8b99ef Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Fri, 16 Jul 2021 12:34:57 -0400
Subject: [PATCH 1/2] local-display-factory: Provide more flexibility for
@ -22,17 +22,17 @@ PreferredDisplayServer can be set to "wayland", "xorg", "legacy-xorg" or
fall back to "wayland".
---
common/gdm-settings-keys.h | 2 +
daemon/gdm-display.c | 36 +++++
daemon/gdm-launch-environment.c | 9 ++
daemon/gdm-local-display-factory.c | 220 ++++++++++++++++++++++++-----
daemon/gdm-display.c | 36 ++++
daemon/gdm-launch-environment.c | 9 +
daemon/gdm-local-display-factory.c | 267 ++++++++++++++++++++++++-----
daemon/gdm-manager.c | 20 +--
daemon/gdm-session.c | 143 +++++++++++--------
daemon/gdm-session.c | 169 ++++++++++--------
data/gdm.schemas.in | 10 ++
libgdm/gdm-sessions.c | 72 +++++++---
8 files changed, 378 insertions(+), 134 deletions(-)
libgdm/gdm-sessions.c | 72 +++++---
8 files changed, 437 insertions(+), 148 deletions(-)
diff --git a/common/gdm-settings-keys.h b/common/gdm-settings-keys.h
index f0059b5cf..87685d3cd 100644
index f0059b5c..87685d3c 100644
--- a/common/gdm-settings-keys.h
+++ b/common/gdm-settings-keys.h
@@ -6,59 +6,61 @@
@ -98,7 +98,7 @@ index f0059b5cf..87685d3cd 100644
#endif /* _GDM_SETTINGS_KEYS_H */
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
index 7c954ad24..874f9e6ba 100644
index 7c954ad2..bd96dd03 100644
--- a/daemon/gdm-display.c
+++ b/daemon/gdm-display.c
@@ -66,83 +66,86 @@ typedef struct _GdmDisplayPrivate
@ -583,7 +583,7 @@ index 7c954ad24..874f9e6ba 100644
self);
g_signal_handlers_disconnect_by_func (priv->launch_environment,
diff --git a/daemon/gdm-launch-environment.c b/daemon/gdm-launch-environment.c
index feccf057f..5044290cd 100644
index feccf057..5044290c 100644
--- a/daemon/gdm-launch-environment.c
+++ b/daemon/gdm-launch-environment.c
@@ -117,60 +117,61 @@ static GHashTable *
@ -718,10 +718,10 @@ index feccf057f..5044290cd 100644
g_signal_emit (G_OBJECT (launch_environment), signals [OPENED], 0);
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
index 8a4ef06cd..a8ca1d598 100644
index 8a4ef06c..eba38671 100644
--- a/daemon/gdm-local-display-factory.c
+++ b/daemon/gdm-local-display-factory.c
@@ -156,126 +156,221 @@ take_next_display_number (GdmLocalDisplayFactory *factory)
@@ -156,126 +156,287 @@ take_next_display_number (GdmLocalDisplayFactory *factory)
g_debug ("GdmLocalDisplayFactory: Found the following X displays:");
for (l = list; l != NULL; l = l->next) {
@ -793,46 +793,107 @@ index 8a4ef06cd..a8ca1d598 100644
+ return g_strdup ("none");
+}
+
+static const char *
+gdm_local_display_factory_get_session_type (GdmLocalDisplayFactory *factory,
+ gboolean should_fall_back)
+{
+ const char *session_types[3] = { NULL };
+ gsize i, session_type_index = 0, number_of_session_types = 0;
+ g_autofree gchar *preferred_display_server = NULL;
+ preferred_display_server = get_preferred_display_server (factory);
+ if (g_strcmp0 (preferred_display_server, "wayland") != 0 &&
+ g_strcmp0 (preferred_display_server, "xorg") != 0)
+ return NULL;
+ for (i = 0; i < G_N_ELEMENTS (session_types) - 1; i++) {
+struct GdmDisplayServerConfiguration {
+ const char *display_server;
+ const char *key;
+ const char *binary;
+ const char *session_type;
+} display_server_configuration[] = {
+#ifdef ENABLE_WAYLAND_SUPPORT
+ if (number_of_session_types > 0 ||
+ g_strcmp0 (preferred_display_server, "wayland") == 0) {
+ gboolean wayland_enabled = FALSE;
+ if (gdm_settings_direct_get_boolean (GDM_KEY_WAYLAND_ENABLE, &wayland_enabled)) {
+ if (wayland_enabled && g_file_test ("/usr/bin/Xwayland", G_FILE_TEST_IS_EXECUTABLE)) {
+ session_types[i] = "wayland";
+ number_of_session_types++;
+ continue;
+ }
+ }
+ }
+ { "wayland", GDM_KEY_WAYLAND_ENABLE, "/usr/bin/Xwayland", "wayland" },
+#endif
+ if (number_of_session_types > 0 ||
+ g_strcmp0 (preferred_display_server, "xorg") == 0) {
+ gboolean xorg_enabled = FALSE;
+ if (gdm_settings_direct_get_boolean (GDM_KEY_XORG_ENABLE, &xorg_enabled)) {
+ if (xorg_enabled && g_file_test ("/usr/bin/Xorg", G_FILE_TEST_IS_EXECUTABLE)) {
+ session_types[i] = "x11";
+ number_of_session_types++;
+ continue;
+ }
+ }
+ }
+ { "xorg", GDM_KEY_XORG_ENABLE, "/usr/bin/Xorg", "x11" },
+ { NULL, NULL, NULL },
+};
+
+static gboolean
+display_server_enabled (GdmLocalDisplayFactory *factory,
+ const char *display_server)
+{
+ size_t i;
+
+ for (i = 0; display_server_configuration[i].display_server != NULL; i++) {
+ const char *key = display_server_configuration[i].key;
+ const char *binary = display_server_configuration[i].binary;
+ gboolean enabled = FALSE;
+
+ if (!g_str_equal (display_server_configuration[i].display_server,
+ display_server))
+ continue;
+
+ if (!gdm_settings_direct_get_boolean (key, &enabled) || !enabled)
+ return FALSE;
+
+ if (!g_file_test (binary, G_FILE_TEST_IS_EXECUTABLE))
+ return FALSE;
+
+ return TRUE;
+ }
+ if (should_fall_back)
+ session_type_index++;
+ return session_types[session_type_index];
+
+ return FALSE;
+}
+
+static const char *
+get_session_type_for_display_server (GdmLocalDisplayFactory *factory,
+ const char *display_server)
+{
+ size_t i;
+
+ for (i = 0; display_server_configuration[i].display_server != NULL; i++) {
+ if (!g_str_equal (display_server_configuration[i].display_server,
+ display_server))
+ continue;
+
+ return display_server_configuration[i].session_type;
+ }
+
+ return NULL;
+}
+
+static char **
+gdm_local_display_factory_get_session_types (GdmLocalDisplayFactory *factory,
+ gboolean should_fall_back)
+{
+ g_autofree gchar *preferred_display_server = NULL;
+ const char *fallback_display_server = NULL;
+ gboolean wayland_preferred = FALSE;
+ gboolean xorg_preferred = FALSE;
+ g_autoptr (GPtrArray) session_types_array = NULL;
+ char **session_types;
+
+ session_types_array = g_ptr_array_new ();
+
+ preferred_display_server = get_preferred_display_server (factory);
+
+ g_debug ("GdmLocalDisplayFactory: Getting session type (prefers %s, falling back: %s)",
+ preferred_display_server, should_fall_back? "yes" : "no");
+
+ wayland_preferred = g_str_equal (preferred_display_server, "wayland");
+ xorg_preferred = g_str_equal (preferred_display_server, "xorg");
+
+ if (wayland_preferred)
+ fallback_display_server = "xorg";
+ else if (xorg_preferred)
+ fallback_display_server = "wayland";
+ else
+ return NULL;
+
+ if (!should_fall_back) {
+ if (display_server_enabled (factory, preferred_display_server))
+ g_ptr_array_add (session_types_array, (gpointer) get_session_type_for_display_server (factory, preferred_display_server));
+ }
+
+ if (display_server_enabled (factory, fallback_display_server))
+ g_ptr_array_add (session_types_array, (gpointer) get_session_type_for_display_server (factory, fallback_display_server));
+
+ if (session_types_array->len == 0)
+ return NULL;
+
+ g_ptr_array_add (session_types_array, NULL);
+
+ session_types = g_strdupv ((char **) session_types_array->pdata);
+
+ return session_types;
+}
+
static void
@ -903,9 +964,11 @@ index 8a4ef06cd..a8ca1d598 100644
+#ifdef ENABLE_USER_DISPLAY_SERVER
+ if (g_strcmp0 (preferred_display_server, "wayland") == 0 ||
+ g_strcmp0 (preferred_display_server, "xorg") == 0) {
+ session_type = gdm_local_display_factory_get_session_type (factory, FALSE);
+ g_auto(GStrv) session_types = NULL;
+
+ if (session_type == NULL) {
+ session_types = gdm_local_display_factory_get_session_types (factory, FALSE);
+
+ if (session_types == NULL) {
+ g_set_error_literal (error,
+ GDM_DISPLAY_ERROR,
+ GDM_DISPLAY_ERROR_GENERAL,
@ -915,7 +978,10 @@ index 8a4ef06cd..a8ca1d598 100644
- display = gdm_legacy_display_new (num);
+ display = gdm_local_display_new ();
+ g_object_set (G_OBJECT (display), "session-type", session_type, NULL);
+ g_object_set (G_OBJECT (display),
+ "session-type", session_types[0],
+ "supported-session-tyes", session_types,
+ NULL);
+ is_initial = TRUE;
}
#endif
@ -966,7 +1032,11 @@ index 8a4ef06cd..a8ca1d598 100644
static void
finish_display_on_seat_if_waiting (GdmDisplayStore *display_store,
GdmDisplay *display,
@@ -454,190 +549,239 @@ lookup_prepared_display_by_seat_id (const char *id,
@@ -450,194 +611,220 @@ lookup_prepared_display_by_seat_id (const char *id,
if (status != GDM_DISPLAY_PREPARED)
return FALSE;
return lookup_by_seat_id (id, display, user_data);
}
@ -993,7 +1063,9 @@ index 8a4ef06cd..a8ca1d598 100644
int ret;
gboolean seat_supports_graphics;
gboolean is_seat0;
const char *session_type = "wayland";
- const char *session_type = "wayland";
+ g_auto (GStrv) session_types = NULL;
+ const char *legacy_session_types[] = { "x11", NULL };
GdmDisplayStore *store;
GdmDisplay *display = NULL;
g_autofree char *login_session_id = NULL;
@ -1038,10 +1110,10 @@ index 8a4ef06cd..a8ca1d598 100644
- g_debug ("GdmLocalDisplayFactory: New displays on seat0 will use wayland");
- }
+ falling_back = factory->num_failures > 0;
+ session_type = gdm_local_display_factory_get_session_type (factory, falling_back);
+ session_types = gdm_local_display_factory_get_session_types (factory, falling_back);
+
+ g_debug ("GdmLocalDisplayFactory: New displays on seat0 will use %s%s",
+ session_type, falling_back? " fallback" : "");
+ session_types[0], falling_back? " fallback" : "");
} else {
is_seat0 = FALSE;
@ -1049,7 +1121,7 @@ index 8a4ef06cd..a8ca1d598 100644
/* Force legacy X11 for all auxiliary seats */
seat_supports_graphics = TRUE;
- session_type = NULL;
+ session_type = "x11";
+ session_types = g_strdupv ((char **) legacy_session_types);
}
/* For seat0, we have a fallback logic to still try starting it after
@ -1088,8 +1160,9 @@ index 8a4ef06cd..a8ca1d598 100644
g_debug ("GdmLocalDisplayFactory: This might indicate an issue where the framebuffer device is not tagged as master-of-seat in udev.");
seat_supports_graphics = TRUE;
- session_type = NULL;
+ session_type = "x11";
+ wayland_enabled = FALSE;
+ g_strfreev (session_types);
+ session_types = g_strdupv ((char **) legacy_session_types);
} else {
g_clear_handle_id (&factory->seat0_graphics_check_timeout_id, g_source_remove);
}
@ -1100,9 +1173,9 @@ index 8a4ef06cd..a8ca1d598 100644
- g_debug ("GdmLocalDisplayFactory: %s login display for seat %s requested",
- session_type? : "X11", seat_id);
+ if (session_type != NULL)
+ if (session_types != NULL)
+ g_debug ("GdmLocalDisplayFactory: %s login display for seat %s requested",
+ session_type, seat_id);
+ session_types[0], seat_id);
+ else if (g_strcmp0 (preferred_display_server, "legacy-xorg") == 0)
+ g_debug ("GdmLocalDisplayFactory: Legacy Xorg login display for seat %s requested",
+ seat_id);
@ -1144,53 +1217,29 @@ index 8a4ef06cd..a8ca1d598 100644
- if (is_seat0) {
- display = gdm_local_display_new ();
- if (session_type != NULL) {
- g_object_set (G_OBJECT (display), "session-type", session_type, NULL);
+ if (g_strcmp0 (preferred_display_server, "wayland") == 0 ||
+ g_strcmp0 (preferred_display_server, "xorg") == 0) {
+ if (is_seat0) {
+ g_autoptr (GPtrArray) supported_session_types = NULL;
+
+ if (session_type == NULL) {
+ g_warning ("GdmLocalDisplayFactory: Both Wayland and Xorg sessions are unavailable");
+ return;
+ }
+
+ supported_session_types = g_ptr_array_new ();
+
+ if (g_strcmp0 (preferred_display_server, "wayland") == 0) {
+ if (wayland_enabled)
+ g_ptr_array_add (supported_session_types, "wayland");
+ } else {
+ if (xorg_enabled)
+ g_ptr_array_add (supported_session_types, "x11");
+ }
+
+ if (!falling_back) {
+ if (g_strcmp0 (preferred_display_server, "wayland") == 0) {
+ if (xorg_enabled)
+ g_ptr_array_add (supported_session_types, "x11");
+ } else {
+ if (wayland_enabled)
+ g_ptr_array_add (supported_session_types, "wayland");
+ }
+ }
+
+ g_ptr_array_add (supported_session_types, NULL);
+
+ display = gdm_local_display_new ();
g_object_set (G_OBJECT (display), "session-type", session_type, NULL);
+ g_object_set (G_OBJECT (display), "supported-session-types", supported_session_types->pdata, NULL);
+ g_object_set (G_OBJECT (display),
+ "session-type", session_types[0],
+ "supported-session-types", session_types,
+ NULL);
}
}
#endif
if (display == NULL) {
guint32 num;
+ const char *supported_session_types[] = { "x11", NULL };
num = take_next_display_number (factory);
display = gdm_legacy_display_new (num);
+ g_object_set (G_OBJECT (display), "supported-session-types", supported_session_types, NULL);
+ g_object_set (G_OBJECT (display),
+ "session-type", legacy_session_types[0],
+ "supported-session-types", legacy_session_types,
+ NULL);
}
g_object_set (display, "seat-id", seat_id, NULL);
@ -1222,7 +1271,7 @@ index 8a4ef06cd..a8ca1d598 100644
static gboolean
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 9c10adff3..24219691c 100644
index 9c10adff..24219691 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -1306,74 +1306,75 @@ get_automatic_login_details (GdmManager *manager,
@ -1461,7 +1510,7 @@ index 9c10adff3..24219691c 100644
}
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index 5c5903a49..a53fb9804 100644
index 5c5903a4..7b0ade1e 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -105,100 +105,98 @@ struct _GdmSession
@ -1666,14 +1715,14 @@ index 5c5903a49..a53fb9804 100644
- }
+ for (j = 0; self->supported_session_types[j] != NULL; j++) {
+ const char *supported_type = self->supported_session_types[j];
+
- g_array_append_vals (search_array, x_search_dirs, G_N_ELEMENTS (x_search_dirs));
+ if (g_str_equal (supported_type, "x11")) {
+ for (i = 0; system_data_dirs[i]; i++) {
+ gchar *dir = g_build_filename (system_data_dirs[i], "xsessions", NULL);
+ g_array_append_val (search_array, dir);
+ }
- g_array_append_vals (search_array, x_search_dirs, G_N_ELEMENTS (x_search_dirs));
+
+ g_array_append_vals (search_array, x_search_dirs, G_N_ELEMENTS (x_search_dirs));
+ }
@ -1817,7 +1866,94 @@ index 5c5903a49..a53fb9804 100644
if (WIFEXITED (status)) {
g_debug ("GdmSession: Emitting 'session-exited' signal with exit code '%d'",
@@ -2197,68 +2203,72 @@ close_conversation (GdmSessionConversation *conversation)
@@ -968,73 +974,76 @@ worker_on_reauthenticated (GdmDBusWorker *worker,
static void
worker_on_saved_language_name_read (GdmDBusWorker *worker,
const char *language_name,
GdmSessionConversation *conversation)
{
GdmSession *self = conversation->session;
if (strlen (language_name) > 0) {
g_free (self->saved_language);
self->saved_language = g_strdup (language_name);
if (self->greeter_interface != NULL) {
gdm_dbus_greeter_emit_default_language_name_changed (self->greeter_interface,
language_name);
}
}
}
static void
worker_on_saved_session_name_read (GdmDBusWorker *worker,
const char *session_name,
GdmSessionConversation *conversation)
{
GdmSession *self = conversation->session;
if (! get_session_command_for_name (self, session_name, NULL)) {
/* ignore sessions that don't exist */
g_debug ("GdmSession: not using invalid .dmrc session: %s", session_name);
g_free (self->saved_session);
self->saved_session = NULL;
- } else if (strcmp (session_name,
- get_default_session_name (self)) != 0) {
- g_free (self->saved_session);
- self->saved_session = g_strdup (session_name);
-
- if (self->greeter_interface != NULL) {
- gdm_dbus_greeter_emit_default_session_name_changed (self->greeter_interface,
- session_name);
+ update_session_type (self);
+ } else {
+ if (strcmp (session_name,
+ get_default_session_name (self)) != 0) {
+ g_free (self->saved_session);
+ self->saved_session = g_strdup (session_name);
+
+ if (self->greeter_interface != NULL) {
+ gdm_dbus_greeter_emit_default_session_name_changed (self->greeter_interface,
+ session_name);
+ }
}
+ if (self->saved_session_type != NULL)
+ set_session_type (self, self->saved_session_type);
}
- update_session_type (self);
-
}
static GdmSessionConversation *
find_conversation_by_pid (GdmSession *self,
GPid pid)
{
GHashTableIter iter;
gpointer key, value;
g_hash_table_iter_init (&iter, self->conversations);
while (g_hash_table_iter_next (&iter, &key, &value)) {
GdmSessionConversation *conversation;
conversation = (GdmSessionConversation *) value;
if (conversation->worker_pid == pid) {
return conversation;
}
}
return NULL;
}
static gboolean
allow_worker_function (GDBusAuthObserver *observer,
GIOStream *stream,
GCredentials *credentials,
GdmSession *self)
{
uid_t connecting_user;
@@ -2197,68 +2206,72 @@ close_conversation (GdmSessionConversation *conversation)
if (conversation->worker_manager_interface != NULL) {
unexport_worker_manager_interface (self, conversation->worker_manager_interface);
@ -1895,7 +2031,7 @@ index 5c5903a49..a53fb9804 100644
g_hash_table_insert (self->conversations,
g_strdup (service_name), conversation);
return TRUE;
@@ -3137,64 +3147,66 @@ gdm_session_get_conversation_session_id (GdmSession *self,
@@ -3137,64 +3150,66 @@ gdm_session_get_conversation_session_id (GdmSession *self,
conversation = find_conversation_by_name (self, service_name);
@ -1965,7 +2101,63 @@ index 5c5903a49..a53fb9804 100644
}
gboolean
@@ -3479,140 +3491,138 @@ gdm_session_set_property (GObject *object,
@@ -3424,195 +3439,192 @@ set_display_is_initial (GdmSession *self,
{
self->display_is_initial = is_initial;
}
static void
set_verification_mode (GdmSession *self,
GdmSessionVerificationMode verification_mode)
{
self->verification_mode = verification_mode;
}
static void
set_allowed_user (GdmSession *self,
uid_t allowed_user)
{
self->allowed_user = allowed_user;
}
static void
set_conversation_environment (GdmSession *self,
char **environment)
{
g_strfreev (self->conversation_environment);
self->conversation_environment = g_strdupv (environment);
}
static void
set_session_type (GdmSession *self,
const char *session_type)
{
-
+ g_debug ("GdmSession: setting session to type '%s'", session_type? session_type : "");
if (g_strcmp0 (self->session_type, session_type) != 0) {
- g_debug ("GdmSession: setting session to type '%s'", session_type? session_type : "");
g_free (self->session_type);
self->session_type = g_strdup (session_type);
}
}
static void
gdm_session_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GdmSession *self;
self = GDM_SESSION (object);
switch (prop_id) {
case PROP_SESSION_TYPE:
set_session_type (self, g_value_get_string (value));
break;
case PROP_DISPLAY_NAME:
set_display_name (self, g_value_get_string (value));
break;
case PROP_DISPLAY_HOSTNAME:
set_display_hostname (self, g_value_get_string (value));
break;
@ -2112,7 +2304,7 @@ index 5c5903a49..a53fb9804 100644
if (self->worker_server != NULL) {
g_dbus_server_stop (self->worker_server);
@@ -3719,60 +3729,71 @@ gdm_session_class_init (GdmSessionClass *session_class)
@@ -3719,60 +3731,71 @@ gdm_session_class_init (GdmSessionClass *session_class)
NULL,
NULL,
NULL,
@ -2184,7 +2376,7 @@ index 5c5903a49..a53fb9804 100644
0,
NULL,
NULL,
@@ -3962,69 +3983,67 @@ gdm_session_class_init (GdmSessionClass *session_class)
@@ -3962,69 +3985,67 @@ gdm_session_class_init (GdmSessionClass *session_class)
PROP_DISPLAY_X11_AUTHORITY_FILE,
g_param_spec_string ("display-x11-authority-file",
"display x11 authority file",
@ -2261,7 +2453,7 @@ index 5c5903a49..a53fb9804 100644
NULL);
diff --git a/data/gdm.schemas.in b/data/gdm.schemas.in
index 255bff023..a1035f95e 100644
index 255bff02..a1035f95 100644
--- a/data/gdm.schemas.in
+++ b/data/gdm.schemas.in
@@ -25,65 +25,75 @@
@ -2341,7 +2533,7 @@ index 255bff023..a1035f95e 100644
<key>xdmcp/MaxPending</key>
<signature>i</signature>
diff --git a/libgdm/gdm-sessions.c b/libgdm/gdm-sessions.c
index 75d442eeb..97ed5ef3d 100644
index 75d442ee..97ed5ef3 100644
--- a/libgdm/gdm-sessions.c
+++ b/libgdm/gdm-sessions.c
@@ -163,171 +163,203 @@ load_session_file (const char *id,
@ -2569,5 +2761,5 @@ index 75d442eeb..97ed5ef3d 100644
while (g_hash_table_iter_next (&iter, &key, &value)) {
GdmSessionFile *session;
--
2.31.1
2.27.0

View File

@ -1,8 +1,8 @@
From 5c52259331ce0b37dd1b2b092ff41f96b0e5ce64 Mon Sep 17 00:00:00 2001
From 903dd62114d24a90fe55a7cf42ea07233fe71879 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Mon, 29 Oct 2018 06:57:59 -0400
Subject: [PATCH] local-display-factory: pause for a few seconds before falling
back to X
Subject: [PATCH] local-display-factory: pause for a few seconds before
falling back to X
logind currently gets confused if a session is started immediately as
one is shutting down.
@ -16,10 +16,10 @@ http://bugzilla.redhat.com/1643874
1 file changed, 7 insertions(+)
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
index 0bb3851f1..297c3ac80 100644
index eba38671..948c5d98 100644
--- a/daemon/gdm-local-display-factory.c
+++ b/daemon/gdm-local-display-factory.c
@@ -586,60 +586,67 @@ ensure_display_for_seat (GdmLocalDisplayFactory *factory,
@@ -653,60 +653,67 @@ ensure_display_for_seat (GdmLocalDisplayFactory *factory,
preferred_display_server = get_preferred_display_server (factory);
if (g_strcmp0 (preferred_display_server, "none") == 0) {
@ -46,24 +46,24 @@ index 0bb3851f1..297c3ac80 100644
is_seat0 = TRUE;
falling_back = factory->num_failures > 0;
session_type = gdm_local_display_factory_get_session_type (factory, falling_back);
session_types = gdm_local_display_factory_get_session_types (factory, falling_back);
g_debug ("GdmLocalDisplayFactory: New displays on seat0 will use %s%s",
session_type, falling_back? " fallback" : "");
session_types[0], falling_back? " fallback" : "");
+
+ if (falling_back) {
+ if (falling_back) {
+ /* workaround logind race for now
+ * bug 1643874
+ */
+ g_usleep (2 * G_USEC_PER_SEC);
+ }
+ }
} else {
is_seat0 = FALSE;
g_debug ("GdmLocalDisplayFactory: New displays on seat %s will use X11 fallback", seat_id);
/* Force legacy X11 for all auxiliary seats */
seat_supports_graphics = TRUE;
session_type = "x11";
session_types = g_strdupv ((char **) legacy_session_types);
}
/* For seat0, we have a fallback logic to still try starting it after
@ -88,5 +88,5 @@ index 0bb3851f1..297c3ac80 100644
g_debug ("GdmLocalDisplayFactory: seat0 doesn't yet support graphics. Waiting %d seconds to try again.", SEAT0_GRAPHICS_CHECK_TIMEOUT);
factory->seat0_graphics_check_timeout_id = g_timeout_add_seconds (SEAT0_GRAPHICS_CHECK_TIMEOUT,
--
2.30.1
2.27.0

View File

@ -1,4 +1,4 @@
From 7edce4ef248af01692758caf9dbb945bdd45cb0f Mon Sep 17 00:00:00 2001
From 70eb29d5eedc2b66e617745be1dd145aac3e177e Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 15 Aug 2018 10:48:16 -0400
Subject: [PATCH 1/4] worker: don't load user settings for program sessions
@ -10,7 +10,7 @@ for its session name
1 file changed, 26 insertions(+), 11 deletions(-)
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index 774298b95..88fe36c16 100644
index 774298b9..88fe36c1 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -400,103 +400,108 @@ gdm_session_execute (const char *file,
@ -561,5 +561,5 @@ index 774298b95..88fe36c16 100644
g_return_if_fail (worker->priv != NULL);
--
2.31.1
2.27.0

View File

@ -1,4 +1,4 @@
From 6bdb7cf9e8ace0d9a42fd921d7192dcfece687fa Mon Sep 17 00:00:00 2001
From 677d370e892788635c4086b139d78499510fa86c Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Tue, 20 Jul 2021 13:36:45 -0400
Subject: [PATCH 2/2] libgdm: Sort session list
@ -11,7 +11,7 @@ This commit changes the code to sort by description.
1 file changed, 19 insertions(+)
diff --git a/libgdm/gdm-sessions.c b/libgdm/gdm-sessions.c
index 97ed5ef3d..f078e04b8 100644
index 97ed5ef3..f078e04b 100644
--- a/libgdm/gdm-sessions.c
+++ b/libgdm/gdm-sessions.c
@@ -311,92 +311,111 @@ collect_sessions (void)
@ -127,5 +127,5 @@ index 97ed5ef3d..f078e04b8 100644
if (session == NULL) {
return NULL;
--
2.31.1
2.27.0

View File

@ -1,4 +1,4 @@
From c4716129cc3042ca9fa2ab7ee420800d85ec09db Mon Sep 17 00:00:00 2001
From 96e78f519a4d5ce2e5b708035ae1f43eb7c1bbd2 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Tue, 14 Aug 2018 14:52:41 -0400
Subject: [PATCH 2/4] session: support new accountsservice Session and
@ -20,7 +20,7 @@ This commit switches GDM over to use the new properties.
5 files changed, 153 insertions(+), 29 deletions(-)
diff --git a/daemon/gdm-session-settings.c b/daemon/gdm-session-settings.c
index 484a3b5b4..5b64cb65b 100644
index 484a3b5b..f2b1addd 100644
--- a/daemon/gdm-session-settings.c
+++ b/daemon/gdm-session-settings.c
@@ -12,114 +12,121 @@
@ -305,14 +305,14 @@ index 484a3b5b4..5b64cb65b 100644
- session_name = act_user_get_x_session (settings->priv->user);
- g_debug ("GdmSessionSettings: saved session is %s", session_name);
+
- if (session_name != NULL) {
+
+
+
+ session_type = act_user_get_session_type (settings->priv->user);
+ session_name = act_user_get_session (settings->priv->user);
- if (session_name != NULL) {
+
+ g_debug ("GdmSessionSettings: saved session is %s (type %s)", session_name, session_type);
+
+ if (session_type != NULL && session_type[0] != '\0') {
@ -409,7 +409,7 @@ index 484a3b5b4..5b64cb65b 100644
return TRUE;
}
diff --git a/daemon/gdm-session-settings.h b/daemon/gdm-session-settings.h
index 20946bff1..db38ffc72 100644
index 20946bff..db38ffc7 100644
--- a/daemon/gdm-session-settings.h
+++ b/daemon/gdm-session-settings.h
@@ -33,37 +33,40 @@ G_BEGIN_DECLS
@ -454,7 +454,7 @@ index 20946bff1..db38ffc72 100644
G_END_DECLS
#endif /* GDM_SESSION_SETTINGS_H */
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index 88fe36c16..c1201b704 100644
index 88fe36c1..c1201b70 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -2664,60 +2664,74 @@ gdm_session_worker_handle_set_language_name (GdmDBusWorker *object,
@ -706,7 +706,7 @@ index 88fe36c16..c1201b704 100644
const char *log_file)
{
diff --git a/daemon/gdm-session-worker.xml b/daemon/gdm-session-worker.xml
index 4280fe095..a215779c8 100644
index 4280fe09..a215779c 100644
--- a/daemon/gdm-session-worker.xml
+++ b/daemon/gdm-session-worker.xml
@@ -51,40 +51,43 @@
@ -754,7 +754,7 @@ index 4280fe095..a215779c8 100644
</interface>
</node>
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index 6e6326243..73ae5cbc5 100644
index 29459346..43da024f 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -61,60 +61,61 @@
@ -1222,7 +1222,7 @@ index 6e6326243..73ae5cbc5 100644
static void
set_pending_query (GdmSessionConversation *conversation,
@@ -969,80 +989,91 @@ worker_on_reauthenticated (GdmDBusWorker *worker,
@@ -969,83 +989,94 @@ worker_on_reauthenticated (GdmDBusWorker *worker,
GdmSession *self = conversation->session;
g_debug ("GdmSession: Emitting 'reauthenticated' signal ");
g_signal_emit (self, signals[REAUTHENTICATED], 0, service_name);
@ -1259,19 +1259,22 @@ index 6e6326243..73ae5cbc5 100644
g_debug ("GdmSession: not using invalid .dmrc session: %s", session_name);
g_free (self->saved_session);
self->saved_session = NULL;
} else if (strcmp (session_name,
get_default_session_name (self)) != 0) {
g_free (self->saved_session);
self->saved_session = g_strdup (session_name);
update_session_type (self);
} else {
if (strcmp (session_name,
get_default_session_name (self)) != 0) {
g_free (self->saved_session);
self->saved_session = g_strdup (session_name);
if (self->greeter_interface != NULL) {
gdm_dbus_greeter_emit_default_session_name_changed (self->greeter_interface,
session_name);
if (self->greeter_interface != NULL) {
gdm_dbus_greeter_emit_default_session_name_changed (self->greeter_interface,
session_name);
}
}
if (self->saved_session_type != NULL)
set_session_type (self, self->saved_session_type);
}
update_session_type (self);
}
+static void
@ -1315,7 +1318,7 @@ index 6e6326243..73ae5cbc5 100644
uid_t connecting_user;
connecting_user = g_credentials_get_unix_user (credentials, NULL);
@@ -1122,60 +1153,63 @@ register_worker (GdmDBusWorkerManager *worker_manager_interface,
@@ -1125,60 +1156,63 @@ register_worker (GdmDBusWorkerManager *worker_manager_interface,
g_dbus_method_invocation_return_value (invocation, NULL);
conversation->worker_proxy = gdm_dbus_worker_proxy_new_sync (connection,
@ -1379,7 +1382,7 @@ index 6e6326243..73ae5cbc5 100644
g_debug ("GdmSession: Conversation started");
return TRUE;
@@ -1918,60 +1952,63 @@ free_conversation (GdmSessionConversation *conversation)
@@ -1921,60 +1955,63 @@ free_conversation (GdmSessionConversation *conversation)
close_conversation (conversation);
if (conversation->job != NULL) {
@ -1443,7 +1446,7 @@ index 6e6326243..73ae5cbc5 100644
error = NULL;
if (!g_file_get_contents (config_file, &contents, &length, &error)) {
g_debug ("Failed to parse '%s': %s",
@@ -2530,83 +2567,83 @@ gdm_session_send_environment (GdmSession *self,
@@ -2533,83 +2570,83 @@ gdm_session_send_environment (GdmSession *self,
g_return_if_fail (GDM_IS_SESSION (self));
conversation = find_conversation_by_name (self, service_name);
@ -1529,7 +1532,7 @@ index 6e6326243..73ae5cbc5 100644
g_strdup (value));
}
@@ -3176,148 +3213,150 @@ gdm_session_get_conversation_session_id (GdmSession *self,
@@ -3179,148 +3216,150 @@ gdm_session_get_conversation_session_id (GdmSession *self,
conversation = find_conversation_by_name (self, service_name);
if (conversation == NULL) {
@ -1689,5 +1692,5 @@ index 6e6326243..73ae5cbc5 100644
self->display_seat_id);
--
2.31.1
2.27.0

View File

@ -1,4 +1,4 @@
From 09e4f57ea2525e48bd22a34cb0c9b917ce7565df Mon Sep 17 00:00:00 2001
From bd5153305b576f29ea3b8835bd2740a5eda2db0f Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Mon, 20 Aug 2018 14:30:59 -0400
Subject: [PATCH 3/4] daemon: save os-release in accountsservice
@ -17,7 +17,7 @@ This commit saves that information in accountsservice.
diff --git a/daemon/com.redhat.AccountsServiceUser.System.xml b/daemon/com.redhat.AccountsServiceUser.System.xml
new file mode 100644
index 000000000..67f5f302c
index 00000000..67f5f302
--- /dev/null
+++ b/daemon/com.redhat.AccountsServiceUser.System.xml
@@ -0,0 +1,10 @@
@ -32,7 +32,7 @@ index 000000000..67f5f302c
+ </interface>
+</node>
diff --git a/daemon/gdm-session-settings.c b/daemon/gdm-session-settings.c
index 5b64cb65b..5bcfdc14f 100644
index f2b1addd..a4b7f1a6 100644
--- a/daemon/gdm-session-settings.c
+++ b/daemon/gdm-session-settings.c
@@ -1,70 +1,77 @@
@ -233,9 +233,9 @@ index 5b64cb65b..5bcfdc14f 100644
+ }
+ }
+
session_type = act_user_get_session_type (settings->priv->user);
session_name = act_user_get_session (settings->priv->user);
@ -401,7 +401,7 @@ index 5b64cb65b..5bcfdc14f 100644
return TRUE;
}
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index 73ae5cbc5..ce6df14c6 100644
index 43da024f..c8e04c1b 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -351,72 +351,72 @@ supports_session_type (GdmSession *self,
@ -480,7 +480,7 @@ index 73ae5cbc5..ce6df14c6 100644
}
diff --git a/daemon/meson.build b/daemon/meson.build
index 2e61b6447..71c650398 100644
index 2e61b644..71c65039 100644
--- a/daemon/meson.build
+++ b/daemon/meson.build
@@ -15,114 +15,122 @@ local_display_dbus_gen = gnome.gdbus_codegen('gdm-local-display-glue',
@ -607,5 +607,5 @@ index 2e61b6447..71c650398 100644
gdm_session_worker = executable('gdm-session-worker',
--
2.31.1
2.27.0

View File

@ -1,4 +1,4 @@
From de103948b84188cd2273c9aab904a633323a9479 Mon Sep 17 00:00:00 2001
From b7c0541ffccf43994a3e418c4012b17a6dd8b630 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Mon, 20 Aug 2018 14:30:59 -0400
Subject: [PATCH 4/4] daemon: handle upgrades from RHEL 7
@ -16,7 +16,7 @@ try to get the right settings.
2 files changed, 27 insertions(+), 11 deletions(-)
diff --git a/daemon/gdm-session-settings.c b/daemon/gdm-session-settings.c
index 5bcfdc14f..a7eaa8b2f 100644
index a4b7f1a6..a84b2ffa 100644
--- a/daemon/gdm-session-settings.c
+++ b/daemon/gdm-session-settings.c
@@ -270,95 +270,114 @@ gdm_session_settings_get_property (GObject *object,
@ -80,9 +80,9 @@ index 5bcfdc14f..a7eaa8b2f 100644
}
}
session_type = act_user_get_session_type (settings->priv->user);
session_name = act_user_get_session (settings->priv->user);
@ -135,10 +135,10 @@ index 5bcfdc14f..a7eaa8b2f 100644
settings);
}
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index ce6df14c6..6bda6d6e2 100644
index c8e04c1b..3103e9df 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -3202,98 +3202,95 @@ gdm_session_get_session_id (GdmSession *self)
@@ -3205,98 +3205,95 @@ gdm_session_get_session_id (GdmSession *self)
return conversation->session_id;
}
@ -246,5 +246,5 @@ index ce6df14c6..6bda6d6e2 100644
if (!session_registers &&
error != NULL &&
--
2.31.1
2.27.0

View File

@ -12,7 +12,7 @@
Name: gdm
Epoch: 1
Version: 40.0
Release: 12%{?dist}
Release: 13%{?dist}
Summary: The GNOME Display Manager
License: GPLv2+
@ -360,6 +360,11 @@ fi
%{_libdir}/pkgconfig/gdm-pam-extensions.pc
%changelog
* Wed Sep 01 2021 Ray Strode <rstrode@redhat.com> - 40.0-13
- Disable Wayland on HyperV
- Fix Xorg fallback
Related: #1998989
* Thu Aug 19 2021 Ray Strode <rstrode@redhat.com> - 40.0-12
- Redisable on server chips since rebase
Related: #1909300