Closed Bug 1585314 Opened 5 years ago Closed 4 years ago

[Wayland] Entire window flickers, showing underlying desktop/applications, when resizing window on sway

Categories

(Core :: Widget: Gtk, defect)

71 Branch
Desktop
Linux
defect
Not set
normal

Tracking

()

RESOLVED MOVED

People

(Reporter: nagisa, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Firefox window flickers during resizing when running on Sway.

Continuation of https://bugzilla.mozilla.org/show_bug.cgi?id=1574036, which seems to have fixed the issue on Ubuntu, but not on Sway.

Is that only with resize? Do you see any artifacts when you play youtube video and open urlbar popup over it?

Flags: needinfo?(simonas+bugzilla.mozilla.org)

You mean playing a non-full screen vid then opening the url bar autocomplete thing over it? No funny business on my end (70.0~b11+build1-0ubuntu0.19.04.1)

Can confirm, actions involving the auto-completion and a Youtube video in various situations appears to look fine.

Flags: needinfo?(simonas+bugzilla.mozilla.org)

Perhaps unrelated, however, I see similar kind of flickering when pop-ups are too large to fit within a window

For what it's worth: running sway with -Dnoatomic flag will prevent this flickering.

(In reply to josip from comment #5)

For what it's worth: running sway with -Dnoatomic flag will prevent this flickering.

I can confirm this with 72.0b2 and latest Sway git-master. To instantly reproduce, make the Firefox window floating via $mod + Shift + Space and resize it via $mod + right mouse button.

Is this an issue of Firefox or Sway?

Do you use webrender or basic compositor? Also can you try both?
Thanks.

Flags: needinfo?(simonas+bugzilla.mozilla.org)

It does happen for both:
Webrender video
Basic video

Yes, happens with both WR and basic.

Flags: needinfo?(simonas+bugzilla.mozilla.org)

Fixed by https://github.com/swaywm/sway/pull/5403.

The issue was that the buffer save logic used during resize transactions (a concept needed to have "perfect" tile grid resizing) did not respect subsurfaces.

As Firefox's setup where the browser is a giant subsurface stacked onto the native Gtk surface is rather unusual, Firefox was the primary (if not only) victim of full-window misrendering like this.

(The noted flickering popups might not be related, but please report that separately if it still occurs on sway master.)

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Resolution: FIXED → MOVED

(In reply to Kenny Levinsen :kennylevinsen from comment #11)

Fixed by https://github.com/swaywm/sway/pull/5403.

Does not appear to be true. Just built a new version of sway just now (1.4-f8dd7df1 (Jun 3 2020, branch 'master'), includes the referenced PR) and the floating windows still flicker all the same way as it did before, except now the background is black, rather than showing the underlying windows (presumably because firefox now sets the opaque region properly)

  1. Did you build also build wlroots master? sway master and wlroots master go hand in hand. On Arch, sway-git and wlroots-git from AUR will do the trick and handle dependency order. Otherwise, remember to build and install wlroots first.
  2. What firefox version? I have tested 78.0a1.20200601-1 (from AUR) and 76.0.1 (from pacman), with webrender and wayland vsync.
  3. Any exotic configuration? (e.g., any wayland about:config options set, webrender/opengl/basic compositor, ...).

We have several confirmed fixes in the sway IRC channels (myself included), and that's with stable reproduction before the PR (content always disappears as fully transparent, or if resizing slow enough, flickers during resize) and nothing at all after. We don't have any reports for the content going black.

Flags: needinfo?(simonas+bugzilla.mozilla.org)
  1. Yes.
  2. Nightly from yesterday
  3. Firefox is using wayland here (as opposed to xwayland) as informed to do so via an environment variable. I do not have any wayland/webrender/acceleration options set in about:config (at least as per about:support). Can reproduce this still with all of the Basic/OpenGL/WebRender compositors. All the modified preferences appear to be unrelated to graphics and mostly contain preference stuff like print settings addon stuff etc.

Interestingly, I’m not able to reproduce it on a fresh profile, but I’m also not too interested in starting with a fresh profile at the moment.

Flags: needinfo?(simonas+bugzilla.mozilla.org)

Have you tried to enable firefox sync then refresh firefox or create a new profile and sync your settings back? As far as I can tell this problem is localized to you now.

(In reply to Simonas Kazlauskas [:nagisa/:simukis] from comment #14)

  1. Yes.
  2. Nightly from yesterday
  3. Firefox is using wayland here (as opposed to xwayland) as informed to do so via an environment variable. I do not have any wayland/webrender/acceleration options set in about:config (at least as per about:support). Can reproduce this still with all of the Basic/OpenGL/WebRender compositors. All the modified preferences appear to be unrelated to graphics and mostly contain preference stuff like print settings addon stuff etc.

Interestingly, I’m not able to reproduce it on a fresh profile, but I’m also not too interested in starting with a fresh profile at the moment.

Odd, but based on your description, this very much sounds like a different issue triggered by something in your profile (theme?), unrelated to the original transparency glitches all sway users experienced.

If you end up having a reproduction of some sort, opening a new issue for that would probably be a good idea.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: