How to Set Up Render Offloading Between Two NVIDIA GPUs

My desktop has one entry level NVIDIA GPU, one high end NVIDIA GPU, and no integrated graphics (Ryzen CPU). I have my monitor plugged into the entry level GPU so that the high end GPU can have all its VRAM reserved for compute tasks. But I’d also like to be able to run Vulkan and OpenGL apps (such as games) on the high end GPU by using the Render Offload feature, while keeping the rest of my desktop environment rendered on the entry level GPU.

One of the resources I looked at is the PRIME guide. I tried following the steps to set up render offloading. However, when I run xrandr --listproviders, I am only shown NVIDIA-0 and NVIDIA-G0 providers. When setting either of these providers in an environment variable, the applications run only on my entry level GPU. But past driver releases indicate that the capability should exist for me to offload rendering to another NVIDIA GPU, even when both are using the official Linux driver.

How can I set up render offloading with one NVIDIA GPU as a source, and the other NVIDIA GPU as a sink?

My driver version is 470.74.

I guess you saw this

  • Added support for PRIME Display Offload where both the display offload
    source and display offload sink are driven by the NVIDIA X Driver.

which is about nvidia2nvidia PRIME output, not PRIME offload. So what you’re trying to do is not officially supported. Doesn’t necessarily mean it’s not working.
Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post so I can see which gpu is which in your setup.
I guess you already tried, as in the linked manual

__NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 __GLX_VENDOR_LIBRARY_NAME=nvidia glxgears

Thanks for the response. I attached an excerpt from my bug report log, which hopefully contains all the relevant information for troubleshooting PRIME. I haven’t looked through the entire log to check for identifying information that shouldn’t be posted, which is why it’s just an excerpt. Let me know if there is something missing that you need to see.
nvidia-bug-report.log.excerpt (36.5 KB)