Closed Bug 1647166 Opened 4 years ago Closed 11 months ago

On Linux, rendering in multiple sessions splits refresh rate

Categories

(Core :: Graphics, defect, P3)

77 Branch
x86_64
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1716049

People

(Reporter: alexo45, Unassigned)

References

(Blocks 1 open bug)

Details

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

Steps to reproduce:

This is specific to Linux, I cannot reproduce in Windows.
I'm on:
Operating System: Manjaro Linux
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.15.0
Kernel Version: 5.7.0-3-MANJARO
OS Type: 64-bit
Processors: 12 × Intel® Core™ i7-8700K CPU @ 3.70GHz
Memory: 15.6 GiB of RAM

In two Firefox windows (on one screen or across multiple monitors) actions causing rendering cause the refresh rate to be shared between windows, as opposed to each window rendering at the highest possible rate.

Firefox setup:

Steps to reproduce:
Open a single firefox window to the test ufo site: https://www.testufo.com/framerates#count=3&background=stars&pps=120
Notice the FPS is the refresh rate of the monitor
Open a second window on the same monitor, with both windows visible, to the same test ufo site
Notice the fps of both is half the refresh rate of the monitor

Actual results:

On a 144hz monitor, watching a 24fps video in one window limits the refresh rate of the second window to 120fps.
When the video in the first window is paused and the window does not require re-rendering, the second window properly renders at 144fps.
Screenshot: https://imgur.com/QUrX0fQ

Expected results:

Both windows should be rendering at the refresh rate of the monitor, rather than half the refresh rate.

Screenshot of Chromium in an identical setup working appropriately: https://imgur.com/oGXCheJ

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

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Priority: -- → P3
Blocks: vsync
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
See Also: → 1630490

I can't seem to edit the original summary now, but this only occurs with gfx.webrender enabled.

See Also: → 1657905

I can reproduce this with gfx.webrender enabled on Manjaro XFCE and more than 1 Firefox window not minimized.

I have a 59.95 Hz monitor.

If any more than 1 Firefox window is not minimized which has continuous animation, across any workspaces, such as https://www.vsynctester.com and https://orteil.dashnet.org/cookieclicker/ for example, vsynctester.com shows a frame rate of exactly half my refresh rate, 29.975 Hz.

When this happens, any third window or tab has this same half-refresh-rate scrolling and animation. This is even while the other windows are not visible due to being obscured or on another workspace.

A workaround I've found is to set layout.frame_rate from -1 to 0 for the session. This causes Firefox to run at full frame rate and perfect vsync, with frame rate capped at my display's refresh rate. At https://www.vsynctester.com with this workaround, I see exactly 59.95 Hz, no matter what other windows are open.

However, that workaround has a caveat. If layout.frame_rate is left at 0 and Firefox is closed, the next time Firefox is opened, the frame rate is completely uncapped, so https://www.vsynctester.com runs at hundreds of frames per second and uses maximum GPU and CPU.

Therefore, to avoid this issue, the workaround must involve setting layout.frame_rate from 0 back to -1 before closing Firefox, so that the workaround works properly in the next session.

I would be tremendously grateful if this issue was resolved, as I have been applying this workaround since I figured it out 4 months ago and I often forget to handle the caveat, causing me to have to set layout.frame_rate back to -1 manually, restart Firefox again with my 8-12 Firefox windows, and then set layout.frame_rate back to 0 to have smooth, comfortable scrolling and proper 59.95 Hz animation again.

For further system information, here is my full about:support page copied to text: https://lex.clansfx.co.uk/dump/7345d8baae731d998ad2525ea702538c/clip.txt

Since my comment here wasn't clear, I made a separate report here: https://bugzilla.mozilla.org/show_bug.cgi?id=1720634

From comment 2 this is a WebRender regression.

Component: Widget: Gtk → Graphics

Happened with swap interval 1.

Status: UNCONFIRMED → RESOLVED
Closed: 11 months ago
Duplicate of bug: 1716049
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.