Just wanted to drop a quick post to say thanks to @wendell and the community here at Level1Techs. I’ve wanted to setup GPU Passthrough for a year or so. Always found it a bit too complicated to figure out myself but after following the guides here on Level1Techs I was able to get setup successfully!
My hardware for the curious;
- AMD Ryzen 2700X
- Asus PRIME X470-Pro (version 4207 BIOS)
- 16GB DDR4 3200MHz of TeamGroup Dark Pro 8-pack edition memory
- GPU 1: Sapphire Nitro R9 380 4GB
- GPU 2: Sapphire Pulse RX VEGA 56 8GB
- 1x 128GB SSD, 1x 250GB SSD, 1x 1TB HDD
- 2x monitors, 2x keyboard, 2x mice
Currently dual booting with Windows 10 1903 on 1 SSD and Ubuntu 18.04.2 LTS. Need Windows for some overclocking + stability tools and 1 game I play with anti-cheat that doesn’t like VM’s.
For storage I’m using LVM2 with the 2nd SSD and HDD in a Volume Group. Half the SSD is dedicated to the host OS with the rest of the space on the SSD split up into caches of various sizes from 10-25GB that I’ve setup with lvmcache and attached to each VM’s Logical Volume. Speeds up disk performance really well!
I have my 2nd monitor plugged into my R9 380 with a mouse and keyboard. When I power up my machine I login, open Virt Manager and pick a VM to start.
In front of me I have my main monitor, a Dell S2719DGF with in-built USB 3.1 Hub. To which I have connected my main mouse + keyboard, USB Headset, Desktop speakers (using line-out on monitor), Stream Controller USB receiver.
The USB uplink from the monitor plugs into a USB port that is on a USB controller I passthrough to the VM’s along with my RX VEGA 56 and its audio which are connected using DisplayPort.
When I power on my VM’s my main monitor, desktop speakers and all the USB devices plugged into my monitor passthrough to the VM and it feels like magic!
I plan to do some distro hopping soon. For the moment I have Windows 10 1903 setup as a Gaming VM, Ubuntu 18.10 as my daily driver and SteamOS 2.190.
Probably took ~70 hours over 2 months, 2-3 nights a week to get everything working. A large chunk of that time was deciding what storage to use and then learning LVM2. As well as swapping graphics cards in and out my case and back and forth between slots!
For anyone who may be searching on Google in the future you need to set your graphics cards as following on the Asus PRIME X470-Pro
- PCIEX16_1: Host GPU
- PCIEX16_2: Guest GPU
- PCIEX16_3: Do not use
PCIEX16_3 only works at 4x speed and its got a bunch of other devices in the same IOMMU group. I also couldn’t boot from this slot.
There is no way to select which graphics card is the primary graphics cards for boot purposes. The motherboard will initialize any graphics card it finds at boot blocking VFIO and stopping you from passing either GPU to a VM.
To fix this you need to put your host GPU in PCIEX16_1 and guest GPU in PCIEX16_2. (Sadly the PCIEX16_2 slot is only physically wired for 8x speed.) Then you need go into the motherboard UEFI BIOS and under the boot menu. Change Launch CSM from Auto/Disabled to Enabled. Then when you power on only your host GPU will be initialized leaving the guest GPU for VFIO.
Other motherboard settings I had to change (press DEL to enter UEFI BIOS, F7 to get to advanced menus);
- Advanced >> CPU Configuration, SVM - Disabled >> Enabled
- Advanced >> AMD CBS, IOMMU – Auto >> Enabled
- Boot, Fast Boot - Enabled >> Disabled
- Boot >> CSM, Launch CSM – Auto/Disabled >> Enabled
Hopefully that will save someone the headache I had solving that particular issue!
Thanks again to the Level1Techs community. Now back to work with a little gaming on the side. Err, Now back to gaming with a little work on the side.
Cheers,
Irricas.

