I currently have two GPUs connected to my PC: a GTX 1060 that drives all my monitors, and an RTX 3070 that currently doesn’t have anything hooked up to it. The 3070’s driver is blocked from loading during boot via vfio-pci, and I am manually re-binding it to the nvidia
driver after boot. After this, nvidia-smi
reports both cards as active.
I’ve been trying to use Nvidia PRIME with prime-run
to get my games to run on the “headless” 3070, and send the rendered frames back to the 1060, similarly to how it would work on any modern gaming laptop with an iGPU+dGPU setup. Unfortunately, I haven’t been able to get anything to actually use the 3070 through prime, even though both cards are connected and working under the nvidia driver.
I even tried selecting the card by ID using __NV_PRIME_RENDER_OFFLOAD_PROVIDER
, but it doesn’t make a difference. here’s an example glxgears
output:
__NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G1 prime-run glxgears -info | grep -i -e "GL_RENDERER" -e "GL_VERSION"
GL_RENDERER = NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2
GL_VERSION = 4.6.0 NVIDIA 555.52.04
According to nvidia-smi
, the ID of the second card is 1, so the command above should be forcing glxgears to use the 3070, but it still only uses the 1060.
The reason I want to do all this is because occasionally I want to be able to use the 3070 in a Windows 11 VM via VFIO passthrough, without having to shut down my host Wayland session.
I’ve seen people succeed with this, even on the desktop, by connecting a single monitor to their CPU’s built-in Intel GPU, but I can’t do that because I have more monitors than there are HDMI/DP ports on my motherboard. Because of this, I have to use two dGPUs.
So I guess my question is, can prime render offload work between two Nvidia GPUs instead of an Intel iGPU and a dedicated Nvidia dGPU? And if so, what am I doing wrong with the commands above, and why aren’t my graphics apps using the 3070 when run through prime-run
?
Here are some extra command outputs: