From 54787f40cc4d47d09b0864dff0fef5a326436ac2 Mon Sep 17 00:00:00 2001 From: Andrew Lukoshko Date: Thu, 7 Aug 2025 10:58:38 +0000 Subject: [PATCH] import OL mutter-40.9-25.el9_6.1 --- ...se-drmModeCloseFB-for-flicker-free-l.patch | 51 +++++++++++ ...ync-again-at-the-end-of-before_paint.patch | 85 +++++++++++++++++++ SPECS/mutter.spec | 27 +++++- 3 files changed, 160 insertions(+), 3 deletions(-) create mode 100644 SOURCES/0001-backend-native-Use-drmModeCloseFB-for-flicker-free-l.patch create mode 100644 SOURCES/0001-compositor-x11-sync-again-at-the-end-of-before_paint.patch diff --git a/SOURCES/0001-backend-native-Use-drmModeCloseFB-for-flicker-free-l.patch b/SOURCES/0001-backend-native-Use-drmModeCloseFB-for-flicker-free-l.patch new file mode 100644 index 0000000..7741a2b --- /dev/null +++ b/SOURCES/0001-backend-native-Use-drmModeCloseFB-for-flicker-free-l.patch @@ -0,0 +1,51 @@ +From d71294da2282fe9a82cc8661d3110c8020a5069a Mon Sep 17 00:00:00 2001 +From: Jocelyn Falempe +Date: Wed, 13 Mar 2024 15:34:14 +0100 +Subject: [PATCH] backend/native: Use drmModeCloseFB for flicker-free login + +When logging in from gdm to gnome, the main plane is deactivated, and +leads to the screen going blank before gnome is able to enable it +again. +Using the new CloseFB ioctl, allows to keep the gdm login screen +displayed until gnome-shell replace it. + +Signed-off-by: Jocelyn Falempe +Part-of: +(cherry picked from commit a775241efd8b840e7789077fb2224f0df2361d54) +--- + meson.build | 3 ++- + src/backends/native/meta-drm-buffer.c | 4 +++- + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index 613aa67792..0c342ed335 100644 +--- a/meson.build ++++ b/meson.build +@@ -45,7 +45,8 @@ wayland_protocols_req = '>= 1.19' + + # native backend version requirements + libinput_req = '>= 1.15.0' +-gbm_req = '>= 17.3' ++gbm_req = '>= 21.3' ++libdrm_req = '>= 2.4.118' + + # screen cast version requirements + libpipewire_req = '>= 0.3.21' +diff --git a/src/backends/native/meta-drm-buffer.c b/src/backends/native/meta-drm-buffer.c +index a0f8055b31..c650484552 100644 +--- a/src/backends/native/meta-drm-buffer.c ++++ b/src/backends/native/meta-drm-buffer.c +@@ -211,7 +211,9 @@ rm_fb_in_impl (MetaKmsImpl *impl, + int ret; + + fd = meta_kms_impl_device_get_fd (impl_device); +- ret = drmModeRmFB (fd, fb_id); ++ ret = drmModeCloseFB (fd, fb_id); ++ if (ret == -EINVAL) ++ ret = drmModeRmFB (fd, fb_id); + if (ret != 0) + g_warning ("drmModeRmFB: %s", g_strerror (-ret)); + +-- +2.44.0.501.g19981daefd.dirty + diff --git a/SOURCES/0001-compositor-x11-sync-again-at-the-end-of-before_paint.patch b/SOURCES/0001-compositor-x11-sync-again-at-the-end-of-before_paint.patch new file mode 100644 index 0000000..b864479 --- /dev/null +++ b/SOURCES/0001-compositor-x11-sync-again-at-the-end-of-before_paint.patch @@ -0,0 +1,85 @@ +From f606a4424a5afc71672566b15f56971bfb7fa4db Mon Sep 17 00:00:00 2001 +From: Daniel van Vugt +Date: Fri, 16 Feb 2024 16:57:55 +0800 +Subject: [PATCH] compositor/x11: Sync again at the end of before_paint + +The existing comment tells us this is necessary: + +> there may be drawing between the last damage event and the +> XDamageSubtract() that needs to be flushed as well. + +But the commit message for 551101c65cda also tells us that +synchronization is necessary before-update. Assuming both are correct +then it needs to be done in both places. + +I did try optimizing out the second sync to only do it if damage +arrived during the update, but that doesn't seem to be the issue. +The damage event is arriving before the update starts and it's some +secondary changes within the damage region running late that need +flushing. So this means the client is reporting damage more frequently +than the frame rate and we're ignoring the secondary damage reports +for efficiency (XDamageReportBoundingBox), which is still a good thing. + +Fixes: 551101c65cda ("compositor-x11: Move synchronization to before-update") +Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2880 +Part-of: +--- + src/compositor/meta-compositor-x11.c | 30 ++++++++++++++++++++++++---- + 1 file changed, 26 insertions(+), 4 deletions(-) + +diff --git a/src/compositor/meta-compositor-x11.c b/src/compositor/meta-compositor-x11.c +index 1d0ba4c..8bfd4c1 100644 +--- a/src/compositor/meta-compositor-x11.c ++++ b/src/compositor/meta-compositor-x11.c +@@ -326,9 +326,7 @@ out: + } + + static void +-on_before_update (ClutterStage *stage, +- ClutterStageView *stage_view, +- MetaCompositor *compositor) ++maybe_do_sync (MetaCompositor *compositor) + { + MetaCompositorX11 *compositor_x11 = META_COMPOSITOR_X11 (compositor); + +@@ -363,6 +361,14 @@ on_before_update (ClutterStage *stage, + } + } + ++static void ++on_before_update (ClutterStage *stage, ++ ClutterStageView *stage_view, ++ MetaCompositor *compositor) ++{ ++ maybe_do_sync (compositor); ++} ++ + static void + on_after_update (ClutterStage *stage, + ClutterStageView *stage_view, +@@ -390,6 +396,22 @@ meta_compositor_x11_before_paint (MetaCompositor *compositor, + + parent_class = META_COMPOSITOR_CLASS (meta_compositor_x11_parent_class); + parent_class->before_paint (compositor, stage_view); ++ ++ /* We must sync after MetaCompositor's before_paint because that's the final ++ * time XDamageSubtract may happen before painting (when it calls ++ * meta_window_actor_x11_before_paint -> handle_updates -> ++ * meta_surface_actor_x11_handle_updates). If a client was to redraw between ++ * the last damage event and XDamageSubtract, and the bounding box of the ++ * region didn't grow, then we will not receive a new damage report for it ++ * (because XDamageReportBoundingBox). Then if we haven't synchronized again ++ * and the same region doesn't change on subsequent frames, we have lost some ++ * part of the update from the client. So to ensure the correct pixels get ++ * composited we must sync at least once between XDamageSubtract and ++ * compositing, which is here. More related documentation can be found in ++ * maybe_do_sync. ++ */ ++ ++ maybe_do_sync (compositor); + } + + static void +-- +GitLab + diff --git a/SPECS/mutter.spec b/SPECS/mutter.spec index fb7748d..7eebc7e 100644 --- a/SPECS/mutter.spec +++ b/SPECS/mutter.spec @@ -10,7 +10,7 @@ Name: mutter Version: 40.9 -Release: 23%{?dist} +Release: 25%{?dist}.1 Summary: Window and compositing manager based on Clutter License: GPLv2+ @@ -146,7 +146,14 @@ Patch63: 0003-window-Unregister-cgroup-on-unmanage.patch Patch64: 0004-window-Don-t-use-cgroup-workspace-if-there-already-i.patch Patch65: 0005-cgroup-Get-app-info-from-gnome-shell-when-possible.patch -Patch66: double-key-event-handling.patch +# RHEL-10895 +Patch66: 0001-backend-native-Use-drmModeCloseFB-for-flicker-free-l.patch + +# RHEL-21286 +Patch67: double-key-event-handling.patch + +# RHEL-101894 +Patch68: 0001-compositor-x11-sync-again-at-the-end-of-before_paint.patch BuildRequires: chrpath BuildRequires: pango-devel @@ -295,8 +302,22 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop %{_datadir}/mutter-%{mutter_api_version}/tests %changelog -* Tue Mar 18 2025 Eduard Abdullin - 40.9-23 +* Fri Jul 08 2025 Tomas Pelka - 40.9-25 +- Bumping the release and rebuilding in correct build target +- Backport fix for screen not refreshing properly + Resolves: RHEL-101894 + +* Fri Jul 04 2025 Jonas Ådahl - 40.9-25 +- Backport fix for screen not refreshing properly + Resolves: RHEL-101894 + +* Tue Jan 28 2025 Carlos Garnacho - 40.9-24 - Fix stuck modifier keys + Resolves: RHEL-21286 + +* Fri Nov 01 2024 Jonas Ådahl - 40.9-23 +- Backport fix for flicker-free login + Resolves: RHEL-10895 * Fri Oct 18 2024 Jonas Ådahl - 40.9-22 - Fix crash when moving window while switching workspace