[Resolved] Primary GPU passthrough


Recommended Posts

  • 4 weeks later...
On 4/12/2020 at 12:03 PM, SveDo said:

Hello!

The same problem, the last three days I’ve been trying all the tips, nothing helps.

 

5 hours ago, JamesAdams said:

I follow the tutorial and it's not worked for my 1050Ti...



When you each say you followed the tutorial, does that include the framebuffer unbind as a user-script that runs with each each array start?

Also note that quite a few of us have not been able to get a bios posted from TPU to post our GPUs, but editing the bios dumped form our actual card worked.

 

 

Edited by paperblankets
Link to comment
  • 4 months later...

Hey all I’m getting similar problems with my 1050ti my VM seems to work but with no graphics output I don’t even see unraid load up screen now I think my vbios is ok since I’ve been on my VM previously playing games on it when I update to 6.9.0 beta 29 the Vm worked for two days before screen went blank with cpu cores going crazy so I force shutdown VM and haven’t had no hdmi output since pls help.... Vm seem to work in background but can’t see nothing....

Edited by Dava2k7
Link to comment
46 minutes ago, Dava2k7 said:

Hey all I’m getting similar problems with my 1050ti my VM seems to work but with no graphics output I don’t even see unraid load up screen now I think my vbios is ok since I’ve been on my VM previously playing games on it when I update to 6.9.0 beat 29 the Vm worked for two days before screen went blank with cpu cores going crazy so I force shutdown VM and haven’t had no hdmi output since pls help.... Vm seem to work in background but can’t see nothing....

I have not been passing through a gpu to a vm in the last few months. Eventually I will be transitioning to a Ryzen build and may be able to help more. I suspect some things have changed but I don't know what they are at this time.

Link to comment
43 minutes ago, paperblankets said:

I have not been passing through a gpu to a vm in the last few months. Eventually I will be transitioning to a Ryzen build and may be able to help more. I suspect some things have changed but I don't know what they are at this time.

Yeah thank you I’m not sure what’s happened either I’ve looked around different comments everything points to vbios and I got mine from techpowerup but mine was working for months on 6.8.3 using that vbios I lost Vm completely in 6.9.0 beta 25

Link to comment
  • 1 month later...
On 10/5/2020 at 12:22 PM, Dava2k7 said:

Yeah thank you I’m not sure what’s happened either I’ve looked around different comments everything points to vbios and I got mine from techpowerup but mine was working for months on 6.8.3 using that vbios I lost Vm completely in 6.9.0 beta 25

Check to start Unraid without the passthorugh in the vfio (Remove completly the video card and audio), and just try to start the VM, it have to take it away from unraid and boot without problems.

Link to comment
  • 2 weeks later...
On 12/4/2019 at 11:44 PM, jazzy192 said:

You sir, are a bloody legend! Spent about five hours trying to get my Nvidia 1980 Ti passed through but just got failed to map rom or code 43. Touch wood it carries on working!

 

Thank you

my GOD this helped me to solve NVME and GPU passthrough...  THANKS TO ALL ! ! ! 

  • Like 1
Link to comment
  • 2 months later...
On 5/3/2018 at 6:46 AM, bigjme said:

----------- ANSWER --------

 

For easy reading, this was the answer needed. In the event that you get mmap errors on passing through the rom, or you install the nvidia drivers and get errors like the above, try running the following in command line and try again

 

echo 0 > /sys/class/vtconsole/vtcon0/bind
echo 0 > /sys/class/vtconsole/vtcon1/bind
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind

 

I added these to a user script that triggers on first array boot up. I have now successfully remove a gpu i no longer need from my system and am able to reboot unraid and have the vm auto start on the primary gpu

 

Don't mean to Necro, but this solved it for me. Thanks a lot.

 

If you are looking at your VM Logs by clicking on your VM and clicking Logs, and you're seeing:

2021-03-06T06:32:32.186442Z qemu-system-x86_64: vfio_region_write(0000:09:00.0:region1+0x1be6ba, 0x0,1) failed: Device or resource busy

Try the fix above. It worked for me.

 

The Hardware I'm running:

ASUS Prime X570-Pro

Ryzen 7 3700x

ASUS Strix GTX 1060 Gaming

 

Best of luck.

Edited by Celsian
spelling
  • Like 1
Link to comment
  • 1 month later...

So this thread originally fixed my issue, putting the following in my go file made passthrough work:

echo 0 > /sys/class/vtconsole/vtcon0/bind
echo 0 > /sys/class/vtconsole/vtcon1/bind
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind

 

But now after upgrading to 6.9.2 I can't use it anymore, something about that third command sends my tower in to complete lockdown and I have to manually shut it down, I had to take out my USB and remove the lines from the Go file to get it to even boot properly. I'm still getting the MMAP errors because the GPU is being used by Unraid and I can't unbind it.

Link to comment
On 4/13/2021 at 9:43 AM, alancostello said:

So this thread originally fixed my issue, putting the following in my go file made passthrough work:

echo 0 > /sys/class/vtconsole/vtcon0/bind
echo 0 > /sys/class/vtconsole/vtcon1/bind
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind

 

But now after upgrading to 6.9.2 I can't use it anymore, something about that third command sends my tower in to complete lockdown and I have to manually shut it down, I had to take out my USB and remove the lines from the Go file to get it to even boot properly. I'm still getting the MMAP errors because the GPU is being used by Unraid and I can't unbind it.

 

I was worried about this, I didn't upgrade yet.

 

Couple questions:

  1. Does it work again if you roll back to 6.9.1 and put the 3 lines back?
  2. I see that you are using the lines in your go file. What happens if you remove them from the go file, install the "User Scripts" plugin, Add a new script with those three lines (#!/bin/bash as the first line), and run that script at 'At Startup of Array'?

 

Edit:

I went ahead and updated to 6.9.2, everything is working fine for me with the setup I mentioned in my previous post. See #2 from my "Couple Questions" above. I did not attempt to add the lines to the go file to see if that made my boot fail as well. It's working with the "User Scripts" plugin, I was content to let it be. If anything I said in my previous post or this one was unclear, let me know and I'll clarify.

Edited by Celsian
Link to comment

yeah those lines don't work anymore as a userscript or just pasting them into an ssh terminal as root since upgrading to 6.9.2 for me either (used to work on 6.8.2).

 

echo 0 > /sys/class/vtconsole/vtcon0/bind
echo 0 > /sys/class/vtconsole/vtcon1/bind
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind

 

 

root@Tower:~# echo 0 > /sys/class/vtconsole/vtcon0/bind
root@Tower:~# cat /sys/class/vtconsole/vtcon0/bind
1

 

root@Tower:~# echo 0 > /sys/class/vtconsole/vtcon1/bind
-bash: /sys/class/vtconsole/vtcon1/bind: No such file or directory

 

root@Tower:~# echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind
-bash: echo: write error: No such device

 

 

root@Tower:~# ls -l /sys/bus/platform/drivers/efi-framebuffer/
total 0
--w------- 1 root root 4096 Apr 18 21:40 bind
--w------- 1 root root 4096 Apr 18 21:41 uevent
--w------- 1 root root 4096 Apr 18 21:39 unbind

 

 

Link to comment

Just to add, I get code 43 in the win 10 vm, and just a black screen.  Fresh install of win 10.  I am using the new way of passthrough, tools -> system devices,  check the boxes for the gpu and sound.  I also pass though a usb card and that works fine.

 

ryzen 9 3900x.  tried both uefi and legacy unraid boot.  I also tried the bios but it is only 59K in size, seems small.  also set multifunction so both gpu and sound appear on the same pci slot in kvm.

Edited by uek2wooF
more info
Link to comment
  • 4 months later...

As this thread, and the fact that it's relatively recent came up when I experienced something similar, I thought I'd share some notes.

 

I had a corrupted USB drive being used for unRAID, which I replaced and re-keyed successfully.  When I was generating this new key, I thought "why not?" and ENABLED it to boot in UEFI mode. Now, I've set my BIOS for Legacy (Gigabyte x570 AORUS MASTER), so I didn't ASSUME this would create any issues.

 

After initial reboot - and fixing failed NVIDIA plugins (which I didn't need, as I'm not doing Docker passthrough), the following error kept occurring:

qemu-system-x86_64: vfio_region_write(0000:0c:00.0:region3+0x15004, 0xabcdabcd,4) failed: Device or resource busy

I re-bound VFIO, ran all the listed commands, and still had no luck.

 

While ruling out other issues, I checked the BIOS, and even though "Legacy ONLY" was enabled, it was listing UEFI for the unRAID USB key.

 

I selected the alternative option for the drive, restarted, and the VM fired up without issue.

 

Hope this "accidental UEFI selection" helps someone else.

 

Cheers, -Ian

Link to comment
  • 1 year later...

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.