WebGL and firefox still using Mesa Intel rather nvidia

Hi there,
I’m new on Manjaro and I don’t understand why my favorite game (starblast.io) is so sluggish. It’s a web game using 3D, and I was playing without any problem when my PC was under Win10.
Now I’m using Manjaro and very happy with it except browsers (tried Vivaldi too).

Of course, I’ve installed Nvidia’s drivers, and prime-run glxgears works like a charm.
If I try prime-run firefoxthen firefox launch but performances are poor (on the game) and about:support`still show that mesa Intel is used as GPU.

Here is my laptop configuration :
DELL G7 7700 with Manjaro 21 on SSD
Linux USS-VOYAGER 5.15.41-1-MANJARO #1 SMP PREEMPT Wed May 18 09:20:01 UTC 2022 x86_64 GNU/Linux
Hybrid GPU : Intel(R) UHD Graphics (CML GT2) + Nvidia RTX 2060
Two screens : laptop one’s (1920x1080) and LG ultrawide (2560x1080)

when launching any browsers (Vivaldi, Firefox) with prime-run, nvidia-smi see nothing :

| NVIDIA-SMI 510.73.05    Driver Version: 510.73.05    CUDA Version: 11.6     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0  On |                  N/A |
| N/A   60C    P8     8W /  N/A |     54MiB /  6144MiB |     32%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A       977      G   /usr/lib/Xorg                      53MiB |
+-----------------------------------------------------------------------------+

Command nvidia-settings show GPU-0 (Nvidia GeForce RTX 2060).
In browsers (or when launching them), there are some errors about EGL

[9013:9013:0524/085621.451920:ERROR:angle_platform_impl.cc(44)] Display.cpp:966 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.
[9013:9013:0524/085621.452064:ERROR:gl_surface_egl.cc(808)] EGL Driver message (Critical) eglInitialize: Invalid visual ID requested.
[9013:9013:0524/085621.452099:ERROR:gl_surface_egl.cc(1430)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[9013:9013:0524/085621.452392:ERROR:angle_platform_impl.cc(44)] Display.cpp:966 (initialize): ANGLE Display::initialize error 12289: Invalid visual ID requested.
[9013:9013:0524/085621.452420:ERROR:gl_surface_egl.cc(808)] EGL Driver message (Critical) eglInitialize: Invalid visual ID requested.
[9013:9013:0524/085621.452442:ERROR:gl_surface_egl.cc(1430)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[9013:9013:0524/085621.452467:ERROR:gl_ozone_egl.cc(20)] GLSurfaceEGL::InitializeOneOff failed.

I’ve already tested few post on this forum without success, but more of that, I don’t understand if I’ve to uninstall prime-run, install optimus, etc. so, 2022 explanations are welcome :wink:

1 Like

I’m having the same problem (prime-run works for glxgears but no for brave, chrome or any other browser)

I still have no idea how to solved this. How to force OpenGL using Nvidia?
image