Fix PreferredDisplayServer=legacy-xorg in /etc/gdm/custom.conf

This commit is contained in:
Ray Strode 2023-11-27 15:32:49 -05:00
parent 3c8edc0c7f
commit 0f4f9cd44b
2 changed files with 95 additions and 1 deletions

View File

@ -0,0 +1,88 @@
From bcab8852cf7249a2220f6c737f7bb8a17b99249a Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Mon, 27 Nov 2023 15:29:09 -0500
Subject: [PATCH] gdm-session: Force reuse vt mode for legacy Xorg mode
In the legacy Xorg mode, the X session and user session are
supposed to use the same VT.
Unfortunately, right now GDM thinks they will use different
VTs and that breaks PreferredDisplayServer=legacy-xorg.
This commit fixes that.
---
daemon/gdm-session.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index 9f68166..43e3ea6 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -3343,60 +3343,64 @@ gdm_session_bypasses_xsession (GdmSession *self)
if (error) {
bypasses_xsession = FALSE;
g_error_free (error);
goto out;
}
}
out:
if (bypasses_xsession) {
g_debug ("GdmSession: Session %s bypasses Xsession wrapper script", filename);
}
g_free (filename);
return bypasses_xsession;
}
GdmSessionDisplayMode
gdm_session_get_display_mode (GdmSession *self)
{
g_debug ("GdmSession: type %s, program? %s, seat %s",
self->session_type,
self->is_program_session? "yes" : "no",
self->display_seat_id);
/* Non-seat0 sessions share their X server with their login screen
* for now.
*/
if (g_strcmp0 (self->display_seat_id, "seat0") != 0) {
return GDM_SESSION_DISPLAY_MODE_REUSE_VT;
}
+ if (self->display_x11_authority_file != NULL) {
+ return GDM_SESSION_DISPLAY_MODE_REUSE_VT;
+ }
+
#ifdef ENABLE_USER_DISPLAY_SERVER
/* All other cases (wayland login screen, X login screen,
* wayland user session, X user session) use the NEW_VT
* display mode. That display mode means that GDM allocates
* a new VT and jumps to it before starting the session. The
* session is expected to use logind to gain access to the
* display and input devices.
*
* GDM also has a LOGIND_MANAGED display mode which we can't
* use yet. The difference between it and NEW_VT, is with it,
* GDM doesn't do any VT handling at all, expecting the session
* and logind to do everything. The problem is, for wayland
* sessions it will cause flicker until * this bug is fixed:
*
* https://bugzilla.gnome.org/show_bug.cgi?id=745141
*
* Likewise, for X sessions it's problematic because
* 1) X doesn't call TakeControl before switching VTs
* 2) X doesn't support getting started "in the background"
* right now. It will die with an error if logind devices
* are paused when handed out.
*/
return GDM_SESSION_DISPLAY_MODE_NEW_VT;
#else
#ifdef ENABLE_WAYLAND_SUPPORT
/* Wayland sessions are for now assumed to run in a
* mutter-launch-like environment, so we allocate
* a new VT for them. */
if (g_strcmp0 (self->session_type, "wayland") == 0) {
--
2.41.0

View File

@ -11,7 +11,7 @@
Name: gdm
Epoch: 1
Version: 40.1
Release: 21%{?dist}
Release: 22%{?dist}
Summary: The GNOME Display Manager
License: GPLv2+
@ -43,6 +43,8 @@ Patch60001: 0001-session-settings-Fetch-session-from-user-even-if-use.patch
Patch70001: 0001-manager-Fix-btmp-record-accounting.patch
Patch80001: 0001-gdm-session-Force-reuse-vt-mode-for-legacy-Xorg-mode.patch
# Latest udev rules and support code
Patch90001: 0001-local-display-factory-Stall-startup-until-main-graph.patch
Patch90002: 0002-common-Add-API-to-reload-settings-from-disk.patch
@ -351,6 +353,10 @@ dconf update || :
%{_libdir}/pkgconfig/gdm-pam-extensions.pc
%changelog
* Mon Nov 27 2023 Ray Strode <rstrode@redhat.com> - 40.1-22
- Fix PreferredDisplayServer=legacy-xorg in /etc/gdm/custom.conf
Resolves: RHEL-19410
* Fri Jan 27 2023 Ray Strode <rstrode@redhat.com> - 40.1-21
- Enable IPV6 support
Resolves: #2165049