diff -Nru mutter-42.9/debian/changelog mutter-42.9/debian/changelog --- mutter-42.9/debian/changelog 2023-09-11 13:39:50.000000000 +0000 +++ mutter-42.9/debian/changelog 2024-03-01 09:47:40.000000000 +0000 @@ -1,3 +1,25 @@ +mutter (42.9-0ubuntu7) jammy; urgency=medium + + * Add build-Set-built-headers-as-libmutter_dep-sources.patch to prevent + occasional build failures depending on parallelism (LP: #2055530) + * Add cogl-gl-framebuffer-Fix-inverted-test-in-ensure_bits_init.patch to + fix test failures in mutter:cogl+cogl/conform / framebuffer-get-bits + when Mesa >= 23.1.1 (LP: #2055519) + + -- Daniel van Vugt Fri, 01 Mar 2024 17:47:40 +0800 + +mutter (42.9-0ubuntu6) jammy; urgency=medium + + [ Kai-Heng Feng ] + * Fix mirror mode on reduced blanking panel. (LP: #2051074) + + [ Daniel van Vugt ] + * Add compositor-x11-Sync-again-at-the-end-of-before_paint.patch + to fix incomplete redraws in X11 virtual machines (LP: #2054510) + * debian/control.in: Stop automatically reverting to the old uploaders. + + -- Daniel van Vugt Thu, 22 Feb 2024 15:25:36 +0800 + mutter (42.9-0ubuntu5) jammy; urgency=medium [ Daniel van Vugt ] diff -Nru mutter-42.9/debian/control.in mutter-42.9/debian/control.in --- mutter-42.9/debian/control.in 2023-09-11 13:39:50.000000000 +0000 +++ mutter-42.9/debian/control.in 2024-03-01 09:47:40.000000000 +0000 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian GNOME Maintainers -Uploaders: @GNOME_TEAM@ +Uploaders: Jeremy Bicha , Marco Trevisan (TreviƱo) Build-Depends: debhelper-compat (= 13), dh-exec, dh-sequence-gir, diff -Nru mutter-42.9/debian/patches/build-Set-built-headers-as-libmutter_dep-sources.patch mutter-42.9/debian/patches/build-Set-built-headers-as-libmutter_dep-sources.patch --- mutter-42.9/debian/patches/build-Set-built-headers-as-libmutter_dep-sources.patch 1970-01-01 00:00:00.000000000 +0000 +++ mutter-42.9/debian/patches/build-Set-built-headers-as-libmutter_dep-sources.patch 2024-03-01 09:47:40.000000000 +0000 @@ -0,0 +1,43 @@ +From: =?utf-8?q?Jonas_=C3=85dahl?= +Date: Thu, 11 May 2023 20:23:18 +0200 +Subject: build: Set built headers as libmutter_dep sources + +This should help avoiding compiling objects depending on built headers +to fail if they happen to be built before the sources are built. + +Part-of: + +Origin: Upstream commit 99a58be10481b5d1ca29ff4f4ca3e0091728f4b5 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/2055530 +Forwarded: not-needed +Last-Update: 2024-03-01 +--- + src/meson.build | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/meson.build b/src/meson.build +index 13a69c1..c018f79 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -1015,6 +1015,13 @@ subdir('meta') + + mutter_built_sources += mutter_enum_types + ++mutter_built_headers = [] ++foreach built_source : mutter_built_sources ++ if built_source.full_path().endswith('.h') ++ built_headers += [built_source] ++ endif ++endforeach ++ + libmutter = shared_library(libmutter_name, + mutter_sources, + mutter_built_sources, +@@ -1039,6 +1046,7 @@ libmutter = shared_library(libmutter_name, + libmutter_dep = declare_dependency( + link_with: libmutter, + include_directories: mutter_includes, ++ sources: mutter_built_headers, + dependencies: [ + libmutter_cogl_dep, + libmutter_clutter_dep, diff -Nru mutter-42.9/debian/patches/cogl-gl-framebuffer-Fix-inverted-test-in-ensure_bits_init.patch mutter-42.9/debian/patches/cogl-gl-framebuffer-Fix-inverted-test-in-ensure_bits_init.patch --- mutter-42.9/debian/patches/cogl-gl-framebuffer-Fix-inverted-test-in-ensure_bits_init.patch 1970-01-01 00:00:00.000000000 +0000 +++ mutter-42.9/debian/patches/cogl-gl-framebuffer-Fix-inverted-test-in-ensure_bits_init.patch 2024-03-01 09:47:40.000000000 +0000 @@ -0,0 +1,37 @@ +From: Olivier Fourdan +Date: Fri, 2 Jun 2023 11:54:58 +0200 +Subject: cogl/gl-framebuffer: Fix inverted test in ensure_bits_initialized() + +Cogl's feature COGL_PRIVATE_FEATURE_QUERY_FRAMEBUFFER_BITS is required +to use the GL_FRAMEBUFFER_ATTACHMENT_* queries. + +Unfortunately, the test for the availability of the private feature is +actually inverted in ensure_bits_initialized() which causes that whole +portion of code to be ignored, falling back to the glGetIntegerv() +method which isn't supported in core profiles. + +As Mesa has recently started to be more strict about these, this causes +the CI tests to fail in mutter. + +Origin: Upstream commit 71acd891c101d6c8beadd7763a99475650d6b7c2 +Bug: https://gitlab.gnome.org/GNOME/mutter/-/issues/2848 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/2055519 +Forwarded: not-needed +Last-Update: 2024-03-01 +--- + cogl/cogl/driver/gl/cogl-gl-framebuffer-fbo.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cogl/cogl/driver/gl/cogl-gl-framebuffer-fbo.c b/cogl/cogl/driver/gl/cogl-gl-framebuffer-fbo.c +index c8db6a2..7cc5377 100644 +--- a/cogl/cogl/driver/gl/cogl-gl-framebuffer-fbo.c ++++ b/cogl/cogl/driver/gl/cogl-gl-framebuffer-fbo.c +@@ -76,7 +76,7 @@ ensure_bits_initialized (CoglGlFramebufferFbo *gl_framebuffer_fbo) + COGL_FRAMEBUFFER_STATE_BIND); + + #ifdef HAVE_COGL_GL +- if (!_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_QUERY_FRAMEBUFFER_BITS)) ++ if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_QUERY_FRAMEBUFFER_BITS)) + { + const struct { + GLenum attachment, pname; diff -Nru mutter-42.9/debian/patches/compositor-x11-Sync-again-at-the-end-of-before_paint.patch mutter-42.9/debian/patches/compositor-x11-Sync-again-at-the-end-of-before_paint.patch --- mutter-42.9/debian/patches/compositor-x11-Sync-again-at-the-end-of-before_paint.patch 1970-01-01 00:00:00.000000000 +0000 +++ mutter-42.9/debian/patches/compositor-x11-Sync-again-at-the-end-of-before_paint.patch 2024-03-01 09:47:40.000000000 +0000 @@ -0,0 +1,85 @@ +From: Daniel van Vugt +Date: Fri, 16 Feb 2024 16:57:55 +0800 +Subject: 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") + +Origin: f606a4424a5afc71672566b15f56971bfb7fa4db +Bug: https://gitlab.gnome.org/GNOME/mutter/-/issues/2880 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/2054510 +Forwarded: yes +Last-Update: 2024-02-21 +--- + src/compositor/meta-compositor-x11.c | 28 +++++++++++++++++++++++++--- + 1 file changed, 25 insertions(+), 3 deletions(-) + +diff --git a/src/compositor/meta-compositor-x11.c b/src/compositor/meta-compositor-x11.c +index ffd8ba7..0c156d4 100644 +--- a/src/compositor/meta-compositor-x11.c ++++ b/src/compositor/meta-compositor-x11.c +@@ -406,9 +406,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); + +@@ -443,6 +441,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, +@@ -470,6 +476,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 diff -Nru mutter-42.9/debian/patches/gen_default_modes-Consider-reduced-blanking-with-lower-pi.patch mutter-42.9/debian/patches/gen_default_modes-Consider-reduced-blanking-with-lower-pi.patch --- mutter-42.9/debian/patches/gen_default_modes-Consider-reduced-blanking-with-lower-pi.patch 1970-01-01 00:00:00.000000000 +0000 +++ mutter-42.9/debian/patches/gen_default_modes-Consider-reduced-blanking-with-lower-pi.patch 2024-03-01 09:47:40.000000000 +0000 @@ -0,0 +1,100 @@ +From: Kai-Heng Feng +Date: Mon, 11 Dec 2023 12:01:26 +0800 +Subject: gen_default_modes: Consider reduced blanking with lower pixelclock + +Some panels only support fixed resolutions and fixed refresh rate with reduced blanking: + Established Timings I & II: none + Standard Timings: none + Detailed Timing Descriptors: + DTD 1: 2560x1600 120.001823 Hz 8:5 203.283 kHz 552.930000 MHz (345 mm x 215 mm) + Hfront 48 Hsync 32 Hback 80 Hpol P + Vfront 3 Vsync 6 Vback 85 Vpol N + DTD 2: 2560x1600 48.000295 Hz 8:5 81.312 kHz 221.170000 MHz (345 mm x 215 mm) + Hfront 48 Hsync 32 Hback 80 Hpol P + Vfront 3 Vsync 6 Vback 85 Vpol N +... + Minimum Pixel Clock: 552922 kHz + Maximum Pixel Clock: 552922 kHz + +When using mirror mode, resolutions like 2560x1440 120Hz can be too high +to meet the pixelclock limitation, so 2560x1440 90Hz is selected +instead. However, the panel only supports 120Hz so using 90Hz result to +failed mode set. + +So add reduced blanking to fallback mode, so correct refresh rate can be +used. + +Part-of: +(cherry picked from commit 8e58aa46acf5bf5e83ba64d959a8476df1fbf7fb) +Signed-off-by: Kai-Heng Feng +--- + src/backends/native/gen-default-modes.py | 27 +++++++++++++++++++++++---- + 1 file changed, 23 insertions(+), 4 deletions(-) + +diff --git a/src/backends/native/gen-default-modes.py b/src/backends/native/gen-default-modes.py +index 79542f8..520097b 100755 +--- a/src/backends/native/gen-default-modes.py ++++ b/src/backends/native/gen-default-modes.py +@@ -19,6 +19,7 @@ + + import os + import sys ++import re + + if len(sys.argv) != 2: + print("Usage: %s [output file]"%sys.argv[0]) +@@ -93,7 +94,7 @@ def drm_mode_info_from_modeline(line): + + def portrait_drm_mode_info_from_modeline(line): + sline = line.split() +- return "{ %d, %d, %d, %d, %d, 0, %d, %d, %d, %d, 0, 0, %s, DRM_MODE_TYPE_DEFAULT, \"%dx%d_%s }," % \ ++ return "{ %d, %d, %d, %d, %d, 0, %d, %d, %d, %d, 0, 0, %s, DRM_MODE_TYPE_DEFAULT, \"%dx%d%s\" }," % \ + (int(float(sline[2]) * 1000), + int(sline[7]), + int(sline[8]), +@@ -104,15 +105,24 @@ def portrait_drm_mode_info_from_modeline(line): + int(sline[5]), + int(sline[6]), + sync_flags(sline[12], sline[11]), +- int(sline[7]), int(sline[3]), sline[1].split("_")[1]) ++ int(sline[7]), int(sline[3]), re.match(r'^"[0-9]+x[0-9]+(.*)"$', sline[1]).group(1)) + + for resolution in common_resolutions: + for refresh_rate in common_refresh_rates: + cvt = os.popen("%s %s %s %s" % ('cvt', resolution[0], resolution[1], refresh_rate)) + cvt.readline() # discard comment line + line = cvt.readline() +- output_lines.append(drm_mode_info_from_modeline(line)) + cvt.close() ++ ++ if refresh_rate % 60 == 0: ++ cvt_rb = os.popen("%s %s %s %s %s" % ('cvt', '-r', resolution[0], resolution[1], refresh_rate)) ++ cvt_rb.readline() # discard comment line ++ line_rb = cvt_rb.readline() ++ output_lines.append(drm_mode_info_from_modeline(line_rb)) ++ cvt_rb.close() ++ ++ output_lines.append(drm_mode_info_from_modeline(line)) ++ + output_lines.append("};") + + output_lines.append("") +@@ -122,8 +132,17 @@ for resolution in common_resolutions: + cvt = os.popen("%s %s %s %s" % ('cvt', resolution[0], resolution[1], refresh_rate)) + cvt.readline() # discard comment line + line = cvt.readline() +- output_lines.append(portrait_drm_mode_info_from_modeline(line)) + cvt.close() ++ ++ if refresh_rate % 60 == 0: ++ cvt_rb = os.popen("%s %s %s %s %s" % ('cvt', '-r', resolution[0], resolution[1], refresh_rate)) ++ cvt_rb.readline() # discard comment line ++ line_rb = cvt_rb.readline() ++ output_lines.append(portrait_drm_mode_info_from_modeline(line_rb)) ++ cvt_rb.close() ++ ++ output_lines.append(portrait_drm_mode_info_from_modeline(line)) ++ + output_lines.append("};") + + try: diff -Nru mutter-42.9/debian/patches/series mutter-42.9/debian/patches/series --- mutter-42.9/debian/patches/series 2023-09-11 13:39:50.000000000 +0000 +++ mutter-42.9/debian/patches/series 2024-03-01 09:47:40.000000000 +0000 @@ -14,3 +14,7 @@ backends-Move-MetaKeyboardA11yFlags-to-a-public-header.patch backends-x11-Return-zero-Hz-instead-of-nan-Hz-for-incompl.patch Revert-data-udev-Don-t-disable-KMS-modifiers-on-newer-i91.patch +gen_default_modes-Consider-reduced-blanking-with-lower-pi.patch +compositor-x11-Sync-again-at-the-end-of-before_paint.patch +build-Set-built-headers-as-libmutter_dep-sources.patch +cogl-gl-framebuffer-Fix-inverted-test-in-ensure_bits_init.patch