Open Bug 1847040 Opened 1 year ago Updated 2 months ago

Firefox / elements on page Flashing / Blinking (before Windows 11 build 22621.3672 and 22631.3672)

Categories

(Core :: Graphics: WebRender, defect, P1)

Firefox 115
defect

Tracking

()

Tracking Status
firefox-esr102 --- unaffected
firefox-esr115 --- affected
firefox116 --- wontfix
firefox117 --- wontfix
firefox118 --- fix-optional

People

(Reporter: silverlink, Assigned: ahale)

References

(Blocks 1 open bug)

Details

(Keywords: nightly-community, regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0

Steps to reproduce:

Browsing the web, looking into settings etc.

Actual results:

Websites have a weird tendency to flash / blink their UI elements. This also happens when looking in settings or add-ons. Sometimes you need to scroll to see it happen, sometimes it happens when the page loads and sometimes hovering over stuff makes this happen.

This issue is there since Firefox 115 and I had never this issue in Firefox 114 and lower.

When starting safe mode this problem seems not to be there.

What I've tried and not work:
• Nvidia Driver update (RTX 2080 Super)
• Portable Firefox
• New Profile
• Refresh of Firefox
• Clear startup cache
• Clear cache in general
• Disabling all add-ons

What works:
• Safe Mode
• Downgrading to Firefox 114

Included a video (Sorry for the quality, I hate recording videos of monitors) of what happens. If I use ShareX to record the problem the problem does not record weirdly enough, while it does happen.

Expected results:

Websites and Firefox working properly.

Component: Untriaged → Graphics: WebRender
Product: Firefox → Core

Hi,

  1. Can you attach the contents of your about:support to this bug
  2. Is it possible for you to use https://mozilla.github.io/mozregression/ (you can use the GUI version of this tool) to bisect help identify the change that would have caused this issue for you?
Flags: needinfo?(silverlink)
Attached file About-Support.txt

I have done the mozregression a couple of times and each time a different answer comes out.
But I think maybe this could be the culprit?

2023-08-03T22:57:57.533000: INFO : Narrowed integration regression window from [ac0305ca, 55a23985] (3 builds) to [e666f50a, 55a23985] (2 builds) (~1 steps left)
2023-08-03T22:57:57.541000: DEBUG : Starting merge handling...
2023-08-03T22:57:57.546000: DEBUG : Using url: https://hg.mozilla.org/integration/autoland/json-pushes?changeset=55a239852ac844f5fd07a5866b4455ba946603d2&full=1
2023-08-03T22:57:57.546000: DEBUG : redo: attempt 1/3
2023-08-03T22:57:57.547000: DEBUG : redo: retry: calling _default_get with args: ('https://hg.mozilla.org/integration/autoland/json-pushes?changeset=55a239852ac844f5fd07a5866b4455ba946603d2&full=1',), kwargs: {}, attempt #1
2023-08-03T22:57:57.551000: DEBUG : urllib3.connectionpool: Resetting dropped connection: hg.mozilla.org
2023-08-03T22:57:58.722000: DEBUG : urllib3.connectionpool: https://hg.mozilla.org:443 "GET /integration/autoland/json-pushes?changeset=55a239852ac844f5fd07a5866b4455ba946603d2&full=1 HTTP/1.1" 200 None
2023-08-03T22:57:58.754000: DEBUG : Found commit message:
Bug 1834612 - [1/1] Restrict DComp-disabling mitigation to Windows 10 r=ahale,gfx-reviewers

Bug 1704954 disabled DirectComposition for users with NVIDIA graphics
hardware and mixed monitor refresh rates on Windows 10 and 11, as a
mitigation for bug 1638709. However, that bug is almost -- perhaps
entirely -- unknown on Windows 11 (q.v. for details), and the fallback
path it uses has been shown to cause issues there (bug 1763981).

Restrict the mitigation to only occur on Windows 10, where bug 1638709
is exhibited, but where no issues with the fallback path are known.

This also effectively reverts bug 1816001, which it obviates.

Differential Revision: https://phabricator.services.mozilla.com/D178848

2023-08-03T22:57:58.754000: DEBUG : Did not find a branch, checking all integration branches
2023-08-03T22:57:58.755000: INFO : The bisection is done.
2023-08-03T22:57:58.756000: INFO : Stopped

Flags: needinfo?(silverlink)

done another one with the same result now
Bug 1834612 - [1/1] Restrict DComp-disabling mitigation to Windows 10 r=ahale,gfx-reviewers

Bug 1704954 disabled DirectComposition for users with NVIDIA graphics
hardware and mixed monitor refresh rates on Windows 10 and 11, as a
mitigation for bug 1638709. However, that bug is almost -- perhaps
entirely -- unknown on Windows 11 (q.v. for details), and the fallback
path it uses has been shown to cause issues there (bug 1763981).

Restrict the mitigation to only occur on Windows 10, where bug 1638709
is exhibited, but where no issues with the fallback path are known.

This also effectively reverts bug 1816001, which it obviates.

Differential Revision: https://phabricator.services.mozilla.com/D178848

2023-08-03T23:10:24.663000: DEBUG : Did not find a branch, checking all integration branches
2023-08-03T23:10:24.664000: INFO : The bisection is done.
2023-08-03T23:10:24.665000: INFO : Stopped

I do have mixed monitors.
2x 1080p screens 60hz
1x 1440p screen 144hz
I am using Windows 11

:rkraesig, since you are the author of the regressor, bug 1834612, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(rkraesig)

Oh no. (Tentatively setting severity to S3 for now.)

@silverlink: just to confirm, if you go into about:config and set gfx.webrender.dcomp-win.enabled to false:

  • Do you stop experiencing this bug?
  • Do you start experiencing bug 1763981?
Severity: -- → S3
Flags: needinfo?(rkraesig) → needinfo?(silverlink)
See Also: → 1704954, 1638709, 1763981

(In reply to Ray Kraesig [:rkraesig] from comment #8)

Oh no. (Tentatively setting severity to S3 for now.)

@silverlink: just to confirm, if you go into about:config and set gfx.webrender.dcomp-win.enabled to false:

  • Do you stop experiencing this bug?
  • Do you start experiencing bug 1763981?

It seems that setting it to false fixed it yes, but I will test over the day to give the final verdict
Also yes to the other bug, I never noticed it until you guys mentioned it though. So Thanks for that 😜.

Flags: needinfo?(silverlink)

The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.

Status: UNCONFIRMED → NEW
Ever confirmed: true

If you're experiencing bug 1763981 with that flipped, that means the DWM resize hack isn't functioning, and reverting 1834612 is off the table.

This looks like a Windows 11 manifestation of bug 1638709, which is arguably the worst-case scenario all around. I'm going to remove the severity flag and regressed-by field, and let :ahale and/or WebRender triage decide what the next steps are.

Severity: S3 → --
No longer regressed by: 1834612
See Also: → 1834612

After a full day of testing I can say that gfx.webrender.dcomp-win.enabled to false fixed the problem. With that though I am experiencing bug 1763981 when that the video goes full screen its at a weird position until not full screen and full screen again.

The severity field is not set for this bug.
:gw, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(gwatson)

Ashley, looks like the refresh problem may still be showing up on Win11?

Severity: -- → S2
Flags: needinfo?(gwatson) → needinfo?(ahale)

Yeah I've also confirmed variants of this on Intel on Win11 without NVIDIA involved, after one of the Windows 11 updates seems to have regressed something in DWM.

My next steps is to see if someone at Microsoft understands the issue because there are repro cases that have been reported for this same behavior on Chrome and Edge as well so I don't think it's our bug.

That said, it happens a lot less in Chrome and Edge, and I have on my plate a project to revise our approach to compositing to be more like those, which would at least reduce the prevalence of this issue while improving video playback performance.

My next steps is to see if someone at Microsoft understands the issue...

Ashley, were you able to run this by anybody at Microsoft?

Unless this is an actual leak, I'm not sure this qualifies as S2. We'll be prioritizing high res video playback performance in 2024 as well.

While this is on NVIDIA with mixed refresh rate monitors, which we had a mitigation for on Windows 10 (disabling the webrender dcomp compositing path), that mitigation caused other negative effects (like not reliably repositioning browser windows when desktop shape changes, as demonstrated in bug 1828683), so it was reenabled at least for Windows 11, and Windows 11 22H2 caused this bug to start happening again.

Assignee: nobody → ahale

Since this is (a) tracked by the wr-refresh-rate meta and (b) assigned, I'm dropping the severity a bit, but setting a P1 priority so it will be tracked internally by the Graphics team.

Severity: S2 → S3
Priority: -- → P1

I've been actively investigating this on and off, I am trying to characterize whether the bug is in dcomp or our DCLayerTree code, it definitely seems to be a race condition when multiple surfaces owned by the process are updated on vsync triggers are nearly the same time, but it's not totally clear if it's at the OS level or not.

Flags: needinfo?(ahale)

Hi again, can you test if this is fixed now? There have been Windows updates from 2024-05-29 (Windows 11 22H2 or later) and 2024-06-25 (Windows 10 22H2) that say they fix flickering issues with video playback or compositor surfaces that may be the underlying cause; they match my mental model of this issue very closely, and I think both refer to the same fix.

Quoting a Windows 11 update https://support.microsoft.com/en-us/topic/may-29-2024-kb5037853-os-builds-22621-3672-and-22631-3672-preview-dcf14fd8-84d6-4234-9d5b-784c319cd7cf :

  • This update addresses an issue that distorts parts of the screen. This occurs when you use a Chromium-based browser to play a video.

Quoting a Windows 10 update https://support.microsoft.com/en-us/topic/june-25-2024-kb5039299-os-build-19045-4598-preview-d4e3e815-fdd8-465e-8144-42afa165efed :

  • This update addresses an issue that affects Direct Composition batched presentations. A brief flash of triangles or boxes show on the screen. This issue affects browsers, like Microsoft Edge, and other apps.
Flags: needinfo?(silverlink)

(In reply to Ashley Hale [:ahale] from comment #21)

Hi again, can you test if this is fixed now? There have been Windows updates from 2024-05-29 (Windows 11 22H2 or later) and 2024-06-25 (Windows 10 22H2) that say they fix flickering issues with video playback or compositor surfaces that may be the underlying cause; they match my mental model of this issue very closely, and I think both refer to the same fix.

Quoting a Windows 11 update https://support.microsoft.com/en-us/topic/may-29-2024-kb5037853-os-builds-22621-3672-and-22631-3672-preview-dcf14fd8-84d6-4234-9d5b-784c319cd7cf :

  • This update addresses an issue that distorts parts of the screen. This occurs when you use a Chromium-based browser to play a video.

Quoting a Windows 10 update https://support.microsoft.com/en-us/topic/june-25-2024-kb5039299-os-build-19045-4598-preview-d4e3e815-fdd8-465e-8144-42afa165efed :

  • This update addresses an issue that affects Direct Composition batched presentations. A brief flash of triangles or boxes show on the screen. This issue affects browsers, like Microsoft Edge, and other apps.

Hey Ashley,

It seems it has been fixed.
I reverted the setting I changed here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1847040#c12

And so far no weird glitching has happened since I changed it yesterday.

Flags: needinfo?(silverlink)

Great, I'll keep this bug open until we have a blocklist in place for the dcomp issue, updating title to indicate why.

Summary: Firefox / elements on page Flashing / Blinking → Firefox / elements on page Flashing / Blinking (before Windows 11 build 22621.3672 and 22631.3672)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: