Closed Bug 1655241 Opened 4 years ago Closed 3 years ago

Choppy rendering with WebRender/NVIDIA on Linux when video is in foreground

Categories

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

78 Branch
x86_64
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1716049
Tracking Status
firefox-esr78 --- disabled
firefox78 --- disabled
firefox79 --- disabled
firefox80 --- disabled
firefox81 --- disabled

People

(Reporter: steph, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: perf)

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

Steps to reproduce:

  • Enable WebRender
  • Put a video in Picture-in-Picture mode
  • Scroll up and down on a regular text page.

Can be reproduced with two Firefox windows, as long as there is a video currently being rendered.

Actual results:

Choppy rendering (~ 30 fps) if there's a video in foreground. Smooth rendering (60 fps) if foreground video is closed or minimised.

Expected results:

Smooth rendering with video in foreground.

top 5 processes/threads as reported by top while video in PIP and no scrolling:

   8929 sph       20   0 1032248 224096 144004 S   7.6   0.3   1:04.22 Renderer                                             
   1298 sph       20   0 4603612 509600 135560 S   6.6   0.8   2:38.84 gnome-shell                                          
  11010 sph       20   0 9126908 398892 137500 S   5.9   0.6   0:19.99 Web Content                                          
  11805 sph       20   0 9126908 398892 137500 S   5.9   0.6   0:07.07 MediaPD~oder #2                                      
  11803 sph       20   0 9126908 398892 137500 S   5.3   0.6   0:07.89 MediaPD~oder #2   

top 5 threads while video in PIP and scrolling up and down:

     29 sph       20   0 1032252 224404 144004 R  99.7   0.3   1:19.12 Renderer                                             
   1298 sph       20   0 4606316 509544 135560 S   3.7   0.8   2:41.01 gnome-shell                                          
  10604 sph       20   0 2480820 160120  97976 S   3.3   0.2   0:08.97 Web Content                                          
   8884 sph       20   0 3115012 453436 224580 S   2.7   0.7   2:00.15 firefox-bin                                          
   1232 root      20   0  161120 109532  88340 S   2.3   0.2   3:03.16 Xorg              

Can be reproduced in OpenGL and WebRender modes, can't be reproduced on Basic rendering.

GNOME, Firefox 78.0.2 flatpak, nvidia 450.57, GTX 1080

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

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

bug 1617002 and bug 1656472 could be related.
Is this problem still reproducible with https://nightly.mozilla.org? (open about:config, set gfx.webrender.all to true and restart Nightly)

Blocks: wr-nv-linux
Keywords: perf
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

Yes, just tested with the latest Nightly and the problem is still reproducible, though I'm unsure if it's a Firefox bug, as it happens with Chromium as well.

Interesting: I tried having a Firefox 79 window displaying a regular page, and a Firefox Nightly window with a video, and FF79 scrolling wasn't lagging. So it's must be a Firefox issue, as this choppiness doesn't affect other processes (so it can't be Mutter, the nv driver, AFAIK).

In other words: this is reproducible ONLY on the same Firefox process that's rendering the video. Does not affect other Firefox processes.

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(ktaeleman)

(In reply to Stephane Travostino from comment #4)

Yes, just tested with the latest Nightly and the problem is still reproducible, though I'm unsure if it's a Firefox bug, as it happens with Chromium as well.

As you're running Gnome, it could be that you're hitting https://gitlab.gnome.org/GNOME/mutter/-/issues/1291, given that you said not only FF is affected.

As you're running Gnome, it could be that you're hitting https://gitlab.gnome.org/GNOME/mutter/-/issues/1291, given that you said not only FF is affected

Perhaps, but what about the fact that other Firefox PIDs are not affected? Looks like there's this Renderer thread that consumes most of the CPU, which happens only when a video is visible and there's some other rendering to be done elsewhere.

Wouldn't that mutter issue present the bottleneck on some other gnome or Xorg process?

Could bug 1631353 comment 11 be related?

Could bug 1631353 comment 11 be related?

Nope, I just finished compiling the patched version (from FF79) and the behaviour is the same. I'll go and comment on that issue as well.

Severity: -- → S3
Flags: needinfo?(ktaeleman) → needinfo?(aosmond)
Priority: -- → P3
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Flags: needinfo?(aosmond)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.