Running Steam games on the correct dGPU with DRI_PRIME environment variable
I added the following to the launch options in Steam:
DRI_PRIME=0 DXVK_ASYNC=1 gamemoderun %command%
ID 0 is my dedicated GPU (displayed as AMD Radeon RX 7800 XT), ID 1 my internal GPU (just displayed as AMD Radeon Graphics; it's in an AMD Ryzen 7 7800X3D).
However, the game (in this case Satisfactory, an Unreal Engine 5 game) still runs on GPU 1, the iGPU. Even when I edit the Steam .desktop launcher file to run the command like this:
- Environment variables:
DRI_PRIME=0
- Executable:
/usr/bin/steam-native
- Arguments:
%U
It still gets started on the wrong GPU with obviously abysmal performance. How do I fix this?
When I run it with the following Steam launch options:
Satisfactory seems to somewhat reliably get the correct GPU, but not 100% of the time. The filter part I had to get from
DRI_PRIME=0 vulkaninfo | grep "deviceName"
. You can apparently also useDXVK_FILTER_DEVICE_NAME="AMD Radeon RX"
.