Sway: Firefox on Wayland fullscreen flashes background

Created on 8 Feb 2019  Â·  14Comments  Â·  Source: swaywm/sway

sway version 1.0-rc1-37-gf5190d1f (Feb 8 2019, branch 'master')

I'm seeing a weird issue where, when I full screen Firefox nightly (running natively in wayland), every so often before the window goes into full screen mode, the background (wallpaper) flashes across the entire screen. I've not seen this happen with other programs. Is this a Firefox bug or a Sway one?

I can reproduce by full screening Firefox, I'd say, approx. 1 in 10 times. This seems similar to #1437, but since that is claimed to have been fixed (per #1344), I'm reporting as a separate issue.

bug

Most helpful comment

oh, and i forgot to mention: very noticable:
when im in chromium in fullscreen mode and hover over a link (not any link but many, and not consistantly - sometimes there is no problem; just now it was a problem on github.com/swaywm/sway/issues hovering over an issue title link or issue tag but not over the links on the bottom of the page (Terms etc)) the fullscreen mode deactivates until i move the cursor away from the link (which i cannot see as fullscreen mode deactivated)
(i also have alacritty terminal in split mode open)

All 14 comments

Maybe a bug in the atomic fullscreen code. Or maybe Firefox takes too long to render and we decide to move on.

Can you post a debug log?

Attached.

sway.log

Looks like a sway bug

Can you still reproduce?

I can still reproduce on sway 1.4, wlroots 0.10.0, firefox 72.0.2.

With the latest Firefox nightly and latest sway, this has gotten worse. Now the background flash happens even when opening or closing a tab. (does not happen with all webpages, but happens quite frequently)

2020-02-23 23:45:35 - [xwayland/selection/outgoing.c:366] XCB_SELECTION_REQUEST (time=7711530 owner=2097153, requestor=6291477 selection=272, target=274, property=386)
2020-02-23 23:45:35 - [xwayland/selection/outgoing.c:394] denying read access to selection 272 (CLIPBOARD): no xwayland surface focused
2020-02-23 23:45:35 - [xwayland/selection/outgoing.c:25] SendEvent destination=6291477 SelectionNotify(31) time=7711530 requestor=6291477 selection=272 target=274 property=0
2020-02-23 23:45:35 - [xwayland/selection/outgoing.c:366] XCB_SELECTION_REQUEST (time=7664066 owner=2097153, requestor=8388618 selection=272, target=274, property=386)
2020-02-23 23:45:35 - [xwayland/selection/outgoing.c:394] denying read access to selection 272 (CLIPBOARD): no xwayland surface focused
2020-02-23 23:45:35 - [xwayland/selection/outgoing.c:25] SendEvent destination=8388618 SelectionNotify(31) time=7664066 requestor=8388618 selection=272 target=274 property=0
2020-02-23 23:45:35 - [xwayland/selection/outgoing.c:366] XCB_SELECTION_REQUEST (time=7711530 owner=2097153, requestor=6291477 selection=272, target=274, property=386)
2020-02-23 23:45:35 - [xwayland/selection/outgoing.c:394] denying read access to selection 272 (CLIPBOARD): no xwayland surface focused
2020-02-23 23:45:35 - [xwayland/selection/outgoing.c:25] SendEvent destination=6291477 SelectionNotify(31) time=7711530 requestor=6291477 selection=272 target=274 property=0
2020-02-23 23:45:35 - [xwayland/selection/outgoing.c:366] XCB_SELECTION_REQUEST (time=7664066 owner=2097153, requestor=8388618 selection=272, target=274, property=386)
2020-02-23 23:45:35 - [xwayland/selection/outgoing.c:394] denying read access to selection 272 (CLIPBOARD): no xwayland surface focused
2020-02-23 23:45:35 - [xwayland/selection/outgoing.c:25] SendEvent destination=8388618 SelectionNotify(31) time=7664066 requestor=8388618 selection=272 target=274 property=0
2020-02-23 23:45:35 - [sway/desktop/transaction.c:376] Transaction 0x5642a08aec50 timed out (3 waiting)
2020-02-23 23:45:35 - [sway/desktop/transaction.c:280] Applying transaction 0x5642a08aec50

etc.

Can sort of confirm, last Firefox Nightly flickers every time at tab switching and opening a new tab. But it flickers with previous tab content, not wallpaper. Additional notices: it goes more actively when I move a cursor and stops when I start scroll something (but only if page really scrolls, it doesn't stop when page fits the screen and I try scrolling). Flickering stops within a few seconds sometimes. Also similar flickering bug noticed at some other applications (Telegram Desktop as example), but not that annoying - mostly with input fields. Also no error stuff seen in terminal if apps launched from it.
Sway v1.4, wlroots v0.10.1, firefox 75.0b4

Another thing which seems to trigger flashes of the background behind firefox is desktop notifications (e.g. the song changing on spotify).

It seemed consistent until I played a bit with notify-send which seems to have stopped the flashing for a while.

sway-1.4-3.module_f31+7694+72cbf402.x86_64
wlroots-0.10.0-6.module_f31+8009+6f8c9768.x86_64
firefox-74.0-3.fc31.x86_64
xfce4-notifyd-0.4.4-2.fc31.x86_64

I can reproduce reliably by having Firefox opened on one screen and opening a terminal on the other one. This will make Firefox flash the background.

This only happens with MOZ_ENABLE_WAYLAND=1.

Huh, I've managed to figure out another scenario where I can reliably reproduce the flashing for me. It seems that when the window title is changed to something with unusual[1] characters, the screen flashes.

This can happen when either navigating to a page with them, when switching to a tab, or simply by running: document.title = " ᕙ〳 ʘ – ʘ 〵ᕗ" (just paste that into the inspector tab).

There's a huge catch though! If any other existing window has a title with these, the blinking does not happen. It seems the blinking happens when the "amount of windows with these characters" switches from 0 to 1 or vice-versa. Changing from 1 to 2 does not trigger a flash.

[1] by unusual characters, it seems to be mostly extended unicode characters like the ones in this example. Korean text seems to trigger the same thing. However, emojis do not trigger this.

Huh, I've managed to figure out another scenario where I can reliably reproduce the flashing for me. It seems that when the window title is changed to something with unusual[1] characters, the screen flashes.

This can happen when either navigating to a page with them, when switching to a tab, or simply by running: document.title = " ᕙ〳 ʘ – ʘ 〵ᕗ" (just paste that into the inspector tab).

There's a huge catch though! If any other existing window has a title with these, the blinking does not happen. It seems the blinking happens when the "amount of windows with these characters" switches from 0 to 1 or vice-versa. Changing from 1 to 2 does not trigger a flash.

[1] by unusual characters, it seems to be mostly extended unicode characters like the ones in this example. Korean text seems to trigger the same thing. However, emojis do not trigger this.

In this case, this is due to the size of the titlebar changing, which resizes the Firefox window. For some reason, resizing a Wayland Firefox window in sway makes it flash like this. In Weston, instead of flashing, it simply seems jittery instead.

Your mention of the titlebar changing size made me curious about how other apps behave with this. I:

  1. Opened two terminals (termite) is tabbed layout.
  2. On one of them, ran vim "ᕙ〳 ʘ – ʘ 〵ᕗ"

I did get some jittering as the titlebar changed size (and for a fraction of a second, can see a small bit of the wallpaper on top). I wonder if this is a related issue or not.

similar issue with chromium: sometimes what's "behind" the fullscreen view flickers through/the fullscreen mode flickers which is very anoying. cannot reproduce all the time but happens very often and somehow i cannot record this behaviour with wf-recorder or grimshot...

often happens in this scenario:

  1. chromium (i believe it also happened with evince, other apps i dont use in fullscreen so idk) and some alacritty terminals are on the same workspace in split mode
  2. cursor moves across the part of the screen where a window border (especially the one between the browser and the other window, but also happens with the titlebar sometimes) lies beneath (to reproduce move your cursor where the windows touch and then go into fullscreen mode)
  3. slightly move the cursor or scroll (i use a touchpad if thats relevant?)
  4. fullscreen mode starts flickering

sometimes you just need to scroll in fullscreen mode and it starts flickering

especially noticable when cursor is over certain elements of the browser: the edges of the back and forward buttons and the edges of the bookmarks if you use the bookmark bar

ps: fullscreen mode has even more problems for me: if i use virtualbox in fullscreen mode there is horrible colorful fractures if some parts of the screen chage rapidly (i guess): for example when i play a video or scroll. this makes using virtualbox in fullscreen mode unusable.

oh, and i forgot to mention: very noticable:
when im in chromium in fullscreen mode and hover over a link (not any link but many, and not consistantly - sometimes there is no problem; just now it was a problem on github.com/swaywm/sway/issues hovering over an issue title link or issue tag but not over the links on the bottom of the page (Terms etc)) the fullscreen mode deactivates until i move the cursor away from the link (which i cannot see as fullscreen mode deactivated)
(i also have alacritty terminal in split mode open)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

soymjolk picture soymjolk  Â·  3Comments

jakubn551 picture jakubn551  Â·  4Comments

aidanharris picture aidanharris  Â·  3Comments

DpoBoceka picture DpoBoceka  Â·  4Comments

ghost picture ghost  Â·  4Comments