Return to

Play games in Windows on Linux! PCI passthrough quick guide



How do I get this vm onto the local network? Looking at adding another virtual network under qemu/kvm but im not sure.


Ive use to use bridged networking so the VM got it own local IP address from my router. I have a linux VM on NAT with virtio as well I use a lot that has a SMB share that the host can see fine as well.

Ping test but it should work bridged networking for sure. Windows can sometimes take a while to see a share but it does work.


If I follow everystep up to the end, and everything was fine until there, what could be the cause of having no reaction from the second monitor? I keep getting an black screen. I tried to switch both uefi and bios mode in virt-manager, but still a black screen… I only get a screen when I install a spice server, and when windows is installed, in the device manager I get a standard windows driver and not my amd driver.


Be careful with saying this. Not all i-series have Integrated Graphics. I have an i7-6850k, which has a ton of features, but no graphics. I knew what I was getting into when I bought it though. It’s best to just have people look up a prospective CPU on the manufacturer site to see what it supports, or get some help in doing so. Intel is pretty upfront with which processors can do what.


If you are buying enthusiast-class CPUs then I fully expect you to know. :wink:


True, but the problem with that mindset is that it ignores the standard audience of who will be reading the guide. :wink:


Just chiming in with a “success story” (still some tuning to do and so on).
Intel X299 (Asrock Fatality professional) running openSUSE Tumbleweed (hopefully Lunduke won’t come in the dead of night to slit my throat for not doing pure opensource gaming), passing through a 1080ti in the PCIe1 slot.
I use an rx550 for the host (slot 3), and also passthrough a PCIe USB controller and a soundcard.

Used guides on this forum to get my bearings. Thanks guys!
And @wendell is a hero, yes I donated, and /r/VFIO is also cool. Also used this old one for SUSE as a guiding line. Took about an evening, and I’m no Linux superman by any stretch.

Edit: openSUSE has pretty good official documentation as well, who’da’thunk…:rofl:


Hello guys,

First thank you GrayBoltWolf for your great tutorial. I was basicly triing to get this working on debian 8 since I built my PC in 2015, and only got it working after watching your tutorial and of last year.
Unfortunately I am running a i7 4790K (basicly haswell) for wich there is a known issue of hdmi sound not working when booting with intel_iommu=on (Mobo analog and digital audio works). Tried booting with intel_iommu=igfx_off, intel_iommu=on wich restores sound and breaks iommu grouping. So whenever I want to watch a movie I have to reboot without iommu …
This is a little annoying because it defeate the purpose.

I’m considering buying a “aorus Z270 gaming 7” (with i7-7700K) and was wondering if someone around here knew if this card gives proper grouping ??



I was playing with a gygabite GA-H270M-DS3H that I recently got on hand and saw the same issue. I was able to resolve it by adding intel_iommu=igfx_off to the kernel command line in grub.
Got proper iommu grouping (X16 pci slot was in group 1 with the intel pcie root port and the x4 pcie was alone in a separate group)

Where you able to solve your problem ?



Is there an update for kernel 4.10 on ubuntu for the acs patch?

someone said that the vnc and all graphic devices should be disabled, but why? we just attach another device that’s all, so it won’t be detected in devices by windows if we don’t?

For the moment I’ve managed to get the same result on lspci -k without the acs patch and I have added to the xml of my already existing win10 vm this part
<qemu:env name=“QEMU_PA_SAMPLES” value=“4096” />
<qemu:env name=“QEMU_AUDIO_DRV” value=“pa” />
<qemu:arg value="-device" />
<qemu:arg value=“ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1” />
<qemu:arg value="-device" />
<qemu:arg value=“vfio-pci,host=[GPU],bus=root.1,addr=00.0,multifunction=on,x-vga=on” />
<qemu:arg value="-device" />
<qemu:arg value=“vfio-pci,host=[Audio],bus=root.1,addr=00.1” />
<qemu:arg value="-cpu" />
<qemu:arg value=“host” />

from here

but apparently beside the sound, the vm doesn’t receive the gpu as a device… So what am I missing here?

my setup is i7-6700k, host on the integrated graphic, the gpu is a gtx 970 . So the gpu is loaded with vfio, it’s blacklisted, so beside of the acs patch, I don’t understand what is missing.
Is it because of the acs patch? because of my xml?
thanks in advance


I have this working Ubuntu 17.10, with the default ich6

apparmor causes issues with the sound as well, there is a way to edit ‘/etc/apparmor.d/abstractions/libvirt-qemu’ so that only the things you need that apparmor is blocking get through, instead of disabling it alltogether.

but for now all I did in addition to this guide to get sound is the following:

sudo nano /etc/libvirt/qemu.conf
add these 3 lines, replace mario with your host user name:

user = "mario"
nographics_allow_host_audio = 1
security_driver = "none"


The ACS patch is no longer necessary.

You do need to remove all the VNC and graphics adapters from the VM and for Nvidia have the proper qemu flags to spoof the VM and HV flags.


Will you do an updated video for this? I subbed your channel but there was no content for a really long time now :smiley:


I installed Windows 10, and I could not for the life of me figure out why Starcraft 2 and heroes of the storm was crashing. Then I found this thread

I am going to install windows 8.1 instead, apparently it resolves the issue.

What I REALLY want to install is windows 7, but it always just hangs at the starting windows logo. Really wish I could figure out why windows 7 wont install.


Have to have an EFI capable OS. Iirc windows 7 is BIOS only


I really want to, but there is only so much time and energy left after a 50+ hour a week job.

And I need some ideas for videos.


Just posting a followup. I have installed windows 8.1 and Starcraft 2 and heroes of the storm no longer crash like they did with windows 10.

hopefully this will save some people some time, maybe you can add a note to your main guide that says some applications will crash if you use win10. Just as that article on reddit says:


Great Tutorial GrayWolf!

New to Linux here but got it to work in just days. :smiley:.
I got the first GPU, (GPU1) to passthrough in VM1 and I see the GPU listed on DevManager (DM). Install the Nvidia Driver just fine, play like a boss.
The second, VM2, just doesn’t show the card, GPU2, in the DM. It list a Standard Microsoft Display device. When I try to update it with the Nvidia driver I get a blackscreen and a reboot T_T.

OS for both VMs: Win 8.1 64. Each got its own qcow image. I’m not even trying to boot both at the same time yet.

Specs: GA-Z77M-D3H, i5-3470, 16GB, 500GB.
GPU1: ASUS GTX750Ti x16 (Main) / GPU2: EVGA GTX 750 x4 (the one nearly at the end).
The Gpus HAVE DIFFERENT IDs except for the HDMI audio which is the same :S.
OS: Debian 9.2.1 64 bits Kernel: 4.9.0. and I DIDN’T recompile the kernel because IOMMU Groups seems fine. G1 have only 3 IDS (2 from GPU1 + 1 the root), and the G12 have only 2 IDS from the GPU2. Host is using the iGpu from MB.

Files & Outputs / Configs I’ve applied:



IOMMU Groups

lspci -k

[1_GTX750TI] Working.

[2_GTX750] No Gpu in DM. Blackscreen when installing nvidia drivers.

Any help would be highly appreciated. Many thanks in advance! :smiley:


If you could paste your lspci -k and VM configs into a reply, I’m not too thrilled about opening mega files from strangers. :wink:


A clearly worded, step-by-step, not morbidly outdated, PCI passthrough tutorial?! Thought such a thing didn’t exist. I love you so much, THANK YOU.
Quick question about the 2 gpu requirement: Is it possible to “mix” Nvidia and AMD gpus for that?
I got a R9 380, a Ryzen 5 cpu (thus, no igpu), and the closest to other AMD gpu I have is actually ATi, Radeon HD 4890… and it’s summer where I live…
If a GTX 650 Ti works, I’d much rather use that. Couldn’t catch anything about this after a quick read on the OP, hence my question.