Use a single gpu for wine and vm pcie pass-through

Krik@feddit.de to Linux@lemmy.ml – 14 points –

Hi!

It's just an idea to make dualboot superfluous.

Is it possible to do that:

  • Run Wayland on the integrated gpu (igpu).

  • Run Wine/Proton on the discreet gpu (dgpu) and play games.

  • If you don't want to run wine, run (manually) a script that detaches the dgpu from the linux system and free it for vm pass-through usage.

  • Run Windows in a vm with the dgpu and play games.

  • Still have the option to switch on the fly to the linux system because it runs independently on the igpu. Both dgpu and igpu need to be connected separately to your monitor for that to work. Might need a KVM switch to well... switch mouse, keyboard and active display between linux and vm.

  • If you shutdown the vm run (manually) a script to detach the dgpu from vm pass-through and reattach it to the linux system for wine use.

In theory it should work but I read about errors on some AMD gpus (RX 5000 series? can't remember) that needed a system reboot every time you reattach them to the linux system again. I don't know if that bug still exists on more modern AMD gpus (RX 6000 & 7000 series)

What do you think? Is it possible? Are there showstoppers I'm unaware of?

3

I've thought about trying that with my 7900xt, but never bothered actually doing it since everything I play runs on Linux. However I saw some posts about a project called something along the lines of pcie-passthrough-manager, that would be my starting point when trying that

If you mean this manager it's a tool to create the initial vfio configuration for the passthrough. You can do it by hand.

Yup that's probably what I meant. In that case idk. It's prbly still possible, but you might have to live reload the kernel, which is possible, but I guess there's a reason why basically no distro uses this feature