[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1052229: bookworm-pu: gnome-shell/43.9-0+deb12u1



Control: retitle -1 bookworm-pu: gnome-shell/43.9-0+deb12u1

On Sat, 23 Sep 2023 at 20:45:51 +0100, Adam D. Barratt wrote:
> On Tue, 2023-09-19 at 11:40 +0100, Simon McVittie wrote:
> > Several new upstream bugfix releases.
>
> Please go ahead.

The version I've uploaded has one additional change from upstream
(attached) since the version that Adam saw. I have been testing this
on bookworm GNOME machines in my household for a couple of weeks with
no obvious regressions. An updated full diff between patched trees in
12.2 and the uploaded version, filtered to exclude the patches themselves
and translations, is also attached.

The revised version is functionally equivalent to the one labelled
b1c065d1 in <https://people.debian.org/~smcv/12.3/pool/main/g/gnome-shell/>,
which replaced my earlier test-build. I've confirmed with debdiff that
the only difference is the changelog.

Reason for the new change: when there is a single opaque full-screen
window like a game or a video player, the Shell is meant to let that
window scan-out directly to the screen ("unredirection") instead of
going through non-trivial compositor code, which minimizes latency and
maximizes rendering performance. This mechanism needs to be disabled
when in the zoomed-out overview mode (Windows key), and re-enabled
when leaving the overview. For whatever reason, re-enabling it when
leaving the overview wasn't 100% reliable, causing reduced performance
after a while. The change backported from 44.5-2 integrates this with
a state machine that already needed to exist for other reasons, so that
unredirection is enabled whenever it can safely be enabled.

Impact if the new change is not accepted: worse latency and rendering
performance for full screen games/videos/etc. after a while, and perhaps
also worse power consumption.

There's also some minor rewording in the changelog to clarify that all
changes were also part of 44.5-2 in testing/unstable.

I can revert the additional change as a 43.9-0+deb12u2 if it becomes
necessary, but I hope it won't be.

Thanks,
    smcv
From: "robert.mader@collabora.com" <robert.mader@collabora.com>
Date: Wed, 27 Sep 2023 01:10:45 +0200
Subject: overview: Handle unredirection in OverviewShown state machine

Under certain unknown circumstances currently not every
`disable_unredirect_for_display()` gets matched with an
`enable_unredirect_for_display()` when closing the overview.

As we only want to not disable unredirection when hidden and we nowadays
have a state machine that ensures we transition to and from one state to
another only once, handle unredirection en-/disablement as part of the
state transition.

(cherry picked from commit a94fcee9616ef52d0f1d6453515a104d69c6cb92)

Bug: https://gitlab.gnome.org/GNOME/mutter/-/issues/2994
Origin: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2970
Applied-upstream: 43.10, commit:3b921ba0cb28c38ff5b7faba2dfe446cbc845bb4
---
 js/ui/overview.js | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/js/ui/overview.js b/js/ui/overview.js
index 757a8e4..bf3ffca 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -296,6 +296,11 @@ var Overview = class extends Signals.EventEmitter {
                 `${this._shownState} to ${state}`);
         }
 
+        if (this._shownState === OverviewShownState.HIDDEN)
+            Meta.disable_unredirect_for_display(global.display);
+        else if (state === OverviewShownState.HIDDEN)
+            Meta.enable_unredirect_for_display(global.display);
+
         this._shownState = state;
         this.emit(OVERVIEW_SHOWN_TRANSITIONS[state].signal);
     }
@@ -402,8 +407,6 @@ var Overview = class extends Signals.EventEmitter {
 
     _gestureUpdate(tracker, progress) {
         if (!this._shown) {
-            Meta.disable_unredirect_for_display(global.display);
-
             this._shown = true;
             this._visible = true;
             this._visibleTarget = true;
@@ -559,8 +562,6 @@ var Overview = class extends Signals.EventEmitter {
         this._visibleTarget = true;
         this._activationTime = GLib.get_monotonic_time() / GLib.USEC_PER_SEC;
 
-        Meta.disable_unredirect_for_display(global.display);
-
         Main.layoutManager.overviewGroup.set_child_above_sibling(
             this._coverPane, null);
         this._coverPane.show();
@@ -627,9 +628,6 @@ var Overview = class extends Signals.EventEmitter {
     }
 
     _hideDone() {
-        // Re-enable unredirection
-        Meta.enable_unredirect_for_display(global.display);
-
         this._coverPane.hide();
 
         this._visible = false;
@@ -679,8 +677,6 @@ var Overview = class extends Signals.EventEmitter {
         // the animation because of a race in the xserver where the grab
         // fails when requested very early during startup.
 
-        Meta.disable_unredirect_for_display(global.display);
-
         this._changeShownState(OverviewShownState.SHOWING);
 
         this._overview.runStartupAnimation(() => {

Attachment: gnome-shell_43.9-0+deb12u1_b1c065d1.diff.gz
Description: application/gzip


Reply to: