diff -Nru mutter-42.9/debian/changelog mutter-42.9/debian/changelog --- mutter-42.9/debian/changelog 2024-03-01 17:47:40.000000000 +0800 +++ mutter-42.9/debian/changelog 2024-04-08 16:34:38.000000000 +0800 @@ -1,3 +1,11 @@ +mutter (42.9-0ubuntu8) jammy; urgency=medium + + * Add fullscreen-maximize to tests-Tag-unstable-tests-as-flaky.patch + * Add compositor-sync-ring-Allow-the-gpu_fence-to-be-moved.patch to + fix lag and freezes on the Nvidia Xorg driver (LP: #2059847) + + -- Daniel van Vugt Mon, 08 Apr 2024 16:34:38 +0800 + mutter (42.9-0ubuntu7) jammy; urgency=medium * Add build-Set-built-headers-as-libmutter_dep-sources.patch to prevent diff -Nru mutter-42.9/debian/patches/compositor-sync-ring-Allow-the-gpu_fence-to-be-moved.patch mutter-42.9/debian/patches/compositor-sync-ring-Allow-the-gpu_fence-to-be-moved.patch --- mutter-42.9/debian/patches/compositor-sync-ring-Allow-the-gpu_fence-to-be-moved.patch 1970-01-01 08:00:00.000000000 +0800 +++ mutter-42.9/debian/patches/compositor-sync-ring-Allow-the-gpu_fence-to-be-moved.patch 2024-04-08 16:30:48.000000000 +0800 @@ -0,0 +1,53 @@ +From: Daniel van Vugt +Date: Wed, 3 Apr 2024 16:58:13 +0800 +Subject: compositor/sync-ring: Allow the gpu_fence to be moved + +When the compositor inserts two waits in a frame, such as f606a4424a5afc, +the second insertion shouldn't break the ring's state machine as easily +as it does. We can instead merge the two GL waits into one by simply moving +the GL fence to the latest insertion. Each insertion still does its own X11 +sync though. + +Origin: Upstream commit 22689d722ab4e13ab272c3534f5d18a55c94084f +Bug: https://gitlab.gnome.org/GNOME/mutter/-/issues/3384 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/2059847 +--- + src/compositor/meta-sync-ring.c | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +diff --git a/src/compositor/meta-sync-ring.c b/src/compositor/meta-sync-ring.c +index 917bf12..a7cf1d2 100644 +--- a/src/compositor/meta-sync-ring.c ++++ b/src/compositor/meta-sync-ring.c +@@ -551,20 +551,29 @@ gboolean + meta_sync_ring_insert_wait (void) + { + MetaSyncRing *ring = meta_sync_ring_get (); ++ MetaSync *sync; + + if (!ring) + return FALSE; + + g_return_val_if_fail (ring->xdisplay != NULL, FALSE); + +- if (ring->current_sync->state != META_SYNC_STATE_READY) ++ sync = ring->current_sync; ++ ++ if (sync->state == META_SYNC_STATE_WAITING) ++ { ++ meta_gl_delete_sync (sync->gpu_fence); ++ sync->gpu_fence = 0; ++ sync->state = META_SYNC_STATE_READY; ++ } ++ else if (sync->state != META_SYNC_STATE_READY) + { + meta_warning ("MetaSyncRing: Sync object is not ready -- were events handled properly?"); + if (!meta_sync_ring_reboot (ring->xdisplay)) + return FALSE; + } + +- meta_sync_insert (ring->current_sync); ++ meta_sync_insert (sync); + + return TRUE; + } diff -Nru mutter-42.9/debian/patches/debian/tests-Tag-unstable-tests-as-flaky.patch mutter-42.9/debian/patches/debian/tests-Tag-unstable-tests-as-flaky.patch --- mutter-42.9/debian/patches/debian/tests-Tag-unstable-tests-as-flaky.patch 2024-03-01 17:47:40.000000000 +0800 +++ mutter-42.9/debian/patches/debian/tests-Tag-unstable-tests-as-flaky.patch 2024-04-08 16:30:48.000000000 +0800 @@ -8,9 +8,9 @@ Forwarded: not-needed --- - src/tests/clutter/conform/meson.build | 6 +++++- - src/tests/meson.build | 4 +++- - 2 files changed, 8 insertions(+), 2 deletions(-) + src/tests/clutter/conform/meson.build | 6 +++++- + src/tests/meson.build | 14 ++++++++++++-- + 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/tests/clutter/conform/meson.build b/src/tests/clutter/conform/meson.build index 83aa7a0..f0c57cb 100644 @@ -31,10 +31,10 @@ is_parallel: false, ) diff --git a/src/tests/meson.build b/src/tests/meson.build -index ae8c0ca..572acac 100644 +index c68c43a..563f45f 100644 --- a/src/tests/meson.build +++ b/src/tests/meson.build -@@ -193,6 +193,7 @@ test_cases += [ +@@ -195,6 +195,7 @@ test_cases += [ }, { 'name': 'stage-views', @@ -42,7 +42,7 @@ 'suite': 'compositor', 'sources': [ 'stage-view-tests.c', ], }, -@@ -318,7 +319,8 @@ if have_native_tests +@@ -322,7 +323,8 @@ if have_native_tests ) test(test_case['name'], test_executable, @@ -52,3 +52,22 @@ env: test_env, is_parallel: false, timeout: 60, +@@ -361,9 +363,17 @@ stacking_tests = [ + 'map-on-hotplug', + ] + ++flaky_stacking_tests = [ ++ 'fullscreen-maximize', ++] ++ + foreach stacking_test: stacking_tests ++ extra_suites = [] ++ if (flaky_stacking_tests.contains(stacking_test)) ++ extra_suites += 'flaky' ++ endif + test(stacking_test, test_runner, +- suite: ['core', 'mutter/stacking'], ++ suite: ['core', 'mutter/stacking'] + extra_suites, + env: test_env, + args: [ + files(join_paths('stacking', stacking_test + '.metatest')), diff -Nru mutter-42.9/debian/patches/series mutter-42.9/debian/patches/series --- mutter-42.9/debian/patches/series 2024-03-01 17:47:40.000000000 +0800 +++ mutter-42.9/debian/patches/series 2024-04-08 16:30:48.000000000 +0800 @@ -18,3 +18,4 @@ 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 +compositor-sync-ring-Allow-the-gpu_fence-to-be-moved.patch