Closed Bug 1726510 Opened 2 months ago Closed 16 days ago

[Snap] Manually installed Firefox (without acking, but with dangerous option) has a broken glxtest, which blocks WebGL and hardware WebRender

Categories

(Core :: Graphics, defect)

Desktop
Linux
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox91 --- disabled
firefox92 --- disabled

People

(Reporter: csasca, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: regressionwindow-wanted)

Attachments

(4 files)

Attached image WebGL fail.png

Affected versions

  • 91.0.1 snap build

Affected platforms

  • Ubuntu 18.04, 20.04

Steps to reproduce

  1. Install Snap Firefox
  2. Launch Firefox and access a WebGL page

Expected result

  • The page is loaded and works as expected

Actual result

  • WebGL content is not loaded and a error is shown (Sorry, this demo requires a browser that supports WebGL. Please update your browser or enable WebGL.)

Regression range

  • Will see for a regression

Additional notes

  • The about:support screenshot about Graphics can be seen in the attachment
  • The build was installed manually with "sudo snap install --dangerous"
Has Regression Range: --- → no
Has STR: --- → yes
QA Whiteboard: [qa-regression-triage]

I can't reproduce the issue on my machine. Please attempt regression on your system considering it appears to be specific to it.

Flags: needinfo?(catalin.sasca)

This has been reproduced on three diferent systems, but only with manually installed Firefox snap. If installed by only sudo snap install Firefox in terminal, it will work fine. I'm curious if you did an manually installation of a Firefox snap package and WebGL still worked for you? Thanks!

Flags: needinfo?(catalin.sasca) → needinfo?(daniel.bodea)

I installed it through the Snap Store, not manually.

Flags: needinfo?(daniel.bodea) → needinfo?(catalin.sasca)

Snap store builds will work fine. Only manually installed ones have this issue.

Flags: needinfo?(catalin.sasca)

If you side-loaded the snap without having installed an older revision from the store previously, it's likely that it will be missing essential connections to work correctly. Can you share the output of snap connections firefox?

Flags: needinfo?(catalin.sasca)
Attached image connections output.png

Sure thing. Here's the output in the attachment. I had installed older firefox from store previously.

Flags: needinfo?(catalin.sasca)

That looks correct, nevermind my last comment then.

I can confirm the issue, and I am looking into it. Someone with triaging permission, please assign to me.

The relevant differences in about:support's graphics section are:

-    "adapterDescription": "Mesa DRI Intel(R) UHD Graphics (CML GT2)",
+    "adapterDescription": "Mesa Intel(R) UHD Graphics (CML GT2)",

-    "driverVendor": "mesa/i965",
+    "driverVendor": "mesa/iris",

-    "driverVersion": "20.0.8.0",
+    "driverVersion": "21.0.3.0",

-    "webgl1Renderer": "Intel Open Source Technology Center -- Mesa DRI Intel(R) UHD Graphics (CML GT2)",
+    "webgl1Renderer": "Intel -- Mesa Intel(R) UHD Graphics (CML GT2)",

-    "webgl1Version": "3.0 Mesa 20.0.8",
+    "webgl1Version": "4.6 (Compatibility Profile) Mesa 21.0.3",

-    "webgl2Renderer": "Intel Open Source Technology Center -- Mesa DRI Intel(R) UHD Graphics (CML GT2)",
+    "webgl2Renderer": "Intel -- Mesa Intel(R) UHD Graphics (CML GT2)",

-    "webgl2Version": "4.6 (Core Profile) Mesa 20.0.8",
+    "webgl2Version": "4.6 (Core Profile) Mesa 21.0.3",

If I force the driver to i965 (by running firefox with MESA_LOADER_DRIVER_OVERRIDE=i965), the value of driverVendor is reflected correctly, but WebGL still doesn't work. So this has to do with the version of mesa.

Another data point: when running the deb version of firefox on the same machine, the graphics section of about:support is identical to that produced by the snap (same driver vendor and version, same renderers, …) but WebGL works. Just to confirm that this is a snap-specific problem.

And WebGL works for the snap built from source in a VM where hardware acceleration is not available, going through the llvmpipe driver.

I've tested the side-loaded snap built from source on a variety of hardware and virtual machines, here are the results for WebGL:

  • ubuntu 18.04 VM, llvmpipe: works

  • ubuntu 20.04 VM, llvmpipe: works

  • ubuntu 21.04 VM, llvmpipe: doesn't work

  • ubuntu 18.04 on real hardware with NVidia: works

  • ubuntu 20.04 on thinkpad X230 (Intel graphics 4000, i965 driver): works

  • ubuntu 21.04 on thinkpad X230 (Intel graphics 4000, i965 driver): works

  • ubuntu 21.04 on Intel NUC (Intel UHD Graphics, iris driver by default, also tested forcing i965): doesn't work

Where WebGL doesn't work on real hardware, I'm seeing the status of OPENGL_COMPOSITING is blocklisted in about:support.

Catalin, I'm seeing on your screenshot that webrender was disabled when you reproduced the issue, it looks like the GPU wasn't accessible at all. Can you share the raw data from about:support here?

Flags: needinfo?(catalin.sasca)
Attached file raw data

Sure thing, seems like snap builds downloaded from archive started working (even if installed manually) but the new packages for snap canonical are still affected. Here's the link to them.

Flags: needinfo?(catalin.sasca)

Thanks!
The graphics.info.failures section has:

"[GFX1-]: No GPUs detected via PCI",
"[GFX1-]: glxtest: process failed (received signal 11)"

Can you run glxinfo on that machine and attach the full output?

Flags: needinfo?(catalin.sasca)
Attached file gfx

Yes, here's the glxinfo.

Flags: needinfo?(catalin.sasca)

Thanks!
Relevant excerpts:

direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 2048 MB
    Total available memory: 2048 MB
    Currently available dedicated video memory: 1796 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVS 5400M/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 390.144
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 390.144
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Is that machine running Ubuntu 20.04 ? If so, does the firefox deb package work wrt WebGL?

Flags: needinfo?(catalin.sasca)

Yes, Ubuntu 20.04, and Ubuntu 18 and 16, all other builds work normally, but the snap I linked in Comment 14 is not working, we reproduced the issue on three different systems, not only on this one.

Flags: needinfo?(catalin.sasca)

Does WebGL work on that machine with firefox installed as a deb?

Yes. Tried right now with a Firefox installed deb and WebGL works.

WebGL doesn't work on my ThinkPad T590 on the FF 92.0 snap. I tested this with https://webglsamples.org/aquarium/aquarium.html (works great on the chromium snap)

The webpage error message I get when I try to load acquarium is

"It does not appear your computer supports WebGL.
Click here for more information.

Status: WebGL creation failed: * tryNativeGL (FEATURE_FAILURE_NO_DISPLAY) * Exhausted GL driver options. (FEATURE_FAILURE_WEBGL_EXHAUSTED_DRIVERS)"

Here's some environment info that might be helpful:

  • OS: updated Ubuntu Impish (as of 2021-9-7)
  • FF snap version 92.0-3 (build 595 from --candidate)
  • There are no journalctl logs generated when I try/fail to load the webpage.
  • gfx hw info from lspci -v:

00:02.0 VGA compatible controller: Intel Corporation WhiskeyLake-U GT2 [UHD Graphics 620] (rev 02) (prog-if 00 [VGA controller])
Subsystem: Lenovo WhiskeyLake-U GT2 [UHD Graphics 620]
Flags: bus master, fast devsel, latency 0, IRQ 165, IOMMU group 1
Memory at c7000000 (64-bit, non-prefetchable) [size=16M]
Memory at a0000000 (64-bit, prefetchable) [size=256M]
I/O ports at 3000 [size=64]
Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
Capabilities: [40] Vendor Specific Information: Len=0c <?>
Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [d0] Power Management version 2
Capabilities: [100] Process Address Space ID (PASID)
Capabilities: [200] Address Translation Service (ATS)
Capabilities: [300] Page Request Interface (PRI)
Kernel driver in use: i915
Kernel modules: i915

Thanks for the info Heather!
I am seeing the same "WebGL creation failed" error here in Ubuntu Hirsute, but I observed that when I switch to an X11 session (the default is Wayland), WebGL starts working. Would you mind testing on Impish in an X11 session and let me know whether this works for you too?

Flags: needinfo?(heather.ellsworth)

(In reply to Olivier Tilloy from comment #23)

Thanks for the info Heather!
I am seeing the same "WebGL creation failed" error here in Ubuntu Hirsute, but I observed that when I switch to an X11 session (the default is Wayland), WebGL starts working. Would you mind testing on Impish in an X11 session and let me know whether this works for you too?

Ah yes, I have no problem with xorg and see 50-60fps. The issue only shows up in wayland as you said :)

Flags: needinfo?(heather.ellsworth)

(In reply to Olivier Tilloy from comment #12)

I've tested the side-loaded snap built from source on a variety of hardware and virtual machines, here are the results for WebGL:
[…]

  • ubuntu 20.04 on thinkpad X230 (Intel graphics 4000, i965 driver): works

That was in the default X11 session, I tested again on that machine in a Wayland session, and am seeing WebGL not work with the same FEATURE_FAILURE_NO_DISPLAY error.

I instrumented the corresponding code and rebuilt the snap: in GetAndInitDisplay() (gfx/gl/GLLibraryEGL.cpp), egl.fGetDisplay() (eglGetDisplay()) always returns null. This requires further investigation.

Problem can be reproduced with samples from https://www.khronos.org/webgl/wiki/Demo_Repository
with firefox 92.0-3 619 latest/stable/… mozilla✓ -
on Ubuntu 21.10 Beta Wayland session but DOES NOT OCCUR with X11 session

I can reproduce the problem on Gnome Wayland, Debian Testing, Intel.

$ sudo apt install snapd
$ sudo systemctl start snapd
$ mkdir ~/Downloads/snaptest; cd ~/Downloads/snaptest
$ snap download firefox

Fetching snap "firefox"
Fetching assertions for "firefox"
Install the snap with:
snap ack firefox_595.assert
snap install firefox_595.snap

$ ls

firefox_595.assert firefox_595.snap

without acking:
$ sudo snap install firefox_595.snap

error: cannot find signatures with metadata for snap "firefox_595.snap"

without acking:
$ sudo snap install firefox_595.snap --dangerous

Setup snap "snapd" (13170) security profiles
2021-09-26T19:47:59+02:00 INFO Waiting for automatic snapd restart...
firefox 92.0-3 installed

$ snap run firefox

WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
[GFX1-]: No GPUs detected via PCI
[GFX1-]: glxtest: process failed (received signal 11)

about:support

Compositing WebRender (Software)

WebGL creation failed:

  • WebglAllowWindowsNativeGl:false restricts context creation on this system. ()
  • Exhausted GL driver options. (FEATURE_FAILURE_WEBGL_EXHAUSTED_DRIVERS)

Window-Protokoll wayland

Apart from window protocol my about:support looks like comment 0.

I'm just a volunteer:
Why is an untested (bug 1725245) pre-Nightly feature (bug 1543600 = MOZ_ENABLE_WAYLAND) enabled in the snap?
Official binaries would show "xwayland".
(
IMHO: Please help with CI configuration, then the wayland backend should be enabled in Nightly, and if bug 1633989 has been fixed, it should ride the trains.)
MOZ_ENABLE_WAYLAND and MOZ_X11_EGL are also able to use widget.dmabuf-webgl.enabled=true which needs access to /dev/dri/renderD*. The AppArmor profile seems to allow it.
widget.dmabuf-webgl.enabled is neither tested in CI.
)

$ sudo nano /var/log/syslog

Sep 26 20:46:20 darkspirit-laptop xdg-desktop-por[29022]: Failed to get application states: GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list
Sep 26 20:46:21 darkspirit-laptop systemd[1314]: Started snap.firefox.firefox.dc3a53ef-dd5d-4d87-af6a-de75067c78ca.scope.
Sep 26 20:46:21 darkspirit-laptop kernel: [30868.994719] kauditd_printk_skb: 151 callbacks suppressed
Sep 26 20:46:21 darkspirit-laptop kernel: [30868.994721] audit: type=1400 audit(1632681981.933:13678): apparmor="DENIED" operation="capable" profile="snap.firefox.firefox" pid=29145 comm="firefox" capability=21  capname="sys_admin"
Sep 26 20:46:21 darkspirit-laptop kernel: [30869.010373] audit: type=1400 audit(1632681981.949:13679): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/sys/devices/pci0000:00/0000:00:1c.2/0000:03:00.0/resource" pid=29214 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Sep 26 20:46:21 darkspirit-laptop kernel: [30869.010391] firefox[29214]: segfault at 0 ip 00007f2a527e9107 sp 00007fffda69acd0 error 6 in libxul.so[7f2a4ee08000+53d0000]
Sep 26 20:46:21 darkspirit-laptop kernel: [30869.010397] Code: 1f 40 00 48 83 ec 08 80 3d a5 36 41 04 00 74 02 58 c3 c6 05 9a 36 41 04 01 48 8d 05 c4 13 ec 02 48 8b 0d 94 d2 2f 04 48 89 01 <c7> 04 25 00 00 00 00 91 01 00 00 e8 b1 94 62 fc 66 0f 1f 84 00 00
Sep 26 20:46:21 darkspirit-laptop kernel: [30869.011585] audit: type=1326 audit(1632681981.949:13680): auid=1000 uid=1000 gid=1000 ses=3 subj==snap.firefox.firefox (enforce) pid=29145 comm="firefox" exe="/snap/firefox/x1/usr/lib/firefox/firefox" sig=0 arch=c000003e syscall=314 compat=0 ip=0x7f2a5997089d code=0x50000
Sep 26 20:46:22 darkspirit-laptop kernel: [30869.093458] audit: type=1326 audit(1632681982.029:13681): auid=1000 uid=1000 gid=1000 ses=3 subj==snap.firefox.firefox (enforce) pid=29145 comm="firefox" exe="/snap/firefox/x1/usr/lib/firefox/firefox" sig=0 arch=c000003e syscall=141 compat=0 ip=0x7f2a5996c34b code=0x50000
Sep 26 20:46:22 darkspirit-laptop kernel: [30869.093511] audit: type=1326 audit(1632681982.029:13682): auid=1000 uid=1000 gid=1000 ses=3 subj==snap.firefox.firefox (enforce) pid=29145 comm="firefox" exe="/snap/firefox/x1/usr/lib/firefox/firefox" sig=0 arch=c000003e syscall=141 compat=0 ip=0x7f2a5996c34b code=0x50000
Sep 26 20:46:22 darkspirit-laptop kernel: [30869.093557] audit: type=1326 audit(1632681982.029:13683): auid=1000 uid=1000 gid=1000 ses=3 subj==snap.firefox.firefox (enforce) pid=29145 comm="firefox" exe="/snap/firefox/x1/usr/lib/firefox/firefox" sig=0 arch=c000003e syscall=141 compat=0 ip=0x7f2a5996c34b code=0x50000
Sep 26 20:46:22 darkspirit-laptop kernel: [30869.094451] audit: type=1326 audit(1632681982.033:13684): auid=1000 uid=1000 gid=1000 ses=3 subj==snap.firefox.firefox (enforce) pid=29145 comm="firefox" exe="/snap/firefox/x1/usr/lib/firefox/firefox" sig=0 arch=c000003e syscall=141 compat=0 ip=0x7f2a5996c34b code=0x50000
Sep 26 20:46:22 darkspirit-laptop kernel: [30869.095585] audit: type=1326 audit(1632681982.033:13685): auid=1000 uid=1000 gid=1000 ses=3 subj==snap.firefox.firefox (enforce) pid=29145 comm="firefox" exe="/snap/firefox/x1/usr/lib/firefox/firefox" sig=0 arch=c000003e syscall=141 compat=0 ip=0x7f2a5996c34b code=0x50000
Sep 26 20:46:22 darkspirit-laptop kernel: [30869.102039] audit: type=1326 audit(1632681982.041:13686): auid=1000 uid=1000 gid=1000 ses=3 subj==snap.firefox.firefox (enforce) pid=29145 comm="firefox" exe="/snap/firefox/x1/usr/lib/firefox/firefox" sig=0 arch=c000003e syscall=141 compat=0 ip=0x7f2a5996c34b code=0x50000
Sep 26 20:46:23 darkspirit-laptop rtkit-daemon[875]: Supervising 20 threads of 13 processes of 1 users.

DENIED capability=21 capname="sys_admin"
DENIED operation="open" profile="snap.firefox.firefox" name="/sys/devices/pci0000:00/0000:00:1c.2/0000:03:00.0/resource"

$ snap connections firefox
Interface                 Plug                            Slot                             Notes
avahi-observe             firefox:avahi-observe           -                                -
browser-support           firefox:browser-sandbox         -                                -
camera                    firefox:camera                  -                                -
content[gnome-3-38-2004]  firefox:gnome-3-38-2004         gnome-3-38-2004:gnome-3-38-2004  -
content[gtk-3-themes]     firefox:gtk-3-themes            gtk-common-themes:gtk-3-themes   -
content[icon-themes]      firefox:icon-themes             gtk-common-themes:icon-themes    -
content[sound-themes]     firefox:sound-themes            gtk-common-themes:sound-themes   -
cups-control              firefox:cups-control            -                                -
dbus                      -                               firefox:dbus-daemon              -
desktop                   firefox:desktop                 :desktop                         -
desktop-legacy            firefox:desktop-legacy          :desktop-legacy                  -
gsettings                 firefox:gsettings               :gsettings                       -
hardware-observe          firefox:hardware-observe        -                                -
home                      firefox:home                    :home                            -
joystick                  firefox:joystick                -                                -
mpris                     -                               firefox:mpris                    -
network                   firefox:network                 :network                         -
network-observe           firefox:network-observe         -                                -
opengl                    firefox:opengl                  :opengl                          -
pulseaudio                firefox:pulseaudio              -                                -
removable-media           firefox:removable-media         -                                -
screen-inhibit-control    firefox:screen-inhibit-control  :screen-inhibit-control          -
system-files              firefox:etc-firefox-policies    -                                -
system-packages-doc       firefox:system-packages-doc     -                                -
u2f-devices               firefox:u2f-devices             -                                -
unity7                    firefox:unity7                  :unity7                          -
upower-observe            firefox:upower-observe          :upower-observe                  -
wayland                   firefox:wayland                 :wayland                         -
x11                       firefox:x11                     :x11                             -

$ snap list

Name               Version          Rev    Tracking       Publisher   Notes
bare               1.0              5      latest/stable  canonical✓  base
core20             20210702         1081   latest/stable  canonical✓  base
firefox            92.0-3           x1     -              -           -
gnome-3-38-2004    0+git.6ba6040    76     latest/stable  canonical✓  -
gtk-common-themes  0.1-59-g7bca6ae  1519   latest/stable  canonical✓  -
snapd              2.51.7           13170  latest/stable  canonical✓  snapd

(In reply to Darkspirit from comment #34)

DENIED capability=21 capname="sys_admin"
DENIED operation="open" profile="snap.firefox.firefox" name="/sys/devices/pci0000:00/0000:00:1c.2/0000:03:00.0/resource"

bug 1703142 comment 11 also mentions such an error.

glxtest pci is only broken when manually installing with dangerous option.
about:support is okay (hardware webrender and webgl are listed), but WebGL is still broken, when
a) downloading, acking and manually installing firefox without dangerous
b) installing official firefox

$ sudo snap remove firefox
$ sudo snap install firefox
$ snap run firefox

WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
xkbcommon: ERROR: failed to add default include path /usr/share/X11/xkb

First startup: Tab crash assumingly on about:welcome:
bp-e7d043e2-3b16-4677-8810-fdfa80210926 [@ libxkbcommon.so.0@0x1ae24 ]

WebGL and WebRender work according to about:support, but https://webglsamples.org/aquarium/aquarium.html does not work.

It does not appear your computer supports WebGL.
Click here for more information.
Status: WebGL creation failed: * tryNativeGL (FEATURE_FAILURE_NO_DISPLAY) * Exhausted GL driver options. (FEATURE_FAILURE_WEBGL_EXHAUSTED_DRIVERS)

No word on about:support about this FEATURE_FAILURE_NO_DISPLAY thing.

$ sudo cat /var/log/syslog | grep denied

Sep 26 23:36:58 darkspirit-laptop kernel: [41105.417113] audit: type=1400 audit(1632692218.808:14756): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/proc/sys/dev/i915/perf_stream_paranoid" pid=49327 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Sep 26 23:36:59 darkspirit-laptop kernel: [41105.850276] audit: type=1400 audit(1632692219.240:14757): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/proc/sys/dev/i915/perf_stream_paranoid" pid=49258 comm="Renderer" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

Many slots that previously contained - have an entry now. And a core snap has been added.

$ snap connections
Interface                 Plug                            Slot                             Notes
avahi-observe             firefox:avahi-observe           :avahi-observe                   -
browser-support           firefox:browser-sandbox         :browser-support                 -
camera                    firefox:camera                  :camera                          -
content[gnome-3-38-2004]  firefox:gnome-3-38-2004         gnome-3-38-2004:gnome-3-38-2004  -
content[gtk-3-themes]     firefox:gtk-3-themes            gtk-common-themes:gtk-3-themes   -
content[icon-themes]      firefox:icon-themes             gtk-common-themes:icon-themes    -
content[sound-themes]     firefox:sound-themes            gtk-common-themes:sound-themes   -
cups-control              firefox:cups-control            :cups-control                    -
desktop                   firefox:desktop                 :desktop                         -
desktop-legacy            firefox:desktop-legacy          :desktop-legacy                  -
gsettings                 firefox:gsettings               :gsettings                       -
hardware-observe          firefox:hardware-observe        :hardware-observe                -
home                      firefox:home                    :home                            -
network                   firefox:network                 :network                         -
opengl                    firefox:opengl                  :opengl                          -
pulseaudio                firefox:pulseaudio              :pulseaudio                      -
removable-media           firefox:removable-media         :removable-media                 -
screen-inhibit-control    firefox:screen-inhibit-control  :screen-inhibit-control          -
system-files              firefox:etc-firefox-policies    :system-files                    -
system-packages-doc       firefox:system-packages-doc     :system-packages-doc             -
u2f-devices               firefox:u2f-devices             :u2f-devices                     -
unity7                    firefox:unity7                  :unity7                          -
upower-observe            firefox:upower-observe          :upower-observe                  -
wayland                   firefox:wayland                 :wayland                         -
x11                       firefox:x11                     :x11                             
$ snap list
Name               Version          Rev    Tracking       Publisher   Notes
bare               1.0              5      latest/stable  canonical✓  base
core               16-2.51.4        11606  latest/stable  canonical✓  core
core20             20210702         1081   latest/stable  canonical✓  base
firefox            92.0-3           595    latest/stable  mozilla✓    -
gnome-3-38-2004    0+git.6ba6040    76     latest/stable  canonical✓  -
gtk-common-themes  0.1-59-g7bca6ae  1519   latest/stable  canonical✓  -
snapd              2.51.7           13170  latest/stable  canonical✓  snapd

The about:support problem (software webrender + missing webgl) comes back after uninstalling official firefox and manually installing the official snap without ack, dangerously:
$ sudo snap remove firefox
$ sudo snap install firefox_595.snap --dangerous
Connections look like comment 34 again, many slots now have a - again. core snap is still there.
$ snap run firefox

WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
[GFX1-]: No GPUs detected via PCI
[GFX1-]: glxtest: process failed (received signal 11)

/var/log/syslog:

Sep 26 23:04:38 darkspirit-laptop kernel: [39165.509808] audit: type=1400 audit(1632690278.813:14065): apparmor="DENIED" operation="capable" profile="snap.firefox.firefox" pid=43476 comm="firefox" capability=21 capname="sys_admin"

Sep 26 23:04:38 darkspirit-laptop kernel: [39165.564674] audit: type=1400 audit(1632690278.869:14066): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/sys/devices/pci0000:00/0000:00:1c.2/0000:03:00.0/resource" pid=43594 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

Sep 26 23:04:44 darkspirit-laptop kernel: [39171.498408] audit: type=1400 audit(1632690284.801:14107): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/proc/43476/mountinfo" pid=43476 comm=51756F74614D616E6167657220494F requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000


Manually installed firefox - without dangerous, but with acking - works the same as official firefox:
$ sudo snap remove firefox
$ sudo snap ack firefox_595.assert
$ sudo snap install firefox_595.snap
$ snap run firefox

WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement

Sep 26 23:17:18 darkspirit-laptop kernel: [39925.026778] audit: type=1400 audit(1632691038.360:14583): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/proc/sys/dev/i915/perf_stream_paranoid" pid=45288 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

Sep 26 23:17:24 darkspirit-laptop kernel: [39930.813006] audit: type=1400 audit(1632691044.149:14584): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/proc/sys/dev/i915/perf_stream_paranoid" pid=45169 comm="Renderer" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

Second time I started this firefox I got a tab crash assumingly on about:welcome:
bp-32b92a3e-1e24-4823-84d3-f1ed40210926 [@ libxkbcommon.so.0@0x1ae24 ]

Third time I started this firefox I tried WebGL: https://webglsamples.org/aquarium/aquarium.html

It does not appear your computer supports WebGL.
Click here for more information.
Status: WebGL creation failed: * tryNativeGL (FEATURE_FAILURE_NO_DISPLAY) * Exhausted GL driver options. (FEATURE_FAILURE_WEBGL_EXHAUSTED_DRIVERS)

/var/log/syslog:
Same two errors as above and this one is new:

Sep 26 23:21:31 darkspirit-laptop kernel: [40177.949121] audit: type=1400 audit(1632691291.299:14602): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/proc/46373/environ" pid=46215 comm=427265616B70616420536572766572 requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000

See Also: → 1732580
See Also: → 1732582
Blocks: snap
Summary: [Snap] Manually installed Firefox has trouble creating WebGL graphics and maybe other permissions issues → [Snap] Manually installed Firefox (without acking, but with dangerous option) has a broken glxtest, which blocks WebGL and hardware WebRender

Hm, this reminds me of bug 1700601 and bug 1696691.

For the record: I'm going to land bug 1732002 to give us some more time to figure out stuff like this. Nvidia does not yet default to Wayland sessions on Ubuntu so setups with default configuration remain unaffected.

See Also: → 1696691, 1700601

Ouch, wrong bug, sorry.

See Also: 1696691, 1700601

Summary: When installing without ack, but dangerous option, one must manually connect plugs with slots.

$ sudo snap remove firefox
$ mkdir ~/Downloads/snaptest; cd ~/Downloads/snaptest
$ snap download firefox

Fetching snap "firefox"
Fetching assertions for "firefox"
Install the snap with:
snap ack firefox_595.assert
snap install firefox_595.snap

$ sudo snap install firefox_595.snap --dangerous
$ snap run firefox

-> comment 0 reproducible

$ snap connections firefox

Interface                 Plug                            Slot                             Notes
avahi-observe             firefox:avahi-observe           -                                -
browser-support           firefox:browser-sandbox         -                                -
camera                    firefox:camera                  -                                -
content[gnome-3-38-2004]  firefox:gnome-3-38-2004         gnome-3-38-2004:gnome-3-38-2004  -
content[gtk-3-themes]     firefox:gtk-3-themes            gtk-common-themes:gtk-3-themes   -
content[icon-themes]      firefox:icon-themes             gtk-common-themes:icon-themes    -
content[sound-themes]     firefox:sound-themes            gtk-common-themes:sound-themes   -
cups-control              firefox:cups-control            -                                -
dbus                      -                               firefox:dbus-daemon              -
desktop                   firefox:desktop                 :desktop                         -
desktop-legacy            firefox:desktop-legacy          :desktop-legacy                  -
gsettings                 firefox:gsettings               :gsettings                       -
hardware-observe          firefox:hardware-observe        -                                -
home                      firefox:home                    :home                            -
joystick                  firefox:joystick                -                                -
mpris                     -                               firefox:mpris                    -
network                   firefox:network                 :network                         -
network-observe           firefox:network-observe         -                                -
opengl                    firefox:opengl                  :opengl                          -
pulseaudio                firefox:pulseaudio              -                                -
removable-media           firefox:removable-media         -                                -
screen-inhibit-control    firefox:screen-inhibit-control  :screen-inhibit-control          -
system-files              firefox:etc-firefox-policies    -                                -
system-packages-doc       firefox:system-packages-doc     -                                -
u2f-devices               firefox:u2f-devices             -                                -
unity7                    firefox:unity7                  :unity7                          -
upower-observe            firefox:upower-observe          :upower-observe                  -
wayland                   firefox:wayland                 :wayland                         -
x11                       firefox:x11                     :x11

(bug 1703142 comment 13)
$ sudo snap connect firefox:hardware-observe :hardware-observe
$ snap run firefox

-> weird errors in terminal and barely working UI

$ sudo snap connect firefox:browser-sandbox :browser-support
$ snap connections firefox

Interface                 Plug                            Slot                             Notes
avahi-observe             firefox:avahi-observe           -                                -
browser-support           firefox:browser-sandbox         :browser-support                 manual
camera                    firefox:camera                  -                                -
content[gnome-3-38-2004]  firefox:gnome-3-38-2004         gnome-3-38-2004:gnome-3-38-2004  -
content[gtk-3-themes]     firefox:gtk-3-themes            gtk-common-themes:gtk-3-themes   -
content[icon-themes]      firefox:icon-themes             gtk-common-themes:icon-themes    -
content[sound-themes]     firefox:sound-themes            gtk-common-themes:sound-themes   -
cups-control              firefox:cups-control            -                                -
dbus                      -                               firefox:dbus-daemon              -
desktop                   firefox:desktop                 :desktop                         -
desktop-legacy            firefox:desktop-legacy          :desktop-legacy                  -
gsettings                 firefox:gsettings               :gsettings                       -
hardware-observe          firefox:hardware-observe        :hardware-observe                manual
home                      firefox:home                    :home                            -
joystick                  firefox:joystick                -                                -
mpris                     -                               firefox:mpris                    -
network                   firefox:network                 :network                         -
network-observe           firefox:network-observe         -                                -
opengl                    firefox:opengl                  :opengl                          -
pulseaudio                firefox:pulseaudio              -                                -
removable-media           firefox:removable-media         -                                -
screen-inhibit-control    firefox:screen-inhibit-control  :screen-inhibit-control          -
system-files              firefox:etc-firefox-policies    -                                -
system-packages-doc       firefox:system-packages-doc     -                                -
u2f-devices               firefox:u2f-devices             -                                -
unity7                    firefox:unity7                  :unity7                          -
upower-observe            firefox:upower-observe          :upower-observe                  -
wayland                   firefox:wayland                 :wayland                         -
x11                       firefox:x11                     :x11                             -

$ snap run firefox

-> glxtest works, WebRender works, WebGL is displayed on about:support

Non-default config and apparently expected behavior. Can this bug be closed?

The summary of the bug is misleading (the "Manually installed Firefox" part of it anyway), but I don't have edit rights that would allow me to fix that.

Snaps are not usually intended to be installed by side-loading like was done initially when this bug was reported, and it was unclear at first whether the problem was with missing connections (which happen automatically when installing the snap from the store).

This was discarded, and even when cleanly installed from the store, WebGL fails to work in a Wayland session.

(In reply to Olivier Tilloy from comment #41)

The summary of the bug is misleading (the "Manually installed Firefox" part of it anyway), but I don't have edit rights that would allow me to fix that.

Snaps are not usually intended to be installed by side-loading like was done initially when this bug was reported, and it was unclear at first whether the problem was with missing connections (which happen automatically when installing the snap from the store).

Yes, it's just that comment 0 (no WebGL on about:support, no hardware WebRender) is still perfectly reproducible in comment 34 when installing the snap file manually (=sideloading). That's why I updated the bug to it's current state.
As it is not expected to be sideloaded, this bug can be closed, right?

This was discarded, and even when cleanly installed from the store, WebGL fails to work in a Wayland session.

That's a different bug than comment 0.
In comment 0 the glxtest failure causes WebGL to be blocked as a feature.
bug 1732580 is different: WebGL fails to work on actual websites although it is allowed and its extensions are displayed on about:support.
WebGL fails in Firefox 92 Snap on Gnome Wayland because it uses EGL because it ships pre-Nightly MOZ_ENABLE_WAYLAND (bug 1543600: window protocol "wayland" on about:support).
If Firefox 92 Snap would use Xwayland like Firefox 92, then WebGL would work as it would use GLX.
You can break WebGL in Firefox 92 Snap on Gnome X11 as well by enabling gfx.x11-egl.force-enabled.
It needs to be fixed anyway as the Snap likely keeps shipping MOZ_ENABLE_WAYLAND and 94 will default to EGL on X11 as well (bug 1695933).

Status: NEW → RESOLVED
Closed: 16 days ago
Resolution: --- → WORKSFORME

Ack. I was using this bug to track the problem with WebGL not working in Wayland although advertised as enabled and working in about:support, but it's better tracked in bug 1732580.

You need to log in before you can comment on or make changes to this bug.