From 1a1f1eccbaeded8fd42b5157b83e3ab87722f90d Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 25 Nov 2020 10:08:06 +0000 Subject: [PATCH] clutter/frame-clock: Schedule a frame at least once per second Users of Debian arm64 (aarch64) report that on at least some GPUs or screens, after time-based screen blanking has occurred, it is not possible to unlock the screen. Bisection indicates that this regressed in commit 209b1ba3, so presumably this is because a refresh rate of 0 is reported while the screen is blanked, leading to the frame clock pausing forever. Fixes: 209b1ba3 "clutter/frame-clock: Adapt refresh rate from to frame info" Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1536 Bug-Debian: https://bugs.debian.org/974172 Signed-off-by: Simon McVittie Part-of: --- clutter/clutter/clutter-frame-clock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clutter/clutter/clutter-frame-clock.c b/clutter/clutter/clutter-frame-clock.c index 3f3b9d9d8..355a2c00f 100644 --- a/clutter/clutter/clutter-frame-clock.c +++ b/clutter/clutter/clutter-frame-clock.c @@ -197,7 +197,8 @@ clutter_frame_clock_notify_presented (ClutterFrameClock *frame_clock, frame_clock->last_presentation_time_us = g_get_monotonic_time (); } - frame_clock->refresh_rate = frame_info->refresh_rate; + if (frame_info->refresh_rate > 1) + frame_clock->refresh_rate = frame_info->refresh_rate; switch (frame_clock->state) {