Closed Bug 1588589 Opened 5 years ago Closed 3 years ago

using X11 root window for synchronization causes stutter on xwayland and potentially other issues on native xorg

Categories

(Core :: Widget: Gtk, defect)

70 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1640779

People

(Reporter: tempel.julian, Unassigned)

References

(Blocks 1 open bug)

Details

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

Steps to reproduce:

Start Firefox Linux either with OpenGL layered acceleration or WebRender in a Sway Wayland session as XWayland application.

Actual results:

Firefox' compositing syncs to fake 60Hz refresh rate, which looks stuttery, especially on e.g. 75Hz or 144Hz displays.

Expected results:

Firefox' X11 windowing shouldn't break proper vsync inside XWayland on Sway.
On my 75Hz display, Chromium X11 correctly renders at perfectly synced 75fps @ 75Hz.

Issue was reported to xserver maintainers. Quoting Michel Dänzer from there:

"It's a Firefox issue, because it uses the X11 root window for synchronization. There's no Wayland entity corresponding to the root window, so Xwayland cannot use anything but the timer fallback.

Using the root window can do the wrong thing even on Xorg with multiple monitors, particularly if the Firefox window is visible on a non-primary monitor and its refresh rate differs from the primary one."

https://gitlab.freedesktop.org/xorg/xserver/issues/915#note_257271

I should express this a little more clearly: Chromium also renders with proper vsync as xwayland application inside a Sway session.
On native xorg, Firefox achieves this as well. But as Michel stated, there might be other issues even on native xorg due to the same underlying problem that breaks proper vsync on xwayland.

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

Does using the Wayland port (MOZ_ENABLE_WAYLAND=1) behave correctly?

Wayland related bug is there - Bug 1542808. I don't think there's a correct behavior on Wayland native backend as we also use fake 60Hz callback on Wayland right now.

See Also: → 1542808
Component: Graphics: WebRender → Widget: Gtk
Blocks: vsync
Depends on: 1640779

Closing as dup of bug 1640779 as that should mostly fix the reported issues.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
No longer depends on: 1640779
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.