Closed Bug 1752113 Opened 3 years ago Closed 3 years ago

Add testing with Wayland on Linux

Categories

(Testing :: General, task)

x86_64
Linux
task

Tracking

(firefox-esr91 wontfix, firefox96 wontfix, firefox97 wontfix, firefox98- affected)

RESOLVED DUPLICATE of bug 1725245
Tracking Status
firefox-esr91 --- wontfix
firefox96 --- wontfix
firefox97 --- wontfix
firefox98 - affected

People

(Reporter: aryx, Unassigned)

Details

Bug 1749174 enabled Wayland. The configuration to run tests with wayland is in-tree but doesn't run by default. Because it ships it should get testing.

Flags: needinfo?(ahal)
Depends on: 1725245
Severity: -- → S2
Component: Widget: Gtk → General
Product: Core → Testing
Summary: add testing with wayland on Linux → Add testing with Wayland on Linux

I concur :)

Removing this line should get the tasks going:
https://searchfox.org/mozilla-central/source/taskcluster/ci/test/variants.yml#146

Though it's unclear how many tests will fail when doing so, skipping might be required. We're in a bit of weird spot ownership wise, where atm there's no team or person responsible for these types of requests (ideally this should have happened as part of bug 1749174 imo). Joel has been picking up a lot of the slack here so redirecting to him for now.

Flags: needinfo?(ahal) → needinfo?(jmaher)

if we have a business push for wayland, then we should be able to justify the cost increase to CI and get a project manager on board to do the project.

I have initiated work with QA to do work on wayland (see bug 1734806 for results from Q4) and they will do another pass. The problem is there is no right way to test wayland which is why we need a project manager to defined exactly what needs to be setup (i.e. https://bugzilla.mozilla.org/show_bug.cgi?id=1737793#c4 ) and how to verify it and not just a bug.

The other complications are running linux in a docker image. To run a docker image with a UI, we need to proxy X resources from the host OS, AFAIK there is no pure wayland method available, it is more of a hybrid of having X+Wayland. Given the concerns in bug 1737793, I will reassert that this is not straightforward and someone who knows details of wayland needs to outline specific requirements.

also in a migration doc, it was determined that ubuntu 22.04 would be more ideal to test on as there were issues with wayland and that 22.04 is LTS.

Flags: needinfo?(jmaher)

Tracking flags: All versions are affected and wontfix until bug 1725245.

Sequence of events:

  1. Gnome Wayland becomes the default login selection for Intel+AMD users.
  2. Ubuntu (deb+snap) and Fedora enable Firefox' wayland backend by default on Wayland. Firefox' wayland backend is tested in Fedora's CI.
  3. After a long time, bug 1749174 enabled Firefox' Wayland backend at least in official Nightly and Early Beta, so that Wayland users are now testing Firefox' Wayland backend and no longer Firefox' X11 backend using Xwayland. X11 users are still testing Firefox' X11 backend.
  4. Mozilla's CI currently tests the default configuration for outdated Gnome and Mesa versions.
    TODO: Test Firefox' default configuration for modern Gnome and Mesa versions in Mozilla's CI. (bug 1725245, bug 1737793 comment 12):
    • MOZ_ENABLE_WAYLAND (Wayland widget backend. Only supports EGL as GL backend for WebRender+WebGL), requires a recent Gnome version.
    • MOZ_X11_EGL (EGL as GL backend for WebRender+WebGL on the existing X11 widget backend to make deprecation of the GLX GL backend possible and to share code & features with Wayland EGL: fast EGL-Dmabuf-WebGL and EGL-Dmabuf-VAAPI hardware video decoding)
  5. TODO: Firefox' Wayland backend should also be enabled in Firefox Stable builds made by Mozilla, but Wayland apps can't set their icon themselves:
    Either
    a) the unpackaged Firefox build by Mozilla installs .desktop and icon files,
    b) or becomes properly packaged like Chrome,
    c) or Firefox won't have an icon on Wayland
    d) unless the user creates a .desktop file himself (bug 1751153).

(In reply to Joel Maher ( :jmaher ) (UTC -0800) from comment #3)

Relevant configurations:

  1. If you start Nightly on Gnome Wayland on Ubuntu 22.04, MOZ_ENABLE_WAYLAND is used due to Wayland and recent Gtk: bug 1749174.
    (Firefox Stable distribution builds by Ubuntu (deb+snap) and Fedora and official Nightly+Early Beta behave like this.)
  2. Set gfx.webrender.software:true to test the software fallback there.
  3. If you start Nightly/Beta/Stable on Gnome X11 on Ubuntu 22.04, MOZ_X11_EGL is used due to X11 and Mesa >=21.
  4. If you start Nightly/Beta/Stable on Gnome X11 on Ubuntu 18.04, GLX is used for WebRender and WebGL due to old Mesa.
  5. Set gfx.webrender.software:true to test the software fallback there.
No. reason Ubuntu GPU desktop widget backend GL backend rendering/WebGL backend
1. (new) Wayland default 22.04 Intel Gnome Wayland Firefox Wayland (MOZ_ENABLE_WAYLAND) EGL EGL WebRender with fast EGL-Dmabuf-WebGL
2. (new) Wayland software fallback 22.04 Intel Gnome Wayland Firefox Wayland (MOZ_ENABLE_WAYLAND) EGL Software WebRender with slow readback EGL WebGL
3. (new) X11 maintenance (new long-term default for X11) 22.04 Intel Gnome X11 Firefox X11 EGL (MOZ_X11_EGL) EGL WebRender with fast EGL-Dmabuf-WebGL
4. (reduce to simple GLX HW WR startup test) phasing out: GLX WR on old Mesa 18.04 Intel Gnome X11 Firefox X11 GLX GLX WebRender with slow readback GLX WebGL
5. (keep) X11 software fallback, legacy GLX 18.04 Intel Gnome X11 Firefox X11 GLX Software WebRender with slow readback GLX WebGL
Blocks: wayland-stable
No longer blocks: wayland-nightly
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

It doesn't need tracking for our 98 release as we won't ship wayland by default in 98.

Type: defect → task

(In reply to Darkspirit from comment #5)
The need to test the 5 shipped configurations might seem costly, but most tests don't need to run everywhere (engine tests vs. integration tests).
Different visualization (IIUC):

SW WR integration:

  • wayland widget (Ubuntu 22.04)
  • x11 widget (Ubuntu 18.04)

HW WebRender integration:

  • EGL: RenderCompositorEGL
    • on wayland widget (Ubuntu 22.04)
    • on x11 widget (Ubuntu 22.04)
  • GLX: RenderCompositorOGL on x11 widget for users with old Mesa (Ubuntu 18.04)
    • this could be removed by lowering required Mesa version for EGL/X11 or by switching old Mesa to SW WR
    • (removed for Nvidia by bug 1751252 + bug 1742994: As of 98, Nvidia users either get HW WR/EGL or SW WR/GLX)

WebGL integration:

  • HW WR with EGL-Dmabuf-WebGL should be the same on Wayland and EGL/X11 (Ubuntu 22.04)
  • SW WR with slow readback EGL WebGL should be the same on Wayland and EGL/X11 (Ubuntu 22.04)
  • SW WR with slow readback GLX WebGL for users with old Mesa (Ubuntu 18.04)
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
No longer depends on: 1725245, 1749174
You need to log in before you can comment on or make changes to this bug.