Hi!
I’ve been thinking of ways to go about gpu accelerated windows virtualization, ive seen a couple examples before of people using an igpu as the host with a dgpu, but im not quite sure how I would go about it.
the general idea is to have either:
A. display output is run through igpu, but all the gpu work is done on a pcie Dgpu, until you start your windows vm, in which case your desktop is moved over to the igpu and the windows vm is gpu accelerated
B. the linux desktop is always run on the igpu, except for some apps that need more gpu horsepower in a similar way to how hybrid graphics is done on laptops, but make sure when you start a gpu accelerated vm it properly disconnects from the host and whatever (since no sr-iov, sadge) and see the vm through looking glass
the important part for me is not killing the host DE, ive done single gpu passthough before and found that incredibly annoying because the main thing i want to do is have specific games stay in the windows vm, while my browser and discord and everything is in linux
i dont quite have a APU yet, but ill pick up a ryzen 7 5700g on ebay if i see a clear path for this
my current setup is
ryzen 5 3600
amd rx 6700 (non-xt)
32g ddr4 3400 (oc’ed)
asus b550 proart
any good articles or other forum posts linked in the replies would be super helpful, or just knowing what order to put things together in
Leaving this here too to maybe clear things up and simplify
Display output would be from igpu
Igpu would be “host”
Dgpu runs games on linux (or ideally the whole desktop for production applications or so I can have av1 decode), and thats passed through to the igpu output
Once windows vm is started, pass dgpu over, igpu runs linux desktop, and use the windows vm through looking glass
I have such a setup with a 7950X and an RTX 3060. Depending on your DE there might be some annoyances (you need to make sure the DE doesn’t latch on to the dGPU and won’t let go). So which DE would you be using?
Also keep in mind all processes using the dGPU on the host will need to be killed to pass it through, so option A won’t really work. Better to go with option B and use switcherooctl or similar to run specific host apps on the dGPU.
The basic steps are
Bind dGPU to vfio on boot
Rebind to amdgpu after launching the DE (to make sure it does not run on dGPU but on the iGPU).
Run apps which need it on the dGPU using switcherooctl.
If you need the VM, exit those apps (you can use lsof to check which processes use the dGPU).
Rebind dGPU to host after exiting the VM.
Some resources that were useful to me when setting this up:
That’s what switcherooctl uses under the hood. But using it directly would be fine too.
Possible, using lsof + kill. What happens (on my system at least) is that the kernel just won’t let you unbind a device that’s in use, so no apps crash. The unbind process will just hang and the VM won’t launch until you kill/close all the apps.
KDE wayland is what the second resource I linked uses so that method should work for you, more or less. It does use nvidia but that should not be too different.
Also @quilt , would you happen to know of good resources to bypass anticheat/spoof hardware?
I plan on passing over 6 of the 8 cores I have, could I make it appear to the system that I have a 5600g or whatever? Just curious to whatever works best
(Obv my intention isn’t cheating, its to play games without dealing with windows )
Not really. I’m not that much of a gamer (my use case for a windows VM is 80% photo editing 20% offline gaming). I know you can set “kvm=hidden” somewhere in the config, but in general there is kind of a cat and mouse game going on between game studios and VM users. So strategies seem to change continuall. I remember seeing some thereads on the forum you could search for…