How to run WebGL on discrete Nvidia GPU for notebooks with Nvidia Optimus
The problem: WebGL runs slow even if I have a notebook with fast Nvidia graphics card.
This problem concerns Windows notebooks with dual Intel + Nvidia graphics cards with Nvidia Optimus.
Virtually all newer notebooks with Nvidia graphics card use Optimus. If you have a Windows notebook with Nvidia graphics you are very likely affected by this problem
What is Nvidia Optimus?
Nvidia Optimus is a technology where a notebook with two graphics cards (integrated Intel GPU and discrete Nvidia GPU) can dynamically switch between them during regular use based on the needs of the applications.
The goal of Optimus is to save battery life while still giving a chance for high-performance graphics.
Applications needing high performance should use faster discrete Nvidia GPU, applications needing longer battery life should use slower but less-energy-consuming integrated Intel GPU.
Optimus uses two approaches to determine which GPU to use:
- Automagicallyobserve required performance for running application.
- Usepredefined profiles per individual applications (both Nvidia supplied defaults for common applications and user-specified custom profiles).
In theory combination of these two approaches should work perfectly. If automagic detection fails, you should be able to just override application preference in Nvidia Control Panel and get whatever you need - faster performance or better battery life.
Now, the trouble is that Optimus is far from perfect. It kinda works, but it still fails fairly often.
You may end up with demanding applications running on slow Intel GPU or simple applications running needlessly on more power-hungry Nvidia GPU (this happens less often, Optimus tends to err on the side of battery savings).
Unfortunately Optimus implementation is not working 100% reliably and additionally Nvidia made some questionable decisions with their preset profiles:
- Some applications are justlocked-in to always use slower Intel GPU without users having any official way of how to enforce use of Nvidia GPU there.
- Some applications end uperrorneously using Intel GPU despite having selected Nvidia GPU in their Optimus profile.
How to fix this?
Once you have the latest drivers, open Nvidia Control Panel, e.g. via right-click on the desktop (or look for it via search in "Start" menu or in "Control Panel"):
Now go to 3D Settings > Manage 3D Settings > Program Settings tab, find the browsers and set Selected the preferred graphics processor for this program option to High-performance NVIDIA processor: