Any way to get vfio to grab the primary gpu?

I’ve got a case with limited space and can only fit a shorter graphics card in the secondary. Since I’d like to use the more powerful GPU for Windows gaming, is there any way to convince Linux to use the secondary video card and get vfio to grab the primary GPU?

I’ve looked in the BIOS and there’s no way to make the second slot primary. I’ve also tried the disable_vga kernel parameter which got me a blank screen on both GPUs.

On what hardware? On some makes/models/UEFI versions (particularly later versions of UEFI) if you disable CSM in UEFI then the GPU in 2nd PCI-E slot will boot as primary.

I think if the primary GPU card is nVidia, then you shouldn’t need to worry about doing this anyway. Setup vfio to grab the primary card. When you turn on the PC, UEFI displays on Slot1 GPU and then as soon as Linux starts booting, vfio grabs the primary GPU before another driver is assigned and Linux will continue booting with display on Slot2 GPU. If your primary GPU is AMD, then you may have issues with this.

That’s my understanding from a lot of reading, just starting to experiment with this myself.

Unfortunately this is a Dell system with limited functionality in UEFI. There are no CSM options in UEFI, though I can choose between legacy and UEFI booting. I have a GTX 970, 1050Ti and RX 580 to work with, though it should be noted that the 970 will not fit in the bottom slot. From your comments, it seems like I should be able to use the 970 in the primary slot, reserve it for vfio in my kernel parameters and drop the 580 in the second slot.

I’m hoping that’ll work, but I think I’ll wait until next week to try it. I’m tired of fighting this thing. I’m also dealing with green sparkles on my monitor when trying to use the RX 580 + DP->DL-DVI adapter + DL-DVI switch + Dell monitor.