Closed Bug 1548499 Opened 5 years ago Closed 5 years ago

[wayland] Browser blocks when not all windows are visible after SharedGL was enabled.

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox-esr60 --- unaffected
firefox67 --- unaffected
firefox68 --- fixed
firefox69 --- fixed

People

(Reporter: kennylevinsen, Assigned: kennylevinsen)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

SharedGL was enabled by bug 1535893 for wayland.

This has resulted in Firefox once again freezing when not all windows are visible, as described in bug 1515448.

A trace shows that we are blocked in eglSwapBuffers, suggesting that the gl context from SharedGL does not end up being configured for 0 swap interval.

On a seperate note, I can't help but notice that we are configuring the swap interval at every context consumption site, rather than doing it once and for all where we create the contexts, which should be easier to deal with.

Regressed by: 1535893
Blocks: wayland, wr-linux
Priority: -- → P3

The EGL context must be set before the call to eglSwapInterval to ensure that it will operate on the correct context.

I don't see this behavior by default because I have a UHD display, which causes webrender to be disabled at runtime:

When I run a test profile with MOZ_WEBRENDER=1 MOZ_ACCELERATED=1 firefox-nightly --ProfileManager I can reproduce. (https://wiki.mozilla.org/Platform/GFX/Quantum_Render#Build_instructions)

Also, if I run with MOZ_WEBRENDER=1 MOZ_ACCELERATED=1 vblank_mode=0 firefox-nightly --ProfileManager I don't see the issue (source: an anon user on Freenode #sway)

(In reply to ericdrex from comment #2)

I don't see this behavior by default because I have a UHD display, which causes webrender to be disabled at runtime:

That is due to this bug only applying to WebRender

Also, if I run with MOZ_WEBRENDER=1 MOZ_ACCELERATED=1 vblank_mode=0 firefox-nightly --ProfileManager I don't see the issue (source: an anon user on Freenode #sway)

Setting vblank_mode=0 causes MESA to change behavior, resulting in what is effectively a forced 0 swap interval. As this bug is about not correctly setting the 0 swap interval we want, this can (but shouldn't) be used as a workaround.

Keywords: checkin-needed

I tried to land this.
Lando says it landed successfully but mercurial shows an error and treeherder doesn't show the push.

mercurial error: filtered revision '25ba16a5d7f8805c0058ea55e75040d6c927867a' (not in 'replicatedserved' subset)

asked on irc in #hg and #lando, will update when we get an answer.

This was successfully landed.

Keywords: checkin-needed
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Assignee: nobody → bugzilla

I am not sure if it's related, but testing firefox 68 with this patch and dropdown menus either fail to work or update in a very odd manner (out of sync, mouse clicks 400px to the left (estimated), etc)

(In reply to Matthew Thode from comment #7)

I am not sure if it's related, but testing firefox 68 with this patch and
dropdown menus either fail to work or update in a very odd manner (out of
sync, mouse clicks 400px to the left (estimated), etc)

Please test nightly. What you see may be Bug 1550051.

yep, looks like it's https://bugzilla.mozilla.org/show_bug.cgi?id=1550051 Guess that still needs backporting to the beta

Is this something that needs backporting to Beta also?

Flags: needinfo?(bugzilla)

(In reply to Ryan VanderMeulen [:RyanVM] from comment #10)

Is this something that needs backporting to Beta also?

If the regression bug is in beta, which I suppose it would be by know, then I would recommend it.

Flags: needinfo?(bugzilla)

Please nominate it for uplift then :). You can do that by clicking the Details link for the attachment, setting the approval-mozilla-beta drop-down to '?', and answering the questions on the form which pops up. Thanks!

Flags: needinfo?(bugzilla)

Comment on attachment 9063358 [details]
Bug 1548499 - Set EGL context before call to eglSwapInterval.

Beta/Release Uplift Approval Request

  • User impact if declined: Wayland users will perceive full UI hangs if any Firefox windows are hidden. This also leaves copy-paste defective if paste is attempted after hiding Firefox.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Minor change in Wayland-specific code that restores correct buffer swap behavior after bug 1535893 enabled shared contexts for Wayland.
  • String changes made/needed: None
Flags: needinfo?(bugzilla)
Attachment #9063358 - Flags: approval-mozilla-beta?

Comment on attachment 9063358 [details]
Bug 1548499 - Set EGL context before call to eglSwapInterval.

wayland fix for 68.0b10

Attachment #9063358 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: