From 9330878e4a8ea64f8b2ad6c9f18e36f1d0b73cde Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Mon, 15 Mar 2021 16:05:31 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/mutter.git#a9cffe777151f09e2a23838ab19c54cb8c2faf5e --- ...e-Xwayland-startup-if-not-on-systemd.patch | 49 +++++++++++++++++++ mutter.spec | 12 ++++- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 0001-main-Force-Xwayland-startup-if-not-on-systemd.patch diff --git a/0001-main-Force-Xwayland-startup-if-not-on-systemd.patch b/0001-main-Force-Xwayland-startup-if-not-on-systemd.patch new file mode 100644 index 0000000..04b34b1 --- /dev/null +++ b/0001-main-Force-Xwayland-startup-if-not-on-systemd.patch @@ -0,0 +1,49 @@ +From 19cdbd50dca4ea08d18ffad22a96efc3e4e372d3 Mon Sep 17 00:00:00 2001 +From: Benjamin Berg +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 + diff --git a/mutter.spec b/mutter.spec index a2a05c0..a9b0287 100644 --- a/mutter.spec +++ b/mutter.spec @@ -8,7 +8,7 @@ Name: mutter Version: 40.0~beta -Release: 2%{?dist} +Release: 3%{?dist} Summary: Window and compositing manager based on Clutter 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) 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: pango-devel BuildRequires: startup-notification-devel @@ -91,6 +94,7 @@ Conflicts: gnome-shell < 3.21.1 Requires: control-center-filesystem Requires: gsettings-desktop-schemas%{?_isa} >= %{gsettings_desktop_schemas_version} +Requires: gnome-settings-daemon Requires: gtk3%{?_isa} >= %{gtk3_version} Requires: pipewire%{_isa} >= %{pipewire_version} Requires: startup-notification @@ -100,6 +104,8 @@ Requires: zenity Requires: json-glib%{?_isa} >= %{json_glib_version} Requires: libinput%{?_isa} >= %{libinput_version} +Provides: firstboot(windowmanager) = mutter + %description Mutter is a window and compositing manager that displays and manages your desktop via OpenGL. Mutter combines a sophisticated display engine @@ -171,6 +177,10 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop %{_datadir}/mutter-%{mutter_api_version}/tests %changelog +* Fri Mar 12 2021 Benjamin Berg - 40.0~beta-3 +- Pull in Xwayland autostart fix for non-systemd startup + Resolves: #1924908 + * Tue Mar 09 2021 Adam Williamson - 40.0~beta-2 - Add a workaround for RHBZ#1936991 (disable atomic KMS on tegra)