Open Bug 1820758 Opened 2 years ago Updated 1 year ago

[Wayland] Firefox flickers in fullscreen when system has fractional scaling enabled

Categories

(Core :: Widget: Gtk, defect, P3)

Firefox 110
defect

Tracking

()

UNCONFIRMED

People

(Reporter: mokacchi+bugzilla, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0

Steps to reproduce:

  1. Use a KDE+Wayland system with fractional scaling enabled (say 150%)
  2. Open firefox with the MOZ_ENABLE_WAYLAND=1 flag,
  3. Enter fullscreen on a scrollable website
  4. Scroll down a bit, then move the cursor around

Actual results:

Firefox starts to flicker. It looks like an "old render" from a couple seconds ago appears for brief moments. Basically, if you scroll down and move the cursor, you'll see the topmost part (the part you scrolled away from) pop in for brief moments.

If you then wait a couple seconds and move the cursor again, the problem appears gone, because the flickering image is the same as the website part you are on right now.
If you then scroll down further and repeat again, you'll see that part appear as part of the flickering.

tl:dr the image popping in as part of the flickering is always the rendered viewport from 5-10 seconds ago.

  • The flickering does not appear when scaling in KDE is set to 100%
  • It does not appear outside of Firefox fullscreen mode
  • It does not appear in an Xorg session

Expected results:

There should be no flickering in fullscreen with fractional scaling.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

I can probably reproduce the same issue on my system, but for me it is most noticeable on video playback. As soon as I start a full-screen video and move the cursor it becomes very jittery and the cursor size changes rapidly.
I am also using KDE Wayland on Arch Linux and this behaviour is not happening in other browsers like chromium, which makes me believe it is indeed a bug specific to Firefox in combination with the latest KDE Plasma on Wayland.
I am using a dual monitor setup and only the display with 150% scaling is experiencing this issue.
It was working just fine before Plasma 5.27 afair so it could also be a problem on the KDE side.

Hi - could you attach your about:support info? ("Copy text to clipboard" -> paste here -> bugzilla will offer to create an attachment -> yes)

Flags: needinfo?(mokacchi+bugzilla)
Attached file about:support

Comment on attachment 9325053 [details]
about:support

I am sharing mine since it is likely the same issue, but OP should share his info as well! I actually didn't want to send my report just yet, but didn't know creating the attachment actually uploads it directly, so here it is!

Thanks. I don't spot anything suspicious there, but I also can't repro on my local AMD setup (haven't yet tested kwin though). So what would be important to know is whether something similar happens on Gnome or a wlroots based compositor - there's actually a high chance that this is a kwin bug, not a Firefox one.

Do you think you could test that?

I tested my display configuration on KDE Neon Wayland with a live USB and got the same issue.

On an Ubuntu 22.04.2 LTS live USB with Wayland I did not get the issue.
Same display configuration + scaling and running firefox with MOZ_ENABLE_WAYLAND=1.
I can also reproduce this issue on my Arch installation using Falkon, but Chromium does not seem to be affected.
Disabling Hardware Acceleration in Firefox "fixes" the stutter but has other side effects and is not really a solution to the problem.

It looks like this could indeed be a kwin specific problem, which makes sense since it started occuring once I upgraded to the Plasma 5.27 beta.

I also just found this reddit post with other people having graphical issues:
https://www.reddit.com/r/kde/comments/115dppv/527_kwin_seems_to_be_buggy_on_150_wayland/

So your assumption is probably right and there nothing to do about that on the Firefox side.

Thanks for testing!
In case you open a bug at https://bugs.kde.org/, feel free to link to the issue here (in both directions) - it probably makes sense to keep track of the issue on our side as well to avoid duplicate issues.

Flags: needinfo?(mokacchi+bugzilla)
Attached file about:support text
I'm terribly sorry for the wait, I haven't been on Linux since opening the bug report. It's still happening though - here's my about:support report:
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: