Control: retitle -1 bookworm-pu: mutter/43.8-0+deb12u1 On Sun, 24 Sep 2023 at 11:31:45 +0100, Simon McVittie wrote: > I have been asked to roll one additional change into this update: updating > the (non-upstream) triple-buffering patch to its latest version
There have been a couple of further revisions to the triple-buffering patchset since the version Adam saw, which are included in the version that I have now uploaded: - Fix increased mouse input latency after resolving LP 2017137, LP 2017097 (LP: #2023363) - Fix mouse cursor stuttering when moving across animated UI elements (LP: #2023766) The new changes are attached. I have also switched from applying the triple-buffering patchset as a single large patch to putting it in the form of individual commits in debian/patches/triple-buffering/ (I verified that this did not change the patched tree), and re-worded the changelog to expand on which patch does what and what newer versions in unstable/experimental also have it. An updated full debdiff between patched trees (12.2 to proposed version) is also attached, filtered to exclude the patches themselves. The version I uploaded is functionally equivalent to the one labelled 69d27b60 in <https://people.debian.org/~smcv/12.3/pool/main/m/mutter/>, which I've been testing for about 2 weeks on my household's bookworm machines with no obvious regressions. I have confirmed using debdiff that there is no difference other than the changelog. If the new changes cause any problems, then I can upload a 43.8-0+deb12u2 that reverts or adjusts them. Thanks, smcv
From: Daniel van Vugt <daniel.van.v...@canonical.com> Date: Wed, 14 Jun 2023 19:49:29 +0800 Subject: clutter/frame-clock: Avoid rapidly toggling dynamic max render time This could happen when moving the cursor over GUIs that only redraw in response to cursor movement. Mutter would experience alternating cursor-only updates and page flips, and so the `max_render_time_allowed_us` would jump between pessimised and optimised resulting in inconsistent frame pacing. Aside from fixing the smoothness problem this should also provide lower latency cursor movement. Fixes: https://launchpad.net/bugs/2023766 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3074> (cherry picked from commit be0aa2976e19f4a6b91bd90ce3942d6b107af7c0) Origin: https://gitlab.gnome.org/Community/Ubuntu/mutter/-/commits/triple-buffering-v4-43 --- clutter/clutter/clutter-frame-clock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clutter/clutter/clutter-frame-clock.c b/clutter/clutter/clutter-frame-clock.c index f89db25..e7c67a7 100644 --- a/clutter/clutter/clutter-frame-clock.c +++ b/clutter/clutter/clutter-frame-clock.c @@ -109,6 +109,7 @@ struct _ClutterFrameClock EstimateQueue swap_to_flip_us; /* If we got new measurements last frame. */ gboolean got_measurements_last_frame; + gboolean ever_got_measurements; gboolean pending_reschedule; gboolean pending_reschedule_now; @@ -315,6 +316,7 @@ clutter_frame_clock_notify_presented (ClutterFrameClock *frame_clock, swap_to_flip_us); frame_clock->got_measurements_last_frame = TRUE; + frame_clock->ever_got_measurements = TRUE; } else { @@ -389,7 +391,7 @@ clutter_frame_clock_compute_max_render_time_us (ClutterFrameClock *frame_clock) refresh_interval_us = frame_clock->refresh_interval_us; - if (!frame_clock->got_measurements_last_frame || + if (!frame_clock->ever_got_measurements || G_UNLIKELY (clutter_paint_debug_flags & CLUTTER_DEBUG_DISABLE_DYNAMIC_MAX_RENDER_TIME)) {
From: Daniel van Vugt <daniel.van.v...@canonical.com> Date: Tue, 18 Jul 2023 16:08:25 +0800 Subject: clutter/frame-clock: Record measurements of zero for cursor-only updates But only if we've ever got actual swap measurements (COGL_FEATURE_ID_TIMESTAMP_QUERY). If it's supported then we now drop to double buffering and get optimal latency on a burst of cursor-only updates. Fixes: https://launchpad.net/bugs/2023363 Origin: https://gitlab.gnome.org/Community/Ubuntu/mutter/-/commits/triple-buffering-v4-43 --- clutter/clutter/clutter-frame-clock.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/clutter/clutter/clutter-frame-clock.c b/clutter/clutter/clutter-frame-clock.c index e7c67a7..7b00041 100644 --- a/clutter/clutter/clutter-frame-clock.c +++ b/clutter/clutter/clutter-frame-clock.c @@ -287,19 +287,27 @@ clutter_frame_clock_notify_presented (ClutterFrameClock *frame_clock, frame_clock->got_measurements_last_frame = FALSE; - if (frame_info->cpu_time_before_buffer_swap_us != 0 && - frame_info->gpu_rendering_duration_ns != 0) + if ((frame_info->cpu_time_before_buffer_swap_us != 0 && + frame_info->gpu_rendering_duration_ns != 0) || + frame_clock->ever_got_measurements) { int64_t dispatch_to_swap_us, swap_to_rendering_done_us, swap_to_flip_us; - dispatch_to_swap_us = - frame_info->cpu_time_before_buffer_swap_us - - frame_clock->last_dispatch_time_us; + if (frame_info->cpu_time_before_buffer_swap_us == 0) + { + /* Cursor-only updates with no "swap" or "flip" */ + dispatch_to_swap_us = 0; + swap_to_flip_us = 0; + } + else + { + dispatch_to_swap_us = frame_info->cpu_time_before_buffer_swap_us - + frame_clock->last_dispatch_time_us; + swap_to_flip_us = frame_clock->last_flip_time_us - + frame_info->cpu_time_before_buffer_swap_us; + } swap_to_rendering_done_us = frame_info->gpu_rendering_duration_ns / 1000; - swap_to_flip_us = - frame_clock->last_flip_time_us - - frame_info->cpu_time_before_buffer_swap_us; CLUTTER_NOTE (FRAME_TIMINGS, "%s: dispatch2swap %ld µs, swap2render %ld µs, swap2flip %ld µs",
mutter_43.8-0+deb12u1_69d27b60.diff.gz
Description: application/gzip