VFIO in 2019 -- Pop!_OS How-To (General Guide though) [DRAFT]

It’s starting to be what I am thinking too, but a few nitpicks mean I still might do passthrough:

  • Windows Media Foundation. There’s been no definite solution to this problem despite Valve’s best efforts with Proton.

  • FAudio cannot bundle WMA enabled FFmpeg by default due to legal issues, same problem with WMV decode in Media Foundation.

  • Almost all Unreal Engine 4 games use Media Foundation for pre-rendered cinematics. Select Unity games do this as well.

  • Valve’s own DRM (like in Just Cause 2) doesn’t work with Proton, yet newer versions of Denuvo work fine with Proton… (And consequently, older versions of Denuvo are SOL)

  • Some games have hard to pinpoint bugs, like the “Un-Bearable” bug in Crash Bandicoot N. Sane Trilogy.

I would reserve my Windows VM for stuff that needs Media Foundation and games with bugs that are hard to pinpoint.

Can you clarify on how to enable 1G Hugepages? I’ve got the enabling hugepages step down but am confused on 1G Hugepages.

In the video you hint at “Bigger memory blocks” which does suggest using 1G Hugepages.

imma move this thread to vfio category
done

1 Like

Good point about virtualation with passthrough vs a software compatibility layer.

Proton is impressive in itself, I have used it with a few windows games (playing Yakuza 0 right now) and it has worked surprisingly well in a lot of cases. But Virtualization with passthrough has 100% compatibility.

Maybe Valve could implement some virtualation integration into SteamOS? The users would have to supply their own Windows keys. Like incorporate an installation wizard, or something?

Though I feel like POP!_os would be a good option would still be the better option for gaming through virtualization. As seen in this video.

permanent

i setup my gpu pass trough following this guide with the difference i have a 2080 and a 2080TI from different vendors (Rog Stix and Zotac)

this guide worked to a point, where windows was detecting the GPU and i could install drivers, but i was getting error 43

i had to fix by adding (vendor_id and KVM jhidden)

  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      **<vendor_id state='on' value='123456789ab'/>**
    </hyperv>
    <kvm>
      **<hidden state='on'/>**
    </kvm>
    <vmport state='off'/>
  </features>

i also switch cpu passtrought to

<cpu mode='host-passthrough' check='none'>

i also have a PCI usb3 controller i am trying to pass but no luck so far, first time i use it after boot it works, but at some point the controller turns off and it wont work again untill a restart. (i use that controller to pass mouse and keyboard.)

Not sure if anyone talked about it before, but

if you cant boot after adding wendells .sh script, ENABLE SECURE BOOT in bios/uefi settings

fixed for me. Also for some weird, my board upper slot is group 43, lower pci-e slot is group 8… so lower GPU is my linux host gpu, while upper one is for VM

issue i had:

@wendell pls consider adding info about this to original guide, i spent like an hour raging where is the problem :smiley:

No PCI-E USB controller is going to be 100% reset safe unless it’s a Renesas/NEC one.

Try to find a uPD720202 based card. Those work the best with VFIO.

1 Like

I get some screen freezing on my win10 vm and the only error I can find is

iommu ivhd0: Event logged [INVALID_DEVICE_REQUEST device=00:00.0 pasid=0x00000 address=0xfffffffdf8000000 flags=0x0a00]

when reading dmesg
Any ideas?

What the device at that ID under lspci?

What’s your dmesg | grep -i iommu ?

What are the windows 10 vm settings (I.e. your virt-manager XML file). Make sure you have the correct chipset set and devices passed.

here are all the info you asked for

dmesg.txt (4.8 KB)
lspci.txt (219 Bytes)

meryl_gamingrig 7b08b085-d332-4564-bb83-8b58eeb41290 16777216 16777216 10 1 hvm /usr/share/OVMF/OVMF_CODE.fd /var/lib/libvirt/qemu/nvram/meryl_gamingrig_VARS.fd destroy restart destroy /usr/bin/qemu-system-x86_64

here the latest error codes

[70963.930326] vfio-pci 0000:0a:00.0: Event logged [IO_PAGE_FAULT domain=0x0000 address=0xfd1c0 flags=0x0070]
[70963.930338] vfio-pci 0000:0a:00.0: Event logged [IO_PAGE_FAULT domain=0x0000 address=0xfc240 flags=0x0070]

they correspond with big freezes in the VM

Can you try booting with “quiet amd_iommu=fullflush iommu=pt” options?

If that doesn’t help we may also need “amd_iommu_dump=1“ included for more details,

here is the dmesg after booting with fullflush option in grub

dmesgfullflush.txt (4.8 KB)

here dmesg using iommu_dump=1

iommu_dump.txt (103.2 KB)

Are you running the most up-to-date uefi on your motherboard?

Can you look at updating your kernel to 5.2.0?

Try booting with: mem_encrypt=off as well.

Other than that I’m stumped.

I was thinking about the uefi but I was afraid of breaking the passthrough I’m on X399 and I read quite a few accounts of uefi updates going wrong for vfio
I’ll try upgrading tu 5.2.0 might solve it

Let us know how it goes. If you do find a solution, make sure to post what it was both here (and if possible, embedding the answer in your initial post in the thread to help others).

1 Like

upgraded both uefi and kernel to the latest release and for now no changes I keep getting the same errors in dmesg and the same freezes in the VM. I’m gonna keep searching for the fix. In the meantime if anyone got an idea it’ll be welcome.