Tips for PCI Passthrough
Published 2019-11-17 on Anjan's Homepage
I recently fired up my windows virtual machine to play The Outer Worlds. However, I ran into a number of issues that I would like to document in case I run into them again or someone else does.
1 AMD GPU Guest Driver Install Black Screen at 40%
This was the most frustrating issue I ran into. When I tried to install the latest AMD driver for my RX 580, the screen of my windows guest would go black and I would never see the windows desktop again.
A common fix for this issue is changing to the Q35 chipset in your setup of your virtual machine 1. However, this did not completely fix my issue. Another thing I had to do to get the driver install working was setting up UEFI firmware on the virtual machine. Unfortunately, there was a bug that was introduced in the newer versions of libvirtd on arch that caused libvirtd to not recognize my installed OVMF 2. So after I made sure I had installed OVMF using this guide, I downgraded libvirtd to version 5.6.0.
Finally, I was able to create a new virtual machine in virt-manager (using UEFI and Q35 chipset), install windows in the virtual machine, and update my guest AMD GPU driver. Note: you can upgrade to the latest libvirtd after you have installed windows.
2 The Outer Worlds, the character takes forever to talk
This is a bug in the game but it's exasperated by me not using CPU pinning as described here: Archwiki - PCI passthrough via OVMF: Performance Tuning - CPU pinning
I have a AMD Ryzen 7 1700 and used
4c/2t AMD CPU example (Before ComboPi AGESA) from the CPU pinning guide.
Setting up CPU pinning fixed this issue.
3 BIOS Version
3.1 AGESA 22.214.171.124 Fix
AGESA 126.96.36.199 patch fixes the issues with AGESA 0.0.7.2. After enabling SVM and IOMMU in the bios with AGESA 188.8.131.52., make sure you change AER and ACS options in the bios from auto/disabled to enabled 3. You can find these options under peripherals -> AMD CBS in the AX370 gaming 5 bios.
3.2 Old Issue with AGESA 0.0.7.2
THIS IS THE OLD WAY TO FIX THIS ISSUE. DO NOT USE THIS METHOD
The AMD AGESA update 0.0.7.2 breaks VFIO 4. You can apply a patch to use the latest version of the Linux kernel and latest AGESA or you can downgrade AGESA.
I was patching and upgrading everything previously but I ran into an issue where the VFIO still didn't work after the patch. This might have been something only on my machine as I haven't seen other people complain. The recommended approach to fixing this issue is downgrading your BIOS 4. As such, I finally gave in and downgraded my host BIOS.
My host motherboard is a gigabyte GA-AX370-Gaming 5 (rev 1.0). The downgrade was as
simple as downloading the zip (
mb_bios_ga-ax370-gaming5_f31.zip) from the
gigabyte website and flashing it via the host bios.
4 Speeding up the troubleshooting process
To troubleshoot these issues, I had to reinstall Windows approximately 10 times. To speed up the process, I made a copy of windows' qcow2 file on my host. Anytime windows would break, I would copy over the working copy before I tried something. Of course, this method only works if you have your chipset and UEFI firmware set correctly when you first created and installed windows on your virtual machine qcow2.
This is a very handy method to babysit windows. I am paranoid about when I have a solidworks project I'm working on and a Windows update breaks my system. This is the original reason I setup Windows in a VM.
Reddit /r/vfio - Screen of guest goes black on AMD GPU driver install You must nuke your old virtual machine and re-setup the virtual machine in virt-manager to do this.
Articles from blogs I follow around the netThese articles/blogs do not represent my own opinions or views.
I work on free and open-source software full time, and I make a comfortable living doing it. And I don’t half-ass it: 100% of my code is free and open-source. There’s no proprietary add-ons, no periodic code dumps, just 100% bona-fide free and open source so…via Drew DeVault's blog November 20, 2020
From the Neolithic to the beginning of the twentieth century, coppiced woodlands, pollarded trees, and hedgerows provided people with a sustainable supply of energy, materials, and food.via LOW←TECH MAGAZINE September 20, 2020
I’ve used and defended Eshell for years. Sadly, Eshell has some long standing issues that I grew tired of in the long run. So I’ve decided to switch to M-x shell and see how much of my Eshell workflow I could port. Language and the underlying shell pr…via Pierre Neidhardt's homepage June 26, 2020
Generated by openring