Return to Level1Techs.com

VM Passthrough (Ryzen + RX 580) (Working but issues with Driver updating)


#1

So as the title suggests everything is working fine. I use a modified version of @powerhouse qemu-kvm build. https://heiko-sieger.info/running-windows-10-on-linux-using-kvm-with-vga-passthrough/

However, I did rebuild qemu from source as current LM/ubuntu repo is old and added networking/usb/lan etc to configuration build.

Problem is when I go to update RX 580 AMD Drivers, It gets to around 40% then screen goes to reset the drivers (Flicker stage) it just goes black screen, never to return. Also on boot it just doesn’t boot up, freezes on the spinning dots.

No errors in the console, but im not running verbose (Not sure how, let me know if you know how to add that to the config file to spitout) If you have had this issue and learned a way to fix it let me know.

Would love to have most recent drivers that work.

Was doing some research into it, supposedly older drivers work somewhat better. So I will try a few revisions down. See how my luck goes.

also, I duno how it happened maybe some of my hardware was “used” but sold as new on amazon. But I ended up with a fully licensed VM windows 10. First time installing windows on any of this hardware since i used to be linux for the past 6 years.

-Edit- As per the Drivers… Keep getting Error 43.


#2

However, with windows loaded 580 drivers, I still can game so cant complain…

Getting great FPS on Apex Legends that game is super fluid and polished. Max of around 90fps lows around 64fps with maxed out graphics settings. on my rx580.


#3

I had the same problem with AMD driver installation stopping at 40ish% on a Rx 570 (but this probably applies to all AMD GPUs).

To solve this problem you need 2 x monitors:

  • Windows Monitor (2) start up the Windows VM & login - enable Remote Desktop Connections.

  • Linux Monitor (1) - connect to the VM using RDP (e.g with Remmina) - this will logout the Windows Desktop on monitor (2) - leave it logged out & monitor (2) connected.

  • On the RDP session from Linux start the AMD driver installation.

The Windows Monitor (2) will flicker at the 40ish% mark & you may lose the RDP session from Linux but don’t worry if it does - simply reconnect the RDP session from Linux & finish the driver installation.

Tested up to the current stable drivers 19.1.1


New to Linux - helpful advice & tips
#4

Interesting I got 5 other monitors in my build on linux host side so I’ll give this a try thx for info!


#5

reconnected via RDP when main monitor whch was logged out went blank. Doesnt want to connect. since the screens black even on RDP. Just sits there spinning… So basically no change, rebooted vm and crash / corruption as it does.

Was able to restore then went into safemode, installed drivers that way. It worked fine, Then rebooted and boot screen stalled again. lol… doesnt seem like there is anyway to do this lol.

Guess this is the best i can hope for, Not entirely base install, but went into device manager, did online update and it loaded a slightly newer month. But still a few years old lol…
drivers

I’m at a loss for Idea’s if you got any sling it my way, Maybe if i try a diffrent approach to passthrough maybe through libvirt xml might have a better outcome? But dont they all use basically qemu cli?


#6

I do passthrough with libvirt & have a 2nd monitor inside the vm with the Red Hat QXL driver that Virt-Manager automatically creates - but I have the Windows Display settings set to only show on monitor (1) with the AMD GPU.

You need to start the driver install from the RDP session in Linux not from the windows monitor,


#7

Yep, rdp logs you out of main vm monitor that started, installed driver rdp monitor froze at same time main monitor went black. Tried to rdp back in but got consistant spinning no reconnection.

While was in rdp, had to remove driver from device manager, because I was getting library 87 path error, once I did that it allowed install which caused black screen and boot corruption.

I have main monitor inside Passthrough GPU, and RDP from a linux host.


#8

The only difference then is the fact I’m using libvirt - it must be doing something extra behind the scenes.


#9

SInce you’re using libvirt what CPU type is configured? Host-passthrough? Curious if it works with type set to core2duo.


#10

Didn’t think about that, mines still set to the original for the tutorial I used. I guess I probably should look at redoing the kvm via libvirt. It’s possible to just run the os already installed with libvirt ya? Just wondering if it would require a reinstall I don’t see why it would but just curious.


#11

Yes you should be able to re-use the existing install.


#12

@lessaj - my host CPU is an FX 8370 & I set host passthrough in libvirt so the Windows VM recognises the CPU as an FX 8370.

I passthrough all 8 cores to the VM with the first 6 cores pinned & set to use the FIFO real time scheduler. I also set the first 6 cores as tickless via grub:

GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on iommu=pt default_hugepagesz=1G hugepagesz=1G hugepages=12 nohz_full=0-5 rcu_nocbs=0-5"

if you have plenty of RAM allocating hugepages via grub saves a lot of hassle.

For the last 2 cores I also pin one to the emulator thread & one to iothread. Linux doesn’t care if it has free use of core zero (Windows does).

This setup gives me good enough performance to run the Division / Hitman / Dishonored 2 / Watch Dogs / GTA5 all on high. I no longer reboot into Windows 10.


#13

I also have this problem.
After reading this I installed 18.9.3, which works without any issues.

I don’t need the latest driver, but I would be curious to understand the issue, as this doesn’t seem to affect everyone.