Add switcheroo-control to the gnome-edition for hybrid graphics systems

Hi!

For hybrid graphics we already install prime-run by default, which lets us run programs with the dGPU on hybrid systems when launched from a terminal. For the gnome edition of Manjaro, we should consider adding the switcheroo-control package. This allows you to right-click on an application from the launcher and select “Launch using Dedicated Graphics Card”.

Skärmbild från 2021-03-28 11-25-26

This makes it much easier to choose which graphics card is used for a particular application. The alternative is to copy a system .desktop-file to .local/share/applications and adding prime-run before the command. Using switcheroo-control also makes it easier to launch flatpaks (and probably snaps although I haven’t tried that one myself) on the dedicated graphics card, since the recommendation I got was to add three new environmental variables with flatseal to the application:

__NV_PRIME_RENDER_OFFLOAD=1
__VK_LAYER_NV_optimus=NVIDIA_only
__GLX_VENDOR_LIBRARY_NAME=nvidia

Adding switcheroo-control would thus make it easier to launch these applications for the dGPU, regardless if the application is from the manjaro repositories or flatpak, and would make it much more beginner friendly due to not having to manually mess around with .desktop-files.

1 Like