WebGL does not work in snap firefox

Bug #1970615 reported by Troels Petersen
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
firefox (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Since upgrading to Ubuntu 22.04 LTS I am no longer able to use WebGL on firefox.

If I go to https://get.webgl.org/ it says
"Hmm. While your browser seems to support WebGL, it is disabled or unavailable. If possible, please ensure that you are running the latest drivers for your video card."

This is the case on my laptop with Intel HD4600 Graphics and on my desktop with AMD Vega 56 Graphics. Both are on Ubuntu 22.04 LTS with snap firefox.

troels@troels-thinkpad:~$ glxinfo | grep OpenGL
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 4600 (HSW GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 22.0.1
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.1 Mesa 22.0.1
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 22.0.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

I therefore have to use Chrome instead for developement using three.js

Tags: jammy
Revision history for this message
Troels Petersen (thesleort) wrote :

The glxinfo output on my desktop, where WebGL also does not work after upgrading to Ubuntu 22.04 LTS

troels@troels-desktop:~$ glxinfo | grep OpenGL
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon RX Vega (vega10, LLVM 13.0.1, DRM 3.42, 5.15.0-27-generic)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 22.0.1
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.0.1
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 22.0.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

Revision history for this message
Troels Petersen (thesleort) wrote :

I don't know how to MOZ_LOG it to filter all the relevant info.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. Which version of the snap do you use? Is that a wayland or xorg session?

Changed in firefox (Ubuntu):
status: New → Incomplete
Revision history for this message
Olivier Tilloy (osomon) wrote :

Can you open about:support in a tab, click the button to copy the raw data to the clipboard, and attach it here?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

about:support will tell you if Firefox is using "Wayland" or "Xwayland". The first option is better but currently not the default. To get a native Wayland experience you can do:

  sudo snap refresh --beta firefox

tags: added: jammy
Revision history for this message
Troels Petersen (thesleort) wrote :

Unfortunately it didn't help to enable the beta.

I added the about:support output

Revision history for this message
sagu (sagudev) wrote (last edit ):

As I have reported in https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1968929?comments=all I have the same bug, while running on Ubuntu 22.04 when forcing Wayland. I have Firefox Beta from tar, so it's not just snap issue.

Revision history for this message
Johannes Stöckelmaier (jostoe) wrote :

This problem also occurred to me using a fresh install of Ubuntu 22.04.

Firefox throws an error:
glxtest: Could not connect to wayland socket

Firefox falls back to xwayland. I noticed it as all the text was unsharp using fractional scaling.
The problem also occurred when removing firefox snap and installing it as flatpak.

Using firefox-esr (91.8) as snap solves the problem.

Revision history for this message
Troels Petersen (thesleort) wrote :

It works now in snap Firefox 102.0b2 (64-bit) on Ubuntu 22.04 LTS.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Troels, according to comment #6 this wasn't working with the beta snap when it was version 100, and it's now working at version 102. Can you test again the stable channel (currently at version 101) and let us know whether this is working there?

Revision history for this message
Troels Petersen (thesleort) wrote :

"snap info firefox" returns the following: (version appears to be 102.0b2-1)

name: firefox
summary: Mozilla Firefox web browser
publisher: Mozilla✓
store-url: https://snapcraft.io/firefox
contact: https://support.mozilla.org/kb/file-bug-report-or-feature-request-mozilla
license: unset
description: |
  Firefox is a powerful, extensible web browser with support for modern web
  application technologies.
commands:
  - firefox
  - firefox.geckodriver
snap-id: 3wdHCAVyZEmYsCMFDE9qt92UV8rC8Wdk
tracking: latest/beta
refresh-date: 3 days ago, at 21:57 CEST
channels:
  latest/stable: 101.0-2 2022-05-31 (1406) 170MB -
  latest/candidate: 101.0-2 2022-05-29 (1406) 170MB -
  latest/beta: 102.0b3-1 2022-06-03 (1422) 169MB -
  latest/edge: 103.0a1 2022-06-04 (1427) 179MB -
  esr/stable: 91.10.0esr-1 2022-05-31 (1391) 161MB -
  esr/candidate: 91.10.0esr-1 2022-05-23 (1391) 161MB -
  esr/beta: ↑
  esr/edge: ↑
installed: 102.0b2-1 (1415) 169MB -

Revision history for this message
Troels Petersen (thesleort) wrote (last edit ):

It also appears to be working with Firefox 101.0-2

Changed in firefox (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Fikrul Arif (fikr4n) wrote :

I experience the same, should I open a new bug report?

Firefox (snap) version: 112.0.2-1

$ glxinfo | grep OpenGL
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) UHD Graphics (CML GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 22.2.5
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.2.5
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 22.2.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

> I experience the same, should I open a new bug report?

Yes please.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.