Return to

Elementary OS 5.0 / Ubuntu 18.XX - VFIO PCIe passthrough guide / tutorial


to be honest, i had to tweak it a lot. Single click to open folders/files just sucks, changed to typical double-click, then switched to dark theme, added minimize button back into UI and moved all header buttons to the right, but overlay im happy with it :smiley:

Used my own tutorial at work while moving to linux, since i need Windows VM to run Photoshop + for testing as well i guess (web dev)

Runs fine, Windows VM has few BSODs, but whats weird that photoshop keeps freezing up from time to time, but that could be related to something else, cuz im loading files from SMB share from my linux host, so windows may be just derping connecting to that



i was thinking about this a lot, first tried just RDP into Windows VM, but quality+performance was poor even connecting to local VM, then had KVM in mind, but that would be too much work to keep switching between host/client all the time. Decided to just buy synergy instead, works fine :smiley:

but it really depends, if your VM has dedicated monitor, kvm switch/synergy would be fine, if you have fake monitor plug, guess you could try setting up looking glass.

I decided to just dedicate one monitor, since i had one monitor just for photoshop when i was full Windows anyway



@elixir77 I thought about getting a KVM switch but instead I’m using a “soft switch”, essentially just run a script to disconnect / connect the moose and keyboard from the VM. There’s a little bit of delay but at the moment I have to physically swap the monitor connection (another cable is coming soon) between Mobo and GPU so it’s fine.

I can write up a little guide for that if anyone’s interested.

@wUFr yeah I’ve been planning on trying out synergy but it doesn’t support Wayland yet which is unfortunate. Luckily it’s not too difficult to switch back to X for the time being. I’ll probably use synergy when I get my new monitor.

One more thing, wanted to share these guides. Have some useful information for optimization.



also, decided to change title of this thread a bit, since all this should work on Ubuntu 18+ as well and removed “beta” since i managed to set this all up in fully released EOS 5

1 Like


update on my setup

everything works fine, except storage, which i assume is VIRTIO driver issue in Windows 10 VM, sometimes it gets terrible read speeds or even BSODs… to be fair i may f-cked it myself, when i was trying to use memory balooning feature, which seemed broken. It would still use all the ram in host OS and Windows VM ram would still show 16GB with only difference it being almost always full - which i assume was some driver issue… idk :smiley:

kinda sad, considering hyper-V can do dynamic memory with Windows VM, so im gonna blame VIRTIO drivers :stuck_out_tongue:

PS: Windows VM drive is dedicated sata SSD


Dual Graphics VM?

wasnt it because of gpu passthrough you cannot use dynamic memory at the same time? i think it was the same on hyper-v but not sure, cant remember…
virtio drivers are latest?



idk. Drivers should be latest, but i dont even remember, where i pulled them from by now. I think i had to dig them from some redhat site :smiley:



ok, tried these settings and it seems to work way better now








I followed this guide but only the audio device seems to have the correct kernel driver identified.

06:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP104 [GeForce GTX 1080] [10de:1b80] (rev a1)
(prog-if 00 [VGA controller])
Subsystem: Corp. GP104 [GeForce GTX 1080] [3842:6288]
Flags: bus master, fast devsel, latency 0, IRQ 97, NUMA node 0
Memory at de000000 (32-bit, non-prefetchable) [size=16M]
Memory at c0000000 (64-bit, prefetchable) [size=256M]
Memory at d0000000 (64-bit, prefetchable) [size=32M]
I/O ports at 6000 [size=128]
[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
Capabilities: [60] Power Management version 3
Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Legacy Endpoint, MSI 00
Capabilities: [100] Virtual Channel
Capabilities: [250] Latency Tolerance Reporting
Capabilities: [128] Power Budgeting <?>
Capabilities: [420] Advanced Error Reporting
Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
Capabilities: [900] #19
Kernel driver in use: nvidia
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

06:00.1 Audio device [0403]: NVIDIA Corporation GP104 High Definition Audio Controller [10de:10f0] (rev a1)
Subsystem: Corp. GP104 High Definition Audio Controller [3842:6288]
Flags: bus master, fast devsel, latency 0, IRQ 5, NUMA node 0
Memory at df080000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [60] Power Management version 3
Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Kernel driver in use: vfio-pci
Kernel modules: snd_hda_intel



weird, id say check all configs again, if you put in both PCI-E IDs and without typos then see :slight_smile:



note, if you’re trying to passthrough USB controller (PCI-E card in my case), check if its not in same group as other stuff.

i had to move my card from 1x slot to 16x slot, then it is just “click 2 add” in QEMU/KVM gui :slight_smile:

… so many hours raging why it does not work, lol. Turned out 1x slot is in same IOMMU group as my network cards on board itself…



Guide updated with link to “GPUs with identical ID” how-to