I have an NVidia 1660 card with my main screen attached and a 5090 with my second screen attached.
What I would like to do is have everything run on the 1660 by default, then specific processes I want to run on the 5090.
I have not had any issue specifying the card for CUDA workloads, but have not been able to get this working for graphical workloads.
If I include both my GPUs in my xorg.conf then xrandr --listproviders will just report whatever GPU the main screen is attached to (the 1660)
My 1660 is index 0 and 5090 index 1 when checking nvidia-smi.
__NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-1 _NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep "OpenGL renderer"
Will report both the cards if both are configured in xorg.conf or just the one card there if only one is configured.
__NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-1 _NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia firefox
Will launch firefox, but when I run nvidia-smi, firefox does not show up. So it seems the environment variables are doing something, but not making the process run on GPU 1.
If I try variations on the __NV_PRIME_RENDER_OFFLOAD_PROVIDER value (different sources online seem to give different examples), again trying to launch firefox, all don’t show firefox running on either GPU in nvidia-smi. I tried:
NVIDIA-1GPU-3b389bf5-f9ed-85ed-5cab-f1dc6ea2a4b2(the guid given by nvidia-smi -L)GPU-1NVIDIA-G1
I have tried the above with the 5090 in the xorg.conf and without it, both with the same results.
Running firefox normally you can see it on the GPU in nvidia-smi.
I also tried with DRI_PRIME=1 and this makes no difference.
Does anyone have any advice on how to make a process run on a specific GPU?