I'm running Kubuntu 21.10 under Xorg on an Intel Hades Canyon NUC - model NUC8i7HVK.
It contains two GPUs, one Intel and one AMD. In general desktop use on the Intel GPU is fine.
By default the desktop launches using the Intel GPU. Playing games in Steam, I don't get great framerates. I know the AMD GPU is slightly better at that.
How do I make Steam (and all subsequent game launches) use the AMD GPU?
alan@robot:~$ switcherooctl list
Device: 0
Name: Advanced Micro Devices, Inc. [AMD®/ATI] Polaris 22 XT [Radeon RX Vega M GH]
Default: yes
Environment: DRI_PRIME=pci-0000_01_00_0
Device: 1
Name: Intel® HD Graphics 630
Default: no
Environment: DRI_PRIME=pci-0000_00_02_0
alan@robot:~$ DRI_PRIME=0 glxinfo | grep vendor
server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
OpenGL vendor string: AMD
alan@robot:~$ DRI_PRIME=1 glxinfo | grep vendor
server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
OpenGL vendor string: Intel
The Steam desktop file in /usr/share/applications/steam.desktop
contains:
PrefersNonDefaultGPU=true
X-KDE-RunOnDiscreteGpu=true
I have tried running:
DRI_PRIME=0 steam
But that didn't appear to work as the game I played (TrackMania² Stadium (under Proton, in case it matters)) shows the GPU as Intel, not AMD.
Edit: I have also tried setting DXVK_FILTER_DEVICE_NAME=POLARIS22
in the launch arguments in Steam. The game fails to launch correctly with that. A window appears then disappears.
Further, I gathered a log file via proton with: DRI_PRIME=0 DXVK_FILTER_DEVICE_NAME=POLARIS22 PROTON_LOG=1 %command%
as the launch options. Log is here