Rebinding nvidia GPU for OpenCL/CUDA use

Hi all,

I’ve got an interesting situation going on with my main workstation. I have two GPUs a 1070 Ti and a 1060. I have the 1070 bound for passthrough and the 1060 bound for display.

I’ve got a rather unique use-case here:

I’ve got the 1060 almost exclusively for host output and mild gpu accelerations (low-power games, etc…)

I have the 1070 for VM output, games and video editing. I use Davinci Resolve on my Fedora host, but I run out of GPU memory on my 1060, because I bought the 3GB variant. So that requires the 1070, meaning I have to rebind it. The rebind isn’t so much the problem, that’s easy. The hard part is getting the the userspace tools to pick up the new GPU.

I can rebind the 1070 to nvidia or nvidia-drm with a echo 1 | sudo tee remove and it seems to take the driver properly, but nvidia-smi doesn’t pick up the GPU. Does anyone know how I’m supposed to tell nvidia that the GPU is now available?

Once I get something reliable, I’ll probably be releasing a tool to make this quick and easy.


Since I’m sure I’ll have someone asking about this, no, I can’t leave the GPU running nvidia on boot, that causes issues with how SDDM and KDE select a default output GPU.

So, it turns out that restarting SDDM solve the problem with the 1070 not showing up. Now I just need to see if I can’t get it working without an x reboot.

1 Like