Closed Bug 1739259 Opened 3 years ago Closed 2 years ago

Snap, X11/dual GPU NV+Intel: Intel-only=ok (EGL as expected). NV on-demand + NV-only = "X11_EGL: broken by runtime: glxtest could not use EGL" + "glxtest: libEGL missing" (GLX as expected, but libEGL should not be missing)

Categories

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

Firefox 94
x86_64
Linux
defect

Tracking

()

RESOLVED INCOMPLETE
Tracking Status
firefox94 --- disabled

People

(Reporter: florin.arjocu, Unassigned)

References

(Blocks 4 open bugs)

Details

Attachments

(10 files)

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

Steps to reproduce:

Tried the fish tank webgl test on Firefox 94 (https://webglsamples.org/aquarium/aquarium.html)

Actual results:

Got about 40 fps with 500 fish. Same laptop, same session, Crome gets about 40 fps with 10 000 fish.

Expected results:

I expected much better performance, on par with the other browsers (Chrome, especially).

Fish tank on Chrome with 10 000 fish gets about 40 fps (screenshot)

Attached file firefox 94 about:support (deleted) —

My Firefox 94 about:support information

The Bugbug bot thinks this bug should belong to the 'Core::Canvas: WebGL' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Canvas: WebGL
Product: Firefox → Core

Thanks for the report!
Please install mesa-utils-extra ($ sudo apt install mesa-utils-extra) and copy the output of $ eglinfo and $ es2_info into this bug.

Blocks: snap, linux-egl
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Summary: Firefox 94 slow WebGL on Intel Mesa (ubuntu linux) → Snap: "X11_EGL: broken by runtime: glxtest could not use EGL" + "glxtest: libEGL missing"

There are two main differences between Chrome and Firefox. Firefox is running on Wayland and uses snap. Can you try plain Mozilla binaries under X11 to have the same environment? How-to is here:
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems?rd=Bug_info_Firefox#Testing_Mozilla_binaries
Thanks.

Oh, I see you're running X11, so please try without snap.

Attached file eglinfo (deleted) —
Attached file es2_info (deleted) —

Thanks!
Please start Snap Firefox and then look into your syslog if you can find possibly related entries with apparmor="DENIED".

Please also attach about:support from a non-Snap Firefox:
This command lets you open a temporary throwaway Firefox:
$ pip3 install --user mozregression
$ mozregression --repo mozilla-release --launch FIREFOX_94_0_RELEASE -a about:support

(In reply to Martin Stránský [:stransky] (ni? me) from comment #6)
There was a Snap-only Nvidia bug: bug 1734120. Snap just adds another configuration to test, breaks differently from regular Ubuntu and breaks entire browser features like native messaging, pkcs11 modules. (IMHO: Systemd and Gnome are not a snap packages, neither should browsers be. It might have been better to spend all available time from all parties to get utility processes with dedicated sandbox configs, Fission-only, more Rust (goal: pure Rust), mostly unnecessary JS JIT disabled by default, faster. The browser contains my most sensible data, not the rest of my OS.)

es2_info(In reply to Darkspirit from comment #11)

Thanks!
Please start Snap Firefox and then look into your syslog if you can find possibly related entries with apparmor="DENIED".

Please also attach about:support from a non-Snap Firefox:
This command lets you open a temporary throwaway Firefox:
$ pip3 install --user mozregression
$ mozregression --repo mozilla-release --launch FIREFOX_94_0_RELEASE -a about:support

Could you please tell me how to check the syslog? Thanks.

Can I run the Firefox from the .tar.bz2 archive on the website, without installing those packages? Seems to be simpler.

(In reply to Martin Stránský [:stransky] (ni? me) from comment #6)
There was a Snap-only Nvidia bug: bug 1734120. Snap just adds another configuration to test, breaks differently from regular Ubuntu and breaks entire browser features like native messaging, pkcs11 modules. (IMHO: Systemd and Gnome are not a snap packages, neither should browsers be. It might have been better to spend all available time from all parties to get utility processes with dedicated sandbox configs, Fission-only, more Rust (goal: pure Rust), mostly unnecessary JS JIT disabled by default, faster. The browser contains my most sensible data, not the rest of my OS.)

(In reply to florin arjocu from comment #12)

Could you please tell me how to check the syslog? Thanks.

$ sudo gedit /var/log/syslog

Can I run the Firefox from the .tar.bz2 archive on the website, without installing those packages?

Yes: https://mozilla.org/firefox/new

Seems to be simpler.

It depends. Choose what you prefer.
In case pip3 and PATH are missing:
$ sudo apt install python3-pip
$ pip3 install --user mozregression
$ ~/.local/bin/mozregression --repo mozilla-release --launch FIREFOX_94_0_RELEASE -a about:support

I have restarted the laptop and ran Firefox (snap). I did find a few occurrences of apparmor="DENIED". I try copy-pasting here:

Nov 4 23:15:22 florin-SATELLITE-P50-C systemd[909]: Started Application launched by gnome-shell.
Nov 4 23:15:22 florin-SATELLITE-P50-C dbus-daemon[994]: [session uid=1000 pid=994] Activating via systemd: service name='org.freedesktop.portal.Documents' unit='xdg-document-portal.service' requested by ':1.97' (uid=1000 pid=2121 comm="/snap/bin/firefox " label="unconfined")
Nov 4 23:15:22 florin-SATELLITE-P50-C systemd[909]: Starting flatpak document portal service...
Nov 4 23:15:22 florin-SATELLITE-P50-C dbus-daemon[994]: [session uid=1000 pid=994] Successfully activated service 'org.freedesktop.portal.Documents'
Nov 4 23:15:22 florin-SATELLITE-P50-C systemd[909]: Started flatpak document portal service.
Nov 4 23:15:22 florin-SATELLITE-P50-C systemd[909]: Started snap.firefox.firefox.c8212580-78a5-4d61-89b9-4d6a238a480f.scope.
Nov 4 23:15:22 florin-SATELLITE-P50-C systemd[909]: app-gnome-firefox_firefox-2121.scope: Deactivated successfully.
Nov 4 23:15:22 florin-SATELLITE-P50-C kernel: [ 116.610089] audit: type=1400 audit(1636064122.147:50): apparmor="DENIED" operation="capable" profile="/usr/lib/snapd/snap-confine" pid=2121 comm="snap-confine" capability=39 capname="bpf"
Nov 4 23:15:22 florin-SATELLITE-P50-C kernel: [ 116.610148] audit: type=1400 audit(1636064122.147:51): apparmor="DENIED" operation="capable" profile="/usr/lib/snapd/snap-confine" pid=2121 comm="snap-confine" capability=12 capname="net_admin"
Nov 4 23:15:22 florin-SATELLITE-P50-C kernel: [ 116.610163] audit: type=1400 audit(1636064122.147:52): apparmor="DENIED" operation="capable" profile="/usr/lib/snapd/snap-confine" pid=2121 comm="snap-confine" capability=38 capname="perfmon"
Nov 4 23:15:22 florin-SATELLITE-P50-C systemd[909]: tmp-snap.rootfs_Pmmg4J.mount: Deactivated successfully.
Nov 4 23:15:22 florin-SATELLITE-P50-C kernel: [ 116.711912] audit: type=1400 audit(1636064122.251:53): apparmor="DENIED" operation="capable" profile="/usr/lib/snapd/snap-confine" pid=2121 comm="snap-confine" capability=4 capname="fsetid"
Nov 4 23:15:23 florin-SATELLITE-P50-C systemd[909]: Started Application launched by gnome-shell.
Nov 4 23:15:23 florin-SATELLITE-P50-C dbus-daemon[994]: [session uid=1000 pid=994] Activating via systemd: service name='org.gnome.Terminal' unit='gnome-terminal-server.service' requested by ':1.99' (uid=1000 pid=2218 comm="/usr/bin/gnome-terminal.real --window " label="unconfined")
Nov 4 23:15:23 florin-SATELLITE-P50-C systemd[909]: Created slice app-org.gnome.Terminal.slice.
Nov 4 23:15:23 florin-SATELLITE-P50-C systemd[909]: Starting GNOME Terminal Server...
Nov 4 23:15:24 florin-SATELLITE-P50-C dbus-daemon[994]: [session uid=1000 pid=994] Successfully activated service 'org.gnome.Terminal'
Nov 4 23:15:24 florin-SATELLITE-P50-C systemd[909]: Started GNOME Terminal Server.
Nov 4 23:15:24 florin-SATELLITE-P50-C GeckoMain[2121]: Failed to load module "canberra-gtk-module"
Nov 4 23:15:24 florin-SATELLITE-P50-C GeckoMain[2121]: Failed to load module "canberra-gtk-module"
Nov 4 23:15:24 florin-SATELLITE-P50-C systemd[909]: Started VTE child process 2241 launched by gnome-terminal-server process 2221.
Nov 4 23:15:24 florin-SATELLITE-P50-C systemd[909]: app-gnome-org.gnome.Terminal-2216.scope: Deactivated successfully.
Nov 4 23:15:26 florin-SATELLITE-P50-C kernel: [ 120.872720] audit: type=1400 audit(1636064126.411:54): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/proc/sys/dev/i915/perf_stream_paranoid" pid=2214 comm="GeckoMain" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Nov 4 23:15:26 florin-SATELLITE-P50-C kernel: [ 121.057623] audit: type=1326 audit(1636064126.595:55): auid=1000 uid=1000 gid=1000 ses=2 subj=snap.firefox.firefox pid=2121 comm="GeckoMain" exe="/snap/firefox/701/usr/lib/firefox/firefox" sig=0 arch=c000003e syscall=314 compat=0 ip=0x7f0e2cf3789d code=0x50000
Nov 4 23:15:26 florin-SATELLITE-P50-C firefox_firefox.desktop[2121]: [GFX1-]: glxtest: libEGL missing
Nov 4 23:15:26 florin-SATELLITE-P50-C kernel: [ 121.358987] audit: type=1400 audit(1636064126.895:56): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/proc/sys/dev/i915/perf_stream_paranoid" pid=2121 comm="GLXVsyncThread" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Nov 4 23:15:27 florin-SATELLITE-P50-C kernel: [ 121.824717] audit: type=1400 audit(1636064127.363:57): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/proc/sys/dev/i915/perf_stream_paranoid" pid=2121 comm="Renderer" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

(In reply to Darkspirit from comment #11)

Thanks!
Please start Snap Firefox and then look into your syslog if you can find possibly related entries with apparmor="DENIED".

Please also attach about:support from a non-Snap Firefox:
This command lets you open a temporary throwaway Firefox:
$ pip3 install --user mozregression
$ mozregression --repo mozilla-release --launch FIREFOX_94_0_RELEASE -a about:support

(In reply to Martin Stránský [:stransky] (ni? me) from comment #6)
There was a Snap-only Nvidia bug: bug 1734120. Snap just adds another configuration to test, breaks differently from regular Ubuntu and breaks entire browser features like native messaging, pkcs11 modules. (IMHO: Systemd and Gnome are not a snap packages, neither should browsers be. It might have been better to spend all available time from all parties to get utility processes with dedicated sandbox configs, Fission-only, more Rust (goal: pure Rust), mostly unnecessary JS JIT disabled by default, faster. The browser contains my most sensible data, not the rest of my OS.)

Attached file non snap Firefox about:support (deleted) —
Non snap Firefox about:support

Non snap Firefox seems to be twice as fast, it can do 60 fps on 500 and 1000 fish (almost stable 60 fps in both cases), but only 23-25 fps with 5000 fish.
That is less than half of what Chrome can do where it goes to 60 fps with 5000 fish and can do 50fps with 10000 fish.

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(jgilbert)

I wonder if this has been fixed in bug 1732580 - Florin, do you now get EGL in the FF snap?

Flags: needinfo?(florin.arjocu)

bug 1732580 comment 27 was uplifted to 94.0b5, this bug was filed for 94.

I assume the Snap might not have access to /usr/share/glvnd/egl_vendor.d/ or to the Nvidia driver.

Ah, didn't see that this is yet another case of Intel+NV.

Summary: Snap: "X11_EGL: broken by runtime: glxtest could not use EGL" + "glxtest: libEGL missing" → Snap, dual GPU NV+Intel: "X11_EGL: broken by runtime: glxtest could not use EGL" + "glxtest: libEGL missing"
Blocks: wr-nv-linux

(In reply to Robert Mader [:rmader] from comment #18)

I wonder if this has been fixed in bug 1732580 - Florin, do you now get EGL in the FF snap?

Not sure how to confirm this, but the fish tank test (https://webglsamples.org/aquarium/aquarium.html) now works much better on Intel (this is an intel+nvidia laptop). 94.0.2 snap works even a bit better than v94.0 ran from terminal with ~/.local/bin/mozregression --repo mozilla-release --launch FIREFOX_94_0_RELEASE -a about:support

On intel, something changed for the good. I can be back with nvidia info if needed.
Still not on par with Chrome which does 50 fps with 10 000 fish (Firefox does 60 fps only with 1000 fish, after that, dramatically lower).

Do you need to run anything for debugging?

(In reply to florin arjocu from comment #21)

Not sure how to confirm this, but the fish tank test (https://webglsamples.org/aquarium/aquarium.html) now works much better on Intel (this is an intel+nvidia laptop). 94.0.2 snap works even a bit better than v94.0 ran from terminal with ~/.local/bin/mozregression --repo mozilla-release --launch FIREFOX_94_0_RELEASE -a about:support

You can check about:support, it should include:

X11_EGL:
available by default
DMABUF:
available by default

Still not on par with Chrome which does 50 fps with 10 000 fish (Firefox does 60 fps only with 1000 fish, after that, dramatically lower).

Yeah, unfotunately this is still expected, see bug 1684224 :/

Found it:
X11_EGL	 available by default

I attached the whole file.

Do you still have the Nvidia driver installed?

Attached image 2021-12-01-09:34:25_001-Selection.jpg (deleted) —

(Assuming the question is for me)

Yes, I have the nvidia driver. Previously the optimus settings were set to use optimal performance, nvidia on demand. Yesterday I saw that and selected Intel graphics, as you can see in the attached picture.

Flags: needinfo?(florin.arjocu)

Does this problem occur again if you set it to On-Demand or Performance? (Please test both.)

I just finished running Firefox on nvidia performance + nvidia on-demand profiles, to see which does what. Intel seems to be fixed, at least on my system (laptop) EGL is running fine on intel graphics. Should be noted that I am on X11, not Wayland, I have no idea if that changes the way Firefox works.

I tested nvidia v470 (default) and the latest in my list, v495 drivers, I did no see any dramatic change other than it seems that 495 seemed to work a bit better. Those are proprietary drivers, I did not try the open-source nvidia driver (nouveau), do say if you want that, too. Here I will only add the general information, please tell me what exactly you want to run, to be sure you get exactly what is needed.

  1. Nvidia performance profile
    I found a difference between the snap Firefox and the one run clean, with the same terminal command that downloads v94.0 each time. On neither one, EGL is not running.

a) snap, v94.0.2)
X11_EGL:
available by default
blocklisted by env: Blocklisted by gfxInfo
broken by runtime: glxtest could not use EGL

DMABUF:
available by default
unavailable by runtime: Requires EGL

b) Command line ran Firefox - just as the snap, but with these differences:
i) X11_EGL: broken by runtime: glxtest could not use EGL
ii) some errors over there, too (same one, twice): ERROR: glxtest: libEGL missing

  1. Nvidia on-demand profile - same as above, except the error, see bellow.
    a) snap, v94.0.2
    X11_EGL:
    available by default
    blocklisted by env: Blocklisted by gfxInfo
    broken by runtime: glxtest could not use EGL

DMABUF:
available by default
unavailable by runtime: Requires EGL

Only one error there (not 2 like in the performance profile): ERROR: glxtest: libEGL missing

(In reply to Darkspirit from comment #26)

Does this problem occur again if you set it to On-Demand or Performance? (Please test both.)

Forgot to add:

b) Non snap Firefox, ran from Terminal:

Both are working, I guess it was running on Intel as there was no demand for graphical power?
X11_EGL: available by default
DMABUF: available by default

Summary: Snap, dual GPU NV+Intel: "X11_EGL: broken by runtime: glxtest could not use EGL" + "glxtest: libEGL missing" → Snap, X11/dual GPU NV+Intel: Intel-only=ok (EGL as expected). NV on-demand + NV-only = "X11_EGL: broken by runtime: glxtest could not use EGL" + "glxtest: libEGL missing" (GLX as expected, but libEGL should not be missing)

Thanks for testing!

Severity: -- → S4
Flags: needinfo?(jgilbert)
Priority: -- → P3

The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.

Status: UNCONFIRMED → NEW
Ever confirmed: true

A lot has moved, can you confirm whether you still experience this ? Thanks!

Flags: needinfo?(florin.arjocu)

Redirect a needinfo that is pending on an inactive user to the triage owner.
:jgilbert, since the bug has recent activity, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(florin.arjocu) → needinfo?(jgilbert)

Happy to reopen this when the reporter gets back to us, but until then this is not very actionable, sorry!

Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(jgilbert)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: