Jump to content
We're Hiring! Full Stack Developer ×

Cant get GPU passthrough to work


Recommended Posts

Hello everyone,

 

I have been trying to start my unraid server since last Friday. But I am not able to start my windows 10 VM with GPU pass-through. I followed all of SpaceInvaderOne tutorials but I cant get it to work.

 

VM settings:

image.thumb.png.cca4180c2064f83b654fcd064b93fd63.png

I also ran it on the other BIOS that also didn't work.

 

Little steps:

  • I am able to run my VM without a GPU but with VNC mode, and it starts all perfect.
  • I am able to run VNC and a GPU, it starts and I can do everything on the windows machine when the monitor is off. Installed all the drivers here
  • I am able to run VNC and a GPU, it starts but the system is really unresponsive when the monitor is in sleep mode
  • Windows just completly crashes when the monitor is on but the monitor doesn't give an output

(all these steps could be coincidence, because it only goes to some of them sometimes. Mostly they just crashes, only the first two steps i am sure about)

 

  • I also tried just running only a GPU and no VNC, and I get stuck on this screen

453617739_WhatsAppImage2020-03-19at12_12_47.thumb.jpeg.c41281efe888cb2505236f6a9dff3a44.jpeg

 

System info:

image.png.388ed464df79827c8b59798ee36be830.png

I have turn the PCIe ACS override to "both"

 

 

It is in different IOMMU groups:

image.thumb.png.b6c066ce664457bcce2bbf4411a0b812.png

 

Part of the Log when starting vm:

image.png.1699c625f2d7d98cafd63c2d3e1598f1.png

 

If there is anyone that can tell me what I am doing wrong, or can put me in the right direction please let me know.

Edited by HenneC
Link to comment

Many issues.

  • Is the AMD 5700 GPU the only GPU in your system? If so, your chance of passing it through to a VM is rather low due to the known reset issues that happen to all AMD Navi GPU.
    • You should try compiling your own kernel with the Navi patch which may improve your chance of passing through the device. There's a forum member who shared a custom kernel with (among other changes) the Navi reset patch and optionally 5.5.8 kernal (better compatibility with 3900X) so you may try that at your own risk. Link at end of post.
    • Your vbios, how did you get it? Are you 1000% sure it's the right vbios for your card? Vbios has to be specific to the same brand, model and revision so it's not that hard to get the wrong vbios if downloading from TechpowerUp.
    • Have you updated your motherboard BIOS?
    • Try booting Unraid in legacy mode.
    • Are you able to borrow another GPU to boot Unraid with? Even with all the tweaks above, you may still need a GPU for Unraid to boot with (so the 5700 isn't initiated at boot.
  • You can't just switch bios from SeaBIOS to OVMF. The screen you showed is UEFI (i.e. OVMF) unable to boot, which isn't unusual if you installed Windows under SeaBIOS.
  • Having both VNC and passed-through GPU rarely ever works. Once you have installed Windows using VNC, turn on Remote Desktop Protocol from Windows and use RDP to connect to your VM to deal with display issues (instead of having both VNC and passed-through GPU). Of course, that is assuming your VM boots (see above point) so you need to get that sorted first.

 

 

 

Link to custom kernel.

 

 

 

 

Link to comment

I'll try to answer everything in order.

 

Yes it is the only GPU in the system

- I Will try the kernel as last resort because I have no Idea how it works.

- I am pretty sure i got the right VBios, selecteer right series and the right vendor.

- This might be a rookie mistake i Will try this

- After the update I will put it inmediatly to legacy mode, only can work in my favour.

- I could pick my Nvidia GPU out of my daily driver,  but then i have some follow-up questions.

1. Does it need to be in the top slot?

2. Would I be able to passthrough both of them? Or would the AMD be the only one (Because then i would be able to make that my daily driver)

 

- That BIOS thing, I do not know how I made that one go, what is the better option to try?

- So let me see if I understand this right. Start the VM only with VNC, set it up completly. Shut it down, passthrough the GPU and then go from an other VM on VNC to control the passthrough one with remote desktop?

 

Thanks for the quick reply btw. I Will look into the points I cant do remote in 1/2 days due to not being able to phisically be at my server. The remote parts I will try later this evening.

 

 

 

Link to comment

Asus motherboard doesn't have the option to pick which PCIe slot as initial display so you will have to put the Nvidia in the top slot and the 5700 in the 2nd slot. The idea is to boot Unraid with something other than the 5700 so the 5700 isn't initiated at boot.

Caveat: with the AMD reset issue, even if you successfully pass the 5700 through to the VM, chances are you will not be able to reboot the VM without needing to reboot the entire server. Such is the nature of the reset issues i.e. the GPU can't be reset properly.

 

If you have 2 GPU's then you need to dump your own vbios instead of downloading one. That's the only way to ensure it's the right vbios. Watch SpaceInvader One tutorial on how to dump vbios.

 

Whether you can pass through both of them is too far ahead to even consider. One thing at a time.

 

The best thing for you to do now with the BIOS thing is to start from scratch. Pick Q35 machine type and OVMF BIOS and install Windows (from scratch) with VNC display. Then turn on RDP in the Windows VM and test with another Windows machine to make sure RDP work i.e. you can remote into the VM using RDP (NOT VNC!!!). Then go work on the 5700 pass-through.

Link to comment
3 hours ago, testdasi said:

The best thing for you to do now with the BIOS thing is to start from scratch. Pick Q35 machine type and OVMF BIOS and install Windows (from scratch) with VNC display. Then turn on RDP in the Windows VM and test with another Windows machine to make sure RDP work i.e. you can remote into the VM using RDP (NOT VNC!!!). Then go work on the 5700 pass-through.

 

On this moment I can't go further then these steps, but it seems like it did work? After the VNC worked and immediately the RMD worked, I made a shot at it to start it with only the GPU and sound-card (of the GPU). I was able to RMD in the VM again, does this mean when I am with my server again the screen will work? Or at least that it looks promising?

I attached some photo's where you can see windows does see my  RX 5700.

 

I did know about the system restart and all, but I found a video of SIO where he shows a way you can get around this with a user script and sleep mode of the server so I do not mind about that. Or are you talking about an other bug? Also I found a little script on the forums that seems to detach Unraid from using the primary GPU so I can atleast start the VM with the GPU. GPU detach script

 

 

Also note, I did not change anything yet about the BIOS update, second GPU and legacy mode.

 

WhatsApp Image 2020-03-19 at 21.58.24.jpeg

Knipsel.PNG

Link to comment

That is one step in the right direction. Once you have physical access to the server then you can see if the display works.

The next obstacle would be drivers. Some new AMD drivers have been known to dislike passed through GPU for whatever reasons so if one version doesn't work, try something older (and conversely, if your current drivers work, don't be too eager to update to new versions).

Link to comment

Okay, I had a screen everything seemed fine. But then 2 hours later I tried to start it again but I have a whole new error.

 

image.png.6a006d464a4243c74cbd132f80c3e950.png

 

edit: And why I try to add a new vm it can not create the file vdisk.img

 

 

And weirdly enough some dockers are broken aswell now.......

image.png.4279d87b485796cb021a56dae9cc76a5.png

 

Any idea what may have caused this

Edited by HenneC
extra info
Link to comment

Okay, all of the previous cache, docker and vm problems are over. Now I had a VM working. but when I tried to start a steam game, the screen went green and the whole server rebooted. I think this is because of a wrong VBIOS so I will try to change this. But, now when I try to start the VM it wont give an output not even on VNC.

Edited by HenneC
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...