How to choose GPU for Steam in a dual discrete GPU setup

On my system, I have two discrete GPUs - a P400 and an Nvidia 3090. I use the former for Xorg process and have connected my two monitors to it. I use the 3090 for heavier computation work using CUDA_VISIBLE_DEVICES=0 for using the said GPU. Steam, however, only uses the P400 - and therefore I am unable to run any game (Tekken7, War Thunder, Frostpunk) due to lack of memory. I have tried using DRI_PRIME=0 (In launch options) and CUDA_VISIBLE_DEVICES=0 steam, but to no avail. The steam games continue to use the 2GB P400 (which basically means nothing runs). Is there a way I can run the Steam games on the second GPU?

Edit - I do not have a iGPU.

Startup Options:

prime-run %command%

or just run steam:

prime-run steam-native
1 Like

I’m pretty sure DRI_PRIME=1 is for AMD devices, and prime-run is for Nvidia.
Also, for me the command to launch steam is just steam, not steam-native in case that’s not working for you.

1 Like

I tried this but it isn’t working. Adding the commands to either startup options or running steam does not seem to be using the second GPU (I use glances and nvidia-smi to track this).

To check prime-run, I ran

prime-run glxinfo | grep 'renderer string'
OpenGL renderer string: NVIDIA GeForce RTX 3090/PCIe/SSE2

So, that seems to be working.