The other day I say a post from Bryan Steiner detailing steps to dynamically bind and unbind a GPU from VFIO in Linux. However I believe there’s an issue with it. To use this system you must have two GPUs using two different drivers.
Bryan Steiner’s guide (can’t include links): github - bryansteiner
For my workflow this doesn’t work. I would prefer to have two Nvidia GPUs for use in a CUDA application. OpenCL is supported on AMD GPUs but it has a limited feature set in the application I use, an issue I kept running into over the last two weeks when I had a RX 570 for testing.
Bryan Steiner has pointed out that a dual Nvidia system may be possible with help from PCI override. But I’m unable to figure out how to get it work due to two reasons.
PCI override guide (can’t include links): Arch linux wiki - PCI passthrough via OVMF - Section “Using identical guest and host GPUs”.
- I’m fairly new to VFIO and this side of Linux and thus don’t have experience in this area.
- I don’t have a second Nvidia GPU to test with as of right now.
So can anyone help? Thanks in advanced - Tree McGee
What I’m trying to achieve.
Have two Nvidia GPUs with the Nvidia proprietary drivers (for CUDA) available in Linux. When I open a my Windows VM, one GPU binds to VFIO for use in Windows. The other GPU I would hope to still be available on Linux if I need it for CUDA or something else. Once I close the VM, the VFIO GPU is bound back to Linux and I can start to use both of them for CUDA again.
I should note that the GPU that I wish to not to bind to VFIO will always be the display out for Linux.
Specs:
CPU: Ryzne 9 3900X
Motherboard: Gigabyte Aorus Elite Wifi (Great IOMMU groups)
RAM: 2x16GB 3200Mhz Corsair Vengeance Pro RGB
GPU 1 (VFIO GPU): Hopefully a RTX 2060 Super
GPU 2 (Linux GPU): GTX 1050ti
Distro: Pop!_OS 18.04 LTS