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:
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 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:
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 an usually not recommended, because
To launch Steam games on your dedicated GPU, add the following to your game start parameters:
prime-run %command%
DRI_PRIME=1 %command%
Other launch parameters can be appended to the end like so:
Example: prime-run %command% --fullscreen