Dynamically Switching NVIDIA and AMD Graphics card

Hi,

I’m running Linux (manjaro) and also like to play games. Most games run fine using Proton/wine/lutris but some games do not work in linux (yet). For the games that do not work in Linux in the past I was using QEMU with PCIe passthrough with a WIndows VM.

I was able to dynamically switch my Linux host from my NVIDIA GPU to the intel iGPU to use the NVIDIA GPU in the windows VM. Now I would like to upgrad my PC using a new AMD CPU. Unfortunately, all CPUs with more then 4 Cores do not have any iGPU.

My Plan at the moment would be, to get also a new AMD GPU (RX 5700 XT or big navi when it comes out) and a low power NVIDIA graphics card (e.g. 1050 Ti passive cooled).

As I would like to play as many games in Linux as possible (so I don’t have to always boot the VM) I would like to use the AMD GPU in Linux until I have to boot the VM.

My Question now is:

Is it possible to dynamically switch between NVIDIA and AMD GPUs under Linux?

Would it be easier to use a second AMD GPU so I would not have to switch graphics driver?

If not, do you have any other idea how I could get this done?

BR
Thomas

Nope.

You could have one in host and one in VM tho

I mean that would just be easier over all

2 Likes

Well maybe worth considering to stick with intel?
9900K (S) with a Z390 board?
I mean in terms of pricing it won´t be that significantly.
The 9900K or 9900KS is going to be a little bit more expensive,
then a 3700X / 3800X.
However board prices for X570 and Z390 will be similar,
or for Z390 even cheaper on certain occasions.

I know this does not really directly answers your question,
in regards to an AMD Ryzen setup.
However i still think that Intel would be a viable option to consider.

I mean with AMD Ryzen 3700X / 3800X, the easiest way,
would be to buy a second gpu.
But that combined will likely cost you more then,
just a 9900KS + a decent Z390 board.
And next to that, it will also be way less power efficient also.

:slight_smile:

Is it possible to dynamically switch between NVIDIA and AMD GPUs under Linux?

With modern Nvidia, I don’t think so. with Noveu and amdgpu, drivers you may be able to set up a config for PRIME. See the arch wiki for Hybrid_graphics

What I would do is use the low-power card in your primary linux enviroment, and set up two VM’s with passthrough. One for linux gaming (steam, game code, and proton may be better off isolated anyways) and the other for windows gaming. Then spin up one or the other with when it’s time to game.

Hi,

Thank you so much for your input.

Yes I also considered using an intel 9900K or something like this but the value proposition does not seem to be as good as with AMD. I would get a R7 3700X + GTX 1050 ti for around 20 € less then the 9900K (mainboard not considered yet).

Yes it would be more power efficient to go with a 9900K but the computer is not running very much (about 2 - 3 hours a day max). The I7 also only provides 16 PCIe lanes afaik but I’m using a PCIe M.2 Drive which would only leave PCIe x8 for the graphics card

Do you mean with modern NVIDIA GPU or the NVIDIA closed-source driver? Using open source driver should not be an issue for me because the AMD open source driver is quite good (afaik) and I would not need any heavy lifting from the NVIDIA graphics cards. I will take a look into PRIME if I can use this.

If you mean modern GPUS, what generation of GPU do you think is the latest with which this might be possible?

I would want to play games in Linux do not always boot a VM to play, thats why I would like to dynamically switch graphics cards.

Ah yeah i see the intel stuff also went back up in price again.
Well yeah of course Ryzen 3700X is always going to a better deal in that regards.
Of course i would recommend to go with a X570 board.

But the way i was mainly thinking in terms of the 9900K,
is that it has an igpu.
So you wouldn´t nessesarly need to buy a second gpu,
like you have to with AMD.
That was more like my initial thought behind it.

Pascal and later seem pretty limited on the open source drivers. Basic mode-setting works, but things like power management don’t.

And I’m not really sure on how well PRIME interacts with hot-plug/ dynamic re-asignment of graphics cars.