Closed Bug 1710877 Opened 3 years ago Closed 6 months ago

MacOS hardware acceleration causes glitches when scrolling on AMD

Categories

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

Firefox 89
Unspecified
macOS
defect

Tracking

()

RESOLVED DUPLICATE of bug 1715452
Tracking Status
firefox89 --- wontfix
firefox90 --- ?
firefox91 --- ?

People

(Reporter: tvik, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files)

Attached file about-support.txt

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Firefox/89.0

Steps to reproduce:

  1. I have the hardware acceleration turned on.
  2. I visit site e.g. https://simpleflying.com/australia-supersonic-flight/ is making the bug easy to reproduce for me.
  3. I start scrolling up and down

Actual results:

The whole screen (not just the Firefox window) starts glitching. By glitching I mean flashing green and is all broken. This only happens when scrolling and only for a brief periods of time (milliseconds).

I took a video on my phone: https://youtu.be/ixlag1HFXUU

Expected results:

When I turn off the hardware acceleration or downgrade to the Firefox 88, the issue goes away and I can scroll without my screen glitching.

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

Component: Untriaged → Graphics
Product: Firefox → Core

Is the about:support you posted from when you have hardware acceleration turned off or on?

Can you use https://mozilla.github.io/mozregression/ to find out what change caused this problem?

Flags: needinfo?(tvik)

Attachment 9221622 [details] says that WebRender (Software) is used.

OS: Unspecified → macOS
No longer blocks: sw-wr-perf

(In reply to tvik from comment #0)

  1. I have the hardware acceleration turned on.

tvik, how did you confirm that the hardware acceleration turned on?

Is the about:support you posted from when you have hardware acceleration turned off or on?

I had the hardware acceleration turned on, but I haven't restarted Firefox (1) I started FIrefox with HW acceleration off 2) I switched it on 3) I copied the about:support data)

Can you use https://mozilla.github.io/mozregression/ to find out what change caused this problem?

I'm not having trouble reproducing the issue as reliably.

tvik, how did you confirm that the hardware acceleration turned on?

I attached a screenshot of the HW acceleration setting that I turned on and off


UPDATE: Since now I can't reproduce the issue reliably enough to use the mozregression tool, I suggest we'll pause any further investigation till I'll be able to help to debug the issue.

If it starts happening regularly again, I'm going to:

  1. take about:support information with HW acceleration off (presumably this is when I won't be able to reproduce the issue)
  2. take about:support information with HW acceleration on (this is when the bug is occurring)
  3. use mozregression tool to try to pinpoint the exact version that introduced the issue
Flags: needinfo?(tvik)
Attached image Settings.png

Attachment 9221622 [details] had the following.

HW_COMPOSITING:
available by default
disabled by user: Disabled by pref

I wonder if pref layers.acceleration.disabled= true in about:config might be set.

tvik, did you change pref layers.acceleration.disabled to true in about:config?

Flags: needinfo?(tvik)

(In reply to Sotaro Ikeda [:sotaro] from comment #8)

tvik, did you change pref layers.acceleration.disabled to true in about:config?

It's not listed in the modified preferences section of the about: support

(In reply to Sotaro Ikeda [:sotaro] from comment #7)

Attachment 9221622 [details] had the following.

HW_COMPOSITING:
available by default
disabled by user: Disabled by pref

I wonder if pref layers.acceleration.disabled= true in about:config might be set.

"Use hardware acceleration when available" check box seems to change pref "layers.acceleration.disabled"

Flags: needinfo?(tvik)

When layers.acceleration.disabled was true, WebRender was fallback to Basic compositor on my macos with nightly(90) and beta(89).

On beta(89), Software WebRender was permitted only to early beta. Then Software Webrender is not permitted on current Beta.

From current nightly(90), this restriction was removed by Bug 1711118.

Component: Graphics → Graphics: WebRender
Severity: -- → S3

I have the same problem as described by tvik. I am running Firefox 89.0 on macOS 10.15.7. If Use hardware acceleration when available is turned on, my whole screen (not just Firefox) flickers like crazy whenever I scroll. However, if Use hardware acceleration when available is disabled, it works.

Any suggestions how I can provide valuable information to help fixing this bug?

Stefan, can you attach the graphics section of about:support?

Flags: needinfo?(scherzpage)
Flags: needinfo?(scherzpage)

Stefan, can you try setting gfx.color_management.native_srgb=false and restarting to see if that helps?

If it does not, can you try using https://mozilla.github.io/mozregression/ to find the change the caused the problem?

Flags: needinfo?(scherzpage)
Summary: MacOS hardware acceleration causes glitches when scrolling → MacOS hardware acceleration causes glitches when scrolling on AMD

Setting gfx.color_management.native_srgb=false in about:config did not help.

I compared release 88 and 89 in mozregression GUI, these are the last lines from the log:

2021-06-02T23:26:08.040000: DEBUG : Found commit message:
Bug 1699931 - Fix checked checkbox radius in the non-native theme. r=mstange

This is caused by a minor issue with WebRender disabled where the radii
was slightly off because it wasn't accounting for the deflation of the
rect.

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

2021-06-02T23:26:08.040000: DEBUG : Did not find a branch, checking all integration branches
2021-06-02T23:26:08.046000: INFO : The bisection is done.
2021-06-02T23:26:08.047000: INFO : Stopped

Flags: needinfo?(scherzpage)
Regressed by: 1699931
Has Regression Range: --- → yes

Stefan, can you try setting widget.non-native-theme.enabled=false and restarting to see if that helps?

Flags: needinfo?(scherzpage)

(In reply to Jeff Muizelaar [:jrmuizel] from comment #19)

Stefan, can you try setting widget.non-native-theme.enabled=false and restarting to see if that helps?

Yes, that helped. With widget.non-native-theme.enabled=false and hardware acceleration enabled, the screen is not flickering anymore.

Flags: needinfo?(scherzpage)

Stefan, what version of macOS are you using?

Flags: needinfo?(scherzpage)

Stefan, also what are the steps that you follow to reproduce the problem?

Markus, you can have a similar GPU in your MacBook Pro (15-inch, Late 2016). Can you see if you can reproduce?

Flags: needinfo?(mstange.moz)

I am running mac OS 10.15.7 (Catalina), the problem occurred while using an external screen (lid closed) and therefore the Radeon Pro 555X 4 GB (and not the Intel UHD Graphics 630 1536 MB) should be active. I will test later on the MacBooks display.

Steps to reproduce this problem are straight forward for me: if widget.non-native-theme.enabled=true (like it was before comment #20) and Use hardware acceleration when available is turned on, the problem occurrs directly whenever I start scrolling on any website.

Flags: needinfo?(scherzpage)
Status: UNCONFIRMED → NEW
Ever confirmed: true

(In reply to Jeff Muizelaar [:jrmuizel] from comment #23)

Markus, you can have a similar GPU in your MacBook Pro (15-inch, Late 2016). Can you see if you can reproduce?

I have not been able to reproduce it so far. I'm not running 10.15, though - this machine currently has macOS 11.5 Beta.

Flags: needinfo?(mstange.moz)

Stefan, does the following combination of settings have the bug?
Hardware acceleration enabled
widget.non-native-theme.enabled = true
widget.non-native-theme.webrender = false

Flags: needinfo?(scherzpage)
Blocks: gfx-triage

(In reply to Markus Stange [:mstange] from comment #26)

Stefan, does the following combination of settings have the bug?
Hardware acceleration enabled
widget.non-native-theme.enabled = true
widget.non-native-theme.webrender = false

No, it does not. When the above settings / config are applied, everything is working just fine!

Flags: needinfo?(scherzpage)

Very interesting!

The code that was touched by bug 1699931 is only exercised when drawing form elements like checkboxes. Stefan, you said you can reproduce it on any website - can you double check whether that's the case or whether it only happens on websites with form elements? Or maybe it happens on any website as soon as any website before it has painted a form element.

(In reply to Markus Stange [:mstange] from comment #29)

Very interesting!

The code that was touched by bug 1699931 is only exercised when drawing form elements like checkboxes. Stefan, you said you can reproduce it on any website - can you double check whether that's the case or whether it only happens on websites with form elements? Or maybe it happens on any website as soon as any website before it has painted a form element.

Settings:
Hardware acceleration enabled
widget.non-native-theme.enabled = true
widget.non-native-theme.webrender = true

The flickering even appears if I open a simple website without any form elements, even if all other tabs are closed and no other tabs have been opened before.

Emilio, can you think of any explanation for this?

Flags: needinfo?(emilio)

Huh, not really... Well, perhaps the scrollbars code still gets called and it might trigger the bug? Though quite an odd one...

The regression range doesn't make sense to me, https://phabricator.services.mozilla.com/D109206 did touch related code, but it only touched the non-webrender / drawtarget codepath...

(hah, I midaired with your comment :))

(In reply to Emilio Cobos Álvarez (:emilio) from comment #33)

but it only touched the non-webrender / drawtarget codepath...

Oh, indeed. That makes it even more mysterious...

See Also: → 1715452

@Emilio since you have linked my issue to this one as possible similarity, I can confirm it's pretty much the same.
I have noticed that @tvik said that he cannot constantly reproduce it. And on his video, I can see his window is not expanded. For me, to reproduce this issue constantly, the Firefox window need to be either expanded, or to take more than 70% of the screen area, otherwise it appears very rarely to almost never depending on the window size. If the window is expanded, it's "glitching/ flickering" all the time when scrolling anywhere, including the new tab page with quick links.

Disabling just the widget.non-native-theme.webrender solves it completely.

No longer blocks: gfx-triage
Priority: -- → P2
Status: NEW → RESOLVED
Closed: 6 months ago
Duplicate of bug: 1715452
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: