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.
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.
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.
BIOS Version
AGESA 1.0.0.4 Fix
AGESA 1.0.0.4 patch fixes the issues with AGESA 0.0.7.2. After enabling SVM and IOMMU in the bios with AGESA 1.0.0.4., 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.
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.
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.
Footnotes:
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.
Have a comment on one of my posts? Start a discussion in my public inbox by sending an email to ~anjan/public-inbox@lists.sr.ht [mailing list etiquette]
Articles from blogs I follow around the net
These articles/blogs do not represent my own opinions or views.Text processing on the Command Line - sharing my tools
Text processing on the command line - sharing my tools Introduction I'm quite fond of the command-line and spend a larger chunk of my life in a terminal emulator than I dare admit. I try to embrace the unix philosophy of using tools that "do one thing…
via Proycon's website July 7, 2024Linux phones are not automatically secure
A common point in the Linux community is that escaping the walled garden of ecosystems like Android or iOS is already a means to higher security. Having no contact with Google or Apple servers ever again, nor cloud providers ever snooping on your private …
via TuxPhones - Linux phones, tablets and portable devices January 25, 2023Generated by openring