GTA V on Linux (Skylake Build + Hardware VM Passthrough)

Nope, unless you run some sort of multi-configuration once you have black listed a device (GPU) and removed it from Linux's control it will never be available for Linux to use as every time you boot it is removed from the devices that Linux (host) can control....which is why you need two dedicated GPUs one for host and one for the guest, if you want to game in both OSs you will need two GPUs of your liking.

On my system if I shut down the KVM I only get the memory and CPU cores returned to the host because they are being provided virtually to the guest, I also have a dedicated monitor used by the GPU in the KVM and it goes dark loosing signal until the KVM is restarted, most of the devices my setup uses are physically passed through to the guest using QEMU/PCI-STUB so they will never be seen or used by Linux.

1 Like

By all means keep us posted on that 390 issue. I plan on removing one of my GTX 770s and getting a 390 for this very purpose (a single 770 for Linux, a 390 for Windows VM)

But I'm a broke college student ;(

Really interesting, I managed to fuck up everything (thank god I made a backup first :D). Seems my hardware is too old to support this. Anyway I'll be checking back here when I finally upgrade my main rig. Just out of curiosity, is there a "softer" way of doing this? for example, if I have W10 installed on another drive, can I somehow choose whether to boot it or virtualize it under linux?

I'm ok with dual booting, but sometimes I just need to open Illustrator to export a file to another format. I don't need the snappyness required to actually work with it, just enter the program and hit "file -> export/save as.." It would save some time if In that case I can just boot my actual win installation from a vm, do it, and then close it afterwards, instead of closing everything I've got on my linux machine to go back to windows, do the thing and reboot back to linux.

Thanks @wendell for the info, I've been wanting to know if something like this could be used. Btw I used to have synergy several years ago, it was called Synergy-foss and it was free donationware. Seems nobody donated and they changed to 10 bucks admission fee

Nice article, nice video, but I have to disagree with some of the suggestions. First, Skylake. There's no panacea here, there's really nothing special about Skylake for this kind of thing, in fact it's not what I would consider the best choice in the Intel lineup. Device isolation and the resulting IOMMU grouping is quite poor on Skylake, so everything plugged into the processor root ports will be in one IOMMU group and everything plugged into the PCH root ports will be in another, often including onboard I/O devices. This is the reason you need the ACS override patch and commandline option and the reason that you'll likely always need a kernel patch for this system unless you have a very limited hardware configuration. The hardware itself does not offer device isolation, so you're putting yourself at risk of unintended peer-to-peer between devices when using the override.
We have quirks for isolation of the PCH root ports for almost all previous generation platforms, so Haswells and Ivy Bridge, even Sandy Bridge, will offer better isolation for those slots. Unfortunately Intel has chosen not to support isolation on processor root ports for i5, i7, and Xeon E3. My general recommendation therefore continues to be a Xeon E5 paired with X99/C612. It offers far more flexibility than Skylake.
My other comment is on the choice of GPU. Nvidia may be actively working against running GeForce cards in a VM, but we know how to work around it (for now) and the loss of the virtualization extensions is not that significant. GeForce cards behave well when the VM is configured to support them. AMD cards on the other hand are a nightmare of reset issues and BSOD. There are cards that work well and there are cards that are exceptionally frustrating. If you want to choose AMD to vote with your wallet, by all means do so, but do your homework first to figure out what cards are working well for people first.
Finally, I think the recommendation for kernel v4.1 or newer here largely stems from the use of Skylake. I'm all for newer is better, but there's nothing all that special in v4.1 for this use case. The vfio driver has been in the kernel since v3.6 and I would consider anything newer than v3.13 as having a pretty significant chance of having this working.
Also, the important thing about OVMF, especially in the case of i915 host graphics, is not that the VM boots quickly, but that we can assign a GPU without it requiring access to legacy VGA I/O accesses. The VM is effectively "legacy free" as far as graphics is concerned, meaning we only need to provide access to the PCI defined address spaces of the GPU. Thanks

I want to try this but I am running a lenovo W540 with a nvida Quadro k2100m with optimus. Could this work for me?

depends very much on what the board supports, youll be lucky if it works. also start by checking what features your CPU supports, if IOMMU and VT-d arent supported youre fucked

I was looking forward to installing Linux as a plausible daily driver with Windows in a VM with KVM. I've got two 980s so using a card for each system seemed plausible.

I gave Linux another crack on my system yesterday.
The last time I installed it I was fairly quick to remove the harddrive again as most of the games weren't compatible, the sound card wasn't compatible but mostly I couldn't be bothered at the time.
I installed Kubuntu 15, tweaked it to my liking and started ironing out a couple of issues, like the whole desktop moving up when I moved the cursor to the top of the screen. I rebooted but the system shut off and went into an infinite loop of trying to boot again (gets to BIOS splash, shuts off then powers on again). I ran out of time to diagnose so I left it.
Today I went back at it with a fresh mind. I reset the BIOS, changed "Windows 8 Features" to "Other OS", disabled the fast boot options and made sure everything else was as stock as possible. I booted it up again, installed some more software, customised the UI, configured auto-mounting of the other harddrives and even rebooted a couple of times, in between settings.
I then got to trying to diagnose the sound card. It worked a couple of times but it stopped playing audio at all. I then reset the config, tried fiddling with the volumes and mute options and decided to reboot. The system then decided to go into an infinite boot loop again.

So, I've parked it again. I'm willing to rack my brains and scout around for issues with the software but really don't want to keep resetting the BIOS just to boot to the OS.

I've always thought about a setup similar to this, but instead being some giant X99 monster with three or four non-SLI'd or Crossfire'd cards with 64GB of RAM, tons of cores, and three or four gaming VM's across multiple monitors, keyboards and mice. Basically, an entire LAN party in one box.

Is anyone actually crazy enough to do it?

1 Like

I'm slightly confused, in my UEFI menu I can enable VT-d to on. I do not see anything else about IOMMU. Is VT-d synonymous with IOMMU?

your board enables it with VTd enabled but you may need the kernel parameter to tell linux to use it.

1 Like

Thanks for the response and awesome post! I guess my condensed question would be...how can I know for sure my hardware supports this? I would rather not find out after I blacklist my graphics driver etc and documentation on what hardware is supported is rather lacking.

my mobo is an: ASROCK Z97 Pro 4
http://www.asrock.com/mb/Intel/Z97%20Pro4/

CPU is Devils canyon i5 4690k

I can enable VT-d in the UEFI and the CPU supports VT-d I so I should be good? Aside from software settings of course.

Thanks in advance!

pci stub, you assign the card to not boot

tried that, somehow radeon still manages to grab it milliseconds before pci-stub tries to
with dracut systems you can make kernel modules load in a certain order, which would make this doable, but i have no idea on how to do that with non-dracut systems

@wendell thanks for the reply. I had tried this with some time I found this morning before running off to work and...no dice!

I tried the one with VARS and my display wouldn't turn on. I went back to CODE and wa-la! However, still no boot device. I'm trying to boot my image (.iso) right now to install Windows on an blank .img. Neither device show-up in the UEFI menu... I checked my image and it works, so the UEFI is definitely not seeing it. Would you be able to provide the location where you picked-up your .rpm to extract the UEFI .fd files and also the line you used to boot the Windows install DVD?

Also, I'm, trying to use a KVM switch to be able to flip between VM and host but my addresses change each time I hit the button on the KVM, so I can't be consistent on the passthrough :( I have the ASRock Z170 Pro4 and it seems like the entire USB ports are on bus 1, so I can't even segregate it by bus...Forget the part about the Corsair K70 seriously not enjoying it's experience in Linux.

Any tips would be appreciated.

What GPU are you using?

Nvidia GeForce GTX 970, I'm aware of the driver complications.

Then the answer to your question is, yes.

I just came across a post somewhere where someone said they had a successfully installed the driver for their AMD GPU by avoiding the installation of Catalyst Control Center. If you don't care so much for CCC, maybe give that a shot (if you haven't already).

well this is crazy i mean i really really wanna do this but i feel i don't know enough about linux to even begin to start i mean computer science and software and just crazy things like this fascinate me its what i'm going to collage for although i am not currently taking any classes related to my major but yeah i mean i have been using linux for a while now and i love it i mean i love having to figure stuff out getting things to work just right then feeling accomplished afterwards but i really don't know that much and this is well over my head and from what i can gather from what i have read so far i need a second gpu i am using an x99 based system with a gtx 980 but i dont wanna buy another gpu until i can get it to work so my question is can i steel a gpu from an old dell and slap in in here to run in my case manjaro linux and then passthrough my gtx980