Many laptops come with an extra GPU. In the past it was difficult to setup your computer to use the dedicated (powerful) GPU (dGPU) for heavier workloads while it can use the integrated GPU (iGPU) for anything else. Once the switcheroo service was setup, I had nothing to do anymore but let it handle my GPUs.

Prerequisites

Switcheroo is a solution for GNOME only.

Check which GPU is in use

Use: glxinfo | grep "OpenGL renderer" to see what GPU is currently in use. The output on my machine was: OpenGL renderer string: AMD Radeon Graphics (...). Install (for example) Steam and navigate to “Help > System Information” to see which GPU is recognized. Without switcheroo, Steam recognized my Radeon iGPU. Start a graphics intensive game and see if it is lagging. It was in my case.

Install switcheroo & enable it

Make sure beforehand that you have up-to-date GPU drivers.

  1. sudo pacman -Syu switcheroo-control
  2. sudo systemctl enable switcheroo-control.service
  3. Reboot
  4. systemctl status switcheroo-control.service

How do I know it works?

I checked it by checking the Steam settings again. Instead of my iGPU Steam recognized my dGPU. When trying out the same game again and it was lag free. When checking my system with glxinfo however, it was still the AMD Radeon being in use. Just as intended, the dGPU will be used for the heavy lifting in games only.

How does switcheroo work?

Applications have a “desktop file”. This file specifies for example the desktop icon you see when you create a desktop shortcut for the application. It can also specify, which graphic card to use.

Steam is using this, but see for yourself:

  1. pacman -Qql steam | grep desktop
  2. open /usr/share/applications/steam.desktop

Todo: insert image

This also means it might not work out of the box for any other games or other platforms.

Sources