Skip to content

Switching between integrated and dedicated graphics

If your device (usually laptop) features 2 graphics cards, Garuda Linux by default only uses your integrated GPU to save power. This article will elaborate on how to “switch” to your dedicated GPU for running GPU intensive applications such as games.

If you have an NVIDIA dedicated GPU with the proprietary NVIDIA drivers, you can start an application using NVIDIA’s official “PRIME Render Offload” technology by prepending the “prime-run” command. Example: prime-run glxgears

You can verify PRIME Render Offload is working correctly by using the following command:

Terminal window
prime-run glxinfo -B | grep "OpenGL vendor string"

Your output should look similar to this:

OpenGL vendor string: NVIDIA Corporation

If you have an NVIDIA GPU without the proprietary driver installed or have an AMD GPU, you can start an application using PRIME by prepending the “DRI_PRIME=1” environment variable. Example: DRI_PRIME=1 glxgears

You can verify PRIME is working correctly by using the following command:

Terminal window
DRI_PRIME=1 glxinfo -B | grep "OpenGL vendor string"

Your output should look similar to this:

OpenGL vendor string: AMD

Quite often, software such as “optimus-manager” or “optimus-switch” is used instead of PRIME. Although they feature “hybrid mode”, they also feature modes that exclusively switch to the dedicated or iGPU. Using these modes is usually not recommended, because

  1. Support for wayland is lacking/non existent
  2. If your NVIDIA driver ever fails to load, your system will be unable to enter a graphical session
  3. In NVIDIA mode, the dedicated GPU is always used and therefore always turned on even if no software that could properly take advantage of it is running. The iGPU is much better suited for running low power common desktop applications.
  4. Switching modes requires logging out and logging back in or otherwise restarting X11. Meanwhile PRIME can be used without restarting X11.

To launch Steam games on your dedicated GPU, add the following to your game start parameters:

prime-run %command%

Other launch parameters can be appended to the end like so: Example: prime-run %command% --fullscreen