I have an Optimus laptop with an Intel iGPU and an Nvidia dGPU, and just noticed that when using the Nvidia GPU (activated with prime-select nvidia), WebGL-based games run software-rendered on the Firefox browser, with the noticeable performance problems one can imagine.
The Nvidia driver is properly loaded, I can play “standard” (i.e. non-browser) games correctly, but everything inside Firefox is software-rendered. about:support indeed shows two GPUs, GPU1 being llvmpipe (LLVM 15.0.7, 256 bits), and GPU2, marked inactive, being my Intel dGPU (vendor/device being 0x8086/0x9bc4).
When I use the Intel GPU only (prime-select intel), hardware acceleration works properly for WebGL games on Firefox.
I use the latest 535 Nvidia driver, with X11, not Wayland, on 23.04 (lunar).
Any suggestions on what I should do to have Firefox detect my Nvidia GPU as it does with Intel Graphics ?