From 42983d2f54fd4d3bcf4b410aae7c05bd321a3e87 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 12 Apr 2022 10:57:03 -0400 Subject: [PATCH] Matrox fixes - Fix accountsservice user templates Resolves: #2062827 - Properly force Xorg on matrox cards Related: #2074013 - Fix typo that prevents the correct session type from being used when user switching. Resolves: #2074014 --- ...-Fetch-session-from-user-even-if-use.patch | 89 +++++++++++++++++++ ...te-session-type-and-supported-sessio.patch | 2 +- ...-data-Use-latest-upstream-udev-rules.patch | 2 +- gdm.spec | 21 +++-- 4 files changed, 107 insertions(+), 7 deletions(-) create mode 100644 0001-session-settings-Fetch-session-from-user-even-if-use.patch diff --git a/0001-session-settings-Fetch-session-from-user-even-if-use.patch b/0001-session-settings-Fetch-session-from-user-even-if-use.patch new file mode 100644 index 0000000..109ec15 --- /dev/null +++ b/0001-session-settings-Fetch-session-from-user-even-if-use.patch @@ -0,0 +1,89 @@ +From 8a29f79124f38e2106b263bacb6b5ab4cdb255d0 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Wed, 9 Mar 2022 10:46:21 -0500 +Subject: [PATCH] session-settings: Fetch session from user even if user isn't + cached + +Now that accountsservice supports session templates, GDM can't assume +that no-cache file means, there's nothing worth reading. + +Unfortunately, GDM does exactly that. It bypasses fetching the users +session if it doesn't think the user has one. + +This commit removes that no-longer-correct optimization. +--- + daemon/gdm-session-settings.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/daemon/gdm-session-settings.c b/daemon/gdm-session-settings.c +index 5b64cb65..fbf6897b 100644 +--- a/daemon/gdm-session-settings.c ++++ b/daemon/gdm-session-settings.c +@@ -270,64 +270,60 @@ gdm_session_settings_new (void) + GdmSessionSettings *settings; + + settings = g_object_new (GDM_TYPE_SESSION_SETTINGS, + NULL); + + return settings; + } + + gboolean + gdm_session_settings_is_loaded (GdmSessionSettings *settings) + { + if (settings->priv->user == NULL) { + return FALSE; + } + + return act_user_is_loaded (settings->priv->user); + } + + static void + load_settings_from_user (GdmSessionSettings *settings) + { + const char *session_name; + const char *session_type; + const char *language_name; + + if (!act_user_is_loaded (settings->priv->user)) { + g_warning ("GdmSessionSettings: trying to load user settings from unloaded user"); + return; + } + +- /* if the user doesn't have saved state, they don't have any settings worth reading */ +- if (!act_user_get_saved (settings->priv->user)) +- goto out; +- + session_type = act_user_get_session_type (settings->priv->user); + session_name = act_user_get_session (settings->priv->user); + + g_debug ("GdmSessionSettings: saved session is %s (type %s)", session_name, session_type); + + if (session_type != NULL && session_type[0] != '\0') { + gdm_session_settings_set_session_type (settings, session_type); + } + + if (session_name != NULL && session_name[0] != '\0') { + gdm_session_settings_set_session_name (settings, session_name); + } + + language_name = act_user_get_language (settings->priv->user); + + g_debug ("GdmSessionSettings: saved language is %s", language_name); + if (language_name != NULL && language_name[0] != '\0') { + gdm_session_settings_set_language_name (settings, language_name); + } + + out: + g_object_notify (G_OBJECT (settings), "is-loaded"); + } + + static void + on_user_is_loaded_changed (ActUser *user, + GParamSpec *pspec, + GdmSessionSettings *settings) + { + if (act_user_is_loaded (settings->priv->user)) { +-- +2.34.1 + diff --git a/0004-daemon-Consolidate-session-type-and-supported-sessio.patch b/0004-daemon-Consolidate-session-type-and-supported-sessio.patch index 7968261..9a91510 100644 --- a/0004-daemon-Consolidate-session-type-and-supported-sessio.patch +++ b/0004-daemon-Consolidate-session-type-and-supported-sessio.patch @@ -260,7 +260,7 @@ index 141d64c6..eba38671 100644 - 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, ++ "supported-session-types", session_types, + NULL); is_initial = TRUE; } diff --git a/0004-data-Use-latest-upstream-udev-rules.patch b/0004-data-Use-latest-upstream-udev-rules.patch index 44abca1..bf526be 100644 --- a/0004-data-Use-latest-upstream-udev-rules.patch +++ b/0004-data-Use-latest-upstream-udev-rules.patch @@ -24,7 +24,7 @@ index b1da191f..5dae00ea 100644 +LABEL="gdm_virtio_device_end" + +SUBSYSTEM!="pci", GOTO="gdm_pci_device_end" -+ACTION!="bind", GOTO="gdm_pci_device_end" ++ACTION!="bind", ACTION!="add", GOTO="gdm_pci_device_end" + +# identify virtio graphics cards to find passthrough setups +# cirrus diff --git a/gdm.spec b/gdm.spec index b8a1dd4..3fa2564 100644 --- a/gdm.spec +++ b/gdm.spec @@ -11,7 +11,7 @@ Name: gdm Epoch: 1 Version: 40.1 -Release: 14%{?dist} +Release: 15%{?dist} Summary: The GNOME Display Manager License: GPLv2+ @@ -38,10 +38,7 @@ Patch40001: 0001-session-worker-Set-session_vt-0-out-of-pam-uninitial.patch Patch50001: 0001-meson-Fix-detection-of-Xorg-versions-that-need-liste.patch Patch50002: 0002-daemon-Support-X-servers-built-with-Dlisten_tcp-true.patch -# Questionable feature to support logging in over multiple XDMCP consoles at the same time -Patch60001: 0001-manager-allow-multiple-xdmcp-logins-for-the-same-use.patch -Patch60002: 0002-gdm-x-session-run-session-bus-on-non-seat0-seats.patch -Patch60003: 0003-session-ensure-login-screen-over-XDMCP-connects-to-i.patch +Patch60001: 0001-session-settings-Fetch-session-from-user-even-if-use.patch # Latest udev rules and support code Patch70001: 0001-local-display-factory-Stall-startup-until-main-graph.patch @@ -52,6 +49,11 @@ Patch70004: 0004-data-Use-latest-upstream-udev-rules.patch # Non-upstreamable workarounds Patch66610001: 0001-data-reap-gdm-sessions-on-shutdown.patch +# Questionable feature to support logging in over multiple XDMCP consoles at the same time +Patch66620001: 0001-manager-allow-multiple-xdmcp-logins-for-the-same-use.patch +Patch66620002: 0002-gdm-x-session-run-session-bus-on-non-seat0-seats.patch +Patch66620003: 0003-session-ensure-login-screen-over-XDMCP-connects-to-i.patch + # Non-upstreamable integration patches Patch99910001: 0001-Honor-initial-setup-being-disabled-by-distro-install.patch @@ -343,6 +345,15 @@ dconf update || : %{_libdir}/pkgconfig/gdm-pam-extensions.pc %changelog +* Tue Apr 12 2022 Ray Strode - 40.1-15 +- Fix accountsservice user templates + Resolves: #2062827 +- Properly force Xorg on matrox cards + Related: #2074013 +- Fix typo that prevents the correct session type from being + used when user switching. + Resolves: #2074014 + * Tue Mar 22 2022 Ray Strode - 40.1-14 - Fix erroneous jump back to login screen on udev events after login Resolves: #2065901