SDB:NVIDIA Switcheroo Control

Jump to: navigation, search


Tested on openSUSE

Recommended articles

Icon-manual.png


Switcheroo Control is a D-Bus service to check the availability of hybrid GPU configurations and integrate with the desktop environment.

Situation

You have a laptop with an NVIDIA discrete graphics card and Intel or AMD integrated GPU (iGPU), otherwise known as NVIDIA Optimus technology. You may need to run programs using the discrete graphics card, but you don't want the discrete graphics active all the time, because that would cause the laptop to consume too much energy.

switcheroo-control is independent from the used desktop environment. Gnome and KDE Plasma offer a GUI integration for hybrid graphics. For other desktop environments, the switch between the GPUs need to be performed via a terminal as described below.


Procedure

This procedure is applicable for Leap and Tumbleweed installations.

Install NVIDIA Drivers

Install the NVIDIA drivers: SDB:NVIDIA drivers

After finishing the driver install with Myrlyn or Zypper, the next step is to reboot to continue the install. If you have secure boot enabled, enroll the keys to the MOK database.

Remove suse-prime

Next, remove and lock suse-prime if it is installed.

sudo zypper remove suse-prime
sudo zypper al suse-prime

Install and Enable Switcheroo Control

sudo zypper in switcheroo-control
sudo systemctl enable --now switcheroo-control.service

Verification and commands

After NVIDIA driver setup is complete, verify that right clicking on apps in the Gnome app menu gives one of the following two options:

  • "Launch Using Dedicated Graphics Card"
  • "Launch Using Integrated Graphics Card"

For all other desktop environments without a GUI integration, the following commands need to be used.

List the known GPUs: The device number can be used to specify the GPU to launch on for the launch command. This is the default command if no commands are passed to switcherooctl:

switcherooctl list

If switcherooctl list does not list any GPU, the switcheroo-control.service is not enabled.

Launch application on a specific GPU: If no GPU is specified the first discrete (non-default) GPU is used, or the default GPU if there's no discrete GPU. The -g option defines the GPU to launch the application on. The GPU identifier can be gathered using the list command:

switcherooctl launch -g 1 <application>

External links