Forcing app to run with dedicated GPU when PRIME profile is On-Demand


I’m running FF on a laptop running Ubuntu with an Intel integrated GPU, and a dedicated NVIDIA GPU, with PRIME profile set to On-Demand.

But when I’m trying to run FF with PRIME offloading, I see WebRender is running in software mode, which is not good.

If I’m running FF regularly with the PRIME profile set to On-Demand, FF using the integrated GPU as WebGL driver renderer, which is not good neither.

Any idea how to run FF with proper hardware acceleration in this environment? Or maybe how to force an app to use the dedicated GPU only?