Radeon VII, GPU Passthrough, and Linux 5.0

So I recently got a Radeon VII and I’m trying to use it for GPU passthrough to a VM on my Threadripper system. It works but it has similar reset issues as Vega did, where the card is not properly reset if you turn off or reboot the VM. However unlike Vega cards the trick of just sleeping the system for a couple seconds to reset the card does not work. That’s what I used to do with my Vega 64, turn off the VM, suspend the system for a couple seconds, then fire up the VM again and it would be fine. A bit annoying, sure, but still much better than having to completely reboot the machine. I know there’s a kernel patch for this stuff but I didn’t want to mess with installing a custom kernel patch…

But as I said this trick does not work for the Radeon VII. Even if I suspend the system the card doesn’t seem to care. So without that crutch I need to find a proper solution…

I was running kernel 4.19. I know about the patch but I also know that a more ‘proper’ solution was supposed to be in the works and I think that’s finally out now with 5.0…honestly I’m not sure about that because I’ve seen conflicting things but I figured why not give it a shot. So I installed 5.0, booted that up and…my Radeon VII didn’t show up at all. Anywhere. I don’t even see it with lspci.

I switched back to 4.19 and it was there again so it was definitely the kernel. But what’s going on here? How come 5.0 can’t see my Radeon VII at all? It’s a newer kernel…BTW my Vega 64 shows up fine in 5.0, it’s just the Radeon VII that doesn’t.

So if I run 4.19 I have to reboot my whole computer if I want to reboot the VM and if I run 5.0 I can’t passthrough the Radeon VII at all because it doesn’t seem to exist. Obviously both these solutions suck so I guess I’m back to installing the kernel patch for this issue in 4.19. However I’m more curious if anyone has any idea what’s going on with 5.0? I was really quite shocked that it can’t seem to see the card at all.

LOL of course it wont… Its firmware isnt loaded

Sadly most people wont answer this question accurately. FOR NOW you will have to compile your kernel with the latest linux firmware from git

https://www.phoronix.com/scan.php?page=news_item&px=Vega-20-Linux-Firmware-Git

Seen in this commit

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=8bf607ca9bb42bc26bd4c8d574d88b6b6935c47d

What you are trying to do is extremely difficult for the average user to do right now. Best to stick with basic VGA mode until this is fixed in your version of the distro. There are kernel parameters you can enter into grub for this with some research.

If you want to be a masochist

Lets try and get you on kernel 5.1 and a backported linux-firmware. What distro are you running?

Also passthrough support definitely is not going to happen for a while. its simply the name of the game even with the most bleeding edge commits it doesnt work well. So its hurry up and wait imho. However if other users have a solution ill be glad to throw in my hat to get it working haha

Three things:

  1. I’m not really trying to use it under Linux, I’m just passing it through to a host VM (which is Windows for now…I may eventually try to set up a Linux host to do some compute stuff with the card as well but I’m not even attempting that yet).

  2. Passthrough works under 4.19. Right now. And 4.19 came out months before the actual card did. The only problem is that it suffers from the same reset bug that every Vega-based card suffers from. So when you say “passthrough support definitely is not going to happen for a while” I’m not even sure what you’re talking about…

  3. Your post also does not explain why it doesn’t show up in lspci when I run 5.0. lspci is a very low-level utility that scan the buses and report whatever is there, it does not require drivers (see here). And again, why would it show up in 4.19 and not 5.0 when if anything it’s 4.19 that should be out of date?

Still seriously might be a while to be bug free

I suspect the Vega code was changed to fix bugs and work over a stricter set of GPUs… Check all the commits on the 4.19 to 5.0 for Vega or and GPU related changes… Something will have caused that. Also 5.0 had quite a bit of changes added… This has happened before its not easily explainable nor worth the attempt.

Uhmm try lshw its even lower level and would be more detailed. Let’s try and see what’s up… Boot into kernel run level 3

And please your distro name and version what are they