Pull in Xwayland autostart fix for non-systemd startup
Resolves: #1924908
This commit is contained in:
parent
bdf08dfe51
commit
d0dbd22662
|
@ -0,0 +1,49 @@
|
||||||
|
From 19cdbd50dca4ea08d18ffad22a96efc3e4e372d3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Benjamin Berg <bberg@redhat.com>
|
||||||
|
Date: Thu, 11 Mar 2021 18:52:48 +0100
|
||||||
|
Subject: [PATCH] main: Force Xwayland startup if not on systemd
|
||||||
|
|
||||||
|
In non-systemd managed session we are unable to start services on
|
||||||
|
demand. Instead, gnome-session will start everything at login time,
|
||||||
|
including any X11 related service (i.e. gsd-xsettings).
|
||||||
|
|
||||||
|
However, in order to start gsd-xsettings, Xwayland needs to be started
|
||||||
|
already. Otherwise it will connect to GNOME_SETUP_DISPLAY and login will
|
||||||
|
hang at that point.
|
||||||
|
|
||||||
|
Fix this by detecting whether mutter is running in a systemd unit. If it
|
||||||
|
is, we assume that we are systemd managed and the machinery to start the
|
||||||
|
services works fine. If not, we assume that the session management may
|
||||||
|
unconditionally try to start X11 related services and Xwayland must be
|
||||||
|
started in order to not block this.
|
||||||
|
---
|
||||||
|
src/core/main.c | 9 ++++++++-
|
||||||
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/core/main.c b/src/core/main.c
|
||||||
|
index 6b26990c6..c189eceb5 100644
|
||||||
|
--- a/src/core/main.c
|
||||||
|
+++ b/src/core/main.c
|
||||||
|
@@ -1014,11 +1014,18 @@ meta_get_x11_display_policy (void)
|
||||||
|
#ifdef HAVE_WAYLAND
|
||||||
|
if (meta_is_wayland_compositor ())
|
||||||
|
{
|
||||||
|
+#ifdef HAVE_XWAYLAND_INITFD
|
||||||
|
+ g_autofree char *unit = NULL;
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
if (opt_no_x11)
|
||||||
|
return META_DISPLAY_POLICY_DISABLED;
|
||||||
|
|
||||||
|
#ifdef HAVE_XWAYLAND_INITFD
|
||||||
|
- return META_DISPLAY_POLICY_ON_DEMAND;
|
||||||
|
+ if (sd_pid_get_user_unit (0, &unit) < 0)
|
||||||
|
+ return META_DISPLAY_POLICY_MANDATORY;
|
||||||
|
+ else
|
||||||
|
+ return META_DISPLAY_POLICY_ON_DEMAND;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
Name: mutter
|
Name: mutter
|
||||||
Version: 40.0~beta
|
Version: 40.0~beta
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Window and compositing manager based on Clutter
|
Summary: Window and compositing manager based on Clutter
|
||||||
|
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
|
@ -25,6 +25,9 @@ Patch1: 0001-Revert-build-Do-not-provide-built-sources-as-libmutt.patch
|
||||||
# Workaround for RHBZ#1936991 (blocks atomic KMS on "tegra" driver)
|
# Workaround for RHBZ#1936991 (blocks atomic KMS on "tegra" driver)
|
||||||
Patch2: 0001-Test-deny-atomic-KMS-for-tegra-RHBZ-1936991.patch
|
Patch2: 0001-Test-deny-atomic-KMS-for-tegra-RHBZ-1936991.patch
|
||||||
|
|
||||||
|
# Pull in Xwayland autostart fix for non-systemd startup
|
||||||
|
Patch3: 0001-main-Force-Xwayland-startup-if-not-on-systemd.patch
|
||||||
|
|
||||||
BuildRequires: chrpath
|
BuildRequires: chrpath
|
||||||
BuildRequires: pango-devel
|
BuildRequires: pango-devel
|
||||||
BuildRequires: startup-notification-devel
|
BuildRequires: startup-notification-devel
|
||||||
|
@ -174,6 +177,10 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
|
||||||
%{_datadir}/mutter-%{mutter_api_version}/tests
|
%{_datadir}/mutter-%{mutter_api_version}/tests
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Mar 12 2021 Benjamin Berg <bberg@redhat.com> - 40.0~beta-3
|
||||||
|
- Pull in Xwayland autostart fix for non-systemd startup
|
||||||
|
Resolves: #1924908
|
||||||
|
|
||||||
* Tue Mar 09 2021 Adam Williamson <awilliam@redhat.com> - 40.0~beta-2
|
* Tue Mar 09 2021 Adam Williamson <awilliam@redhat.com> - 40.0~beta-2
|
||||||
- Add a workaround for RHBZ#1936991 (disable atomic KMS on tegra)
|
- Add a workaround for RHBZ#1936991 (disable atomic KMS on tegra)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue