Play games in Windows on Linux! PCI passthrough quick guide

Linus here used 7 of the same graphics cards (Radeon R9 Nano) and he used unRAID.

unRAID uses KVM, so how is this possible?

What makes this possible on unRAID but not possible with any other Linux distro?

They use a proprietary in-house ACS Kernel patch. It’s a paid distribution version of Linux, after all.

Good luck getting them to release the code, cause they make money off of selling Linux with a UnRAID server pro license.

Isn’t the Linux kernel GPL licensed? How can they make money selling what’s basically a modified version of it? I doubt they’re doing proprietary stuff to it.

Well, they have to be doing proprietary sauce that isn’t public knowledge to get ACS working so well with multiple identical GPUs. ACS doesn’t cooperate well with GPUs with our current public knowledge of the patch. But Lime Tech has hires writing proprietary sauce to make it work, which will never be released to the public.

Remember, unRAID is a paid commercial distribution of Linux.

UnRAID is technically free, (30 day extendable trial). Their support is not. Much like how RedHat sells RHEL. Same with other services like Proxmox.

Heads up, the Q35 chipset has stopped working in Fedora 27 for passthrough. Avoid using Q35 because the Windows install ISO won’t even progress on that chipset now.

I would recommend using the FX chipset anyway, it offers newer features.

https://passthroughpo.st/vfio-increments/

just gonna leave this here for people looking to build a passthrough gaming specific PC

2 Likes

Anyone have success passing through two identical video cards? I have two GTX 770 cards I’d like to pass through to two different VMs. This is sort of as a proof of concept that the system can actually do this. Further down the road I plan on getting four higher end cards (900 or 1000 series) to pass through. Maybe Vega if they become available.

I went through the guide in the OP of this thread, didn’t work. I went through the old guide I used when I did the pass through set up with my desktop in late 2015 (http://vfio.blogspot.co.uk/2015/05/vfio-gpu-how-to-series-part-3-host.html) and it didn’t work. I tired a guide from the site @tkoham posted (https://passthroughpo.st/vfioselect-makes-gpu-passthrough-easy/). It still doesn’t work. The cards are not picked up by the vfio-pci driver.

Suggestions?

Edit: if anyone’s interested, here’s the results of the iommu script: https://pastebin.com/QKSEk8Ns
The two video cards are groups 16 and 17

If you have multiple of the same card, it complicates things. Please follow

https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Using_identical_guest_and_host_GPUs

and report back.

I have to reinstall Fedora. I broke stuff so bad I can’t fix it. I don’t feel like doing battle with it tonight, so I’ll try it at a later time.

For what it’s worth, I did try a script method and it didn’t work. I don’t know if it didn’t work because of all the different methods I tried and undid, or if I just messed it up somehow. I need to wipe everything and try again.

You need to build a custom kernel with the ACS patch. You cannot do 2 identical graphics cards with a vanilla kernel.

  1. Can somebody explain to me how does the sound work in this scenario without having two audio devices?

  2. Your guide mentions a patch to be applied to kernel 4.8. Is it still necessary for the latest stable kernel?

Is the ACS patch still required on kernels newer than 4.14? I think I saw a tutorial thread where it was marked as depreciated

You can passthrough the audio to host via Pulse Audio…

See here

I woud also like to know if this is the case. Means I could stop using the linux-vfio kernel from the AUR ,which takes ages to compile.

Yeah. So nothing I did worked.

Followed this guide (mostly): http://www.laketide.com/setting-up-gpu-passthrough-with-kvm-on-fedora/

Didn’t work.

Tried the script @tkoham suggested, setting up the first one to pass through all but the boot GPU. I added it to the vfio.conf file in modprobe.d, removing the entry from the main guide. I couldn’t do anything with mkinitcpio.conf, is that Arch-specific?

Anyway, it didn’t work.

I tried blacklisting nouveau, but it never seemed to work. Every time I boot the cards are assigned the nouveau driver.

Do I need to do the ACS patch? This system is running Fedora 27 with 4.14.16.

It looks like the vfio-pci driver isn’t being loaded at all. Not sure why. It doesn’t show up as an option when I do lspci -nnk

it depends on your system. I no longer have to use it because the VGA arbiter was added upstream, however my BF has to use it even with the same CPU, just has a different motherboard.

I’d recommend following the archwiki from start to finish instead. most of the info there is completely distro agnostic and much more up to date. does your CPU support vt-d? do you need the ACS patch? there’s a bunch of other variables at play here. you may even need to shuffle around where the cards are plugged in depending on the platform you’re on

I haven’t looked at this for a while. Sorta got frustrated and set it aside.

The system is a dual 8-core Xeon based server with the two GTX 770 graphics cards. Ideally, eventually, the system will have four graphics cards in it, probably not matching. I may split it so two VMs have two cards each, or I may have four VMs with one card each. Maybe do some deep learning type stuff, or try steam in home gaming again. Maybe water cool the two processors and four video cards in the 4U case. Lots of cool ideas for this system.

But before committing to more cards and the cool plans I need to prove that this will actually work.

I’ll go through the setup process from scratch sometime this week or weekend. It just takes up so much time. I won’t give up on this, though. I do want it to work.

SLI doesn’t work in VMs, just a heads up.

Server parts usually have proper iommu isolation, so that’s strange behavior.

might be a NUMA issue if it’s a 2 socket system