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

<2020-07-06 Mon>

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.

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.

Todo.txt-more: Efficiently managing your todo list and your time

Todo.txt More: Efficiently managing your todo list and your time Introduction I tend to get fairly enthusiastic when it comes to lists, even more so when there's a chance to optimise my productivity. The end of the year is a time for looking backward an…

via Proycon's website December 31, 2022

The PineTab2 is a new, faster Linux tablet - and it's not alone

In their December update, Pine64 announced the PineTab2, which is the successor to their PineTab from 2018. As a major change, the PineTab2 upgrades the slow A53-based A64 SoC with an A55-based Rockchip RK3566, the same chip that was used for the Quartz64…

via TuxPhones - Linux phones, tablets and portable devices December 19, 2022

I shall toil at a reduced volume

Over the last nine years I have written 300,000 words for this blog on the topics which are important to me. I am not certain that I have much left to say. I can keep revisiting these topics for years, each time adding a couple more years of wisdom and impro…

via Drew DeVault's blog December 1, 2022

Generated by openring