[Resolved] Primary GPU passthrough


Recommended Posts

So, another topic on this but there are a few things I want to check with my systems as I think it may just be me

 

So I've followed spaceinvader ones video on getting a vbios for tech power up, modifying it, and using that

 

All went well, passed through the primary gpu from unraid to a vm, did a full windows 10 install and basic setup with the gpu passed through, perfect

 

So I installed the new nvidia drivers for my 750ti, and carried on tinkering. I then decided to reboot the vm so the video drivers could finish installing and it will no longer boot

 

I don't get error 43 like most others. Windows starts to load, showing the loading icon with the uefi splash screen and then the vm pauses

 

This is the vm log from boot up to shutdown

 

2018-05-02T20:54:30.216302Z qemu-system-x86_64: -device vfio-pci,host=04:00.0,id=hostdev0,bus=pci.4,addr=0x0,romfile=/mnt/cache/VMImages/GPURoms/msi-750ti.rom: Failed to mmap 0000:04:00.0 BAR 3. Performance may be slow
2018-05-02T20:57:26.776428Z qemu-system-x86_64: vfio_region_write(0000:04:00.0:region3+0x1088, 0x7ffe11,8) failed: Device or resource busy
KVM internal error. Suberror: 1
emulation failure
RAX=ffffab7e37c11000 RBX=ffffab7e37c11000 RCX=ffffab7e37c11000 RDX=0000000000000000
RSI=ffffac04d77445c0 RDI=ffffac04d6055000 RBP=ffffac04d7f12000 RSP=ffff80890cd8d8f8
R8 =0000000000001000 R9 =0101010101010101 R10=fffff80fc1dcc4ac R11=ffff80890cd8d6b0
R12=ffffac04d3a75910 R13=ffffac04d77441e0 R14=0000000000000000 R15=0000000000100000
RIP=fffff80fc204b038 RFL=00010216 [----AP-] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =002b 0000000000000000 ffffffff 00c0f300 DPL=3 DS [-WA]
CS =0010 0000000000000000 00000000 00209b00 DPL=0 CS64 [-RA]
SS =0018 0000000000000000 00000000 00409300 DPL=0 DS [-WA]
DS =002b 0000000000000000 ffffffff 00c0f300 DPL=3 DS [-WA]
FS =0053 0000000000000000 0000fc00 0040f300 DPL=3 DS [-WA]
GS =002b ffff9b8042cb9000 ffffffff 00c0f300 DPL=3 DS [-WA]
LDT=0000 0000000000000000 ffffffff 00c00000
TR =0040 ffff9b8042cc8000 00000067 00008b00 DPL=0 TSS64-busy
GDT= ffff9b8042cc9fb0 00000057
IDT= ffff9b8042cc7000 00000fff
CR0=80050033 CR2=ffffd180f654a000 CR3=0000000268559000 CR4=001506f8
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 
DR6=00000000ffff0ff0 DR7=0000000000000400
EFER=0000000000000d01
Code=66 66 66 66 0f 1f 84 00 00 00 00 00 66 48 0f 6e c2 0f 16 c0 <0f> 11 01 4c 03 c1 48 83 c1 10 48 83 e1 f0 4c 2b c1 4d 8b c8 49 c1 e9 07 74 2f 0f 29 01 0f
2018-05-02T20:57:45.189655Z qemu-system-x86_64: terminating on signal 15 from pid 12367 (/usr/sbin/libvirtd)

 

Now I did have unraid booted in gui mode but I'm assuming that as it passed through for setup, this isn't the problem. 

 

So I'm a little stuck on exactly what would be causing this error as the error says its in use, but this only occurs after installing the nvidia driver. 

 

After so many boots I am able to get into the windows recovery menus which all function fine so it seems to pause the second the drivers initialized 

 

I'm on unraid 6.5.1 with the vbios passed through the gui. The vm is ovmf with Hyper-V off on Q35-2.11. I can post the full xml if it would help

 

Any ideas as I am a little stumped? 

 

Regards, 

Jamie 

 

 

----------- 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

Edited by bigjme
  • Thanks 4
Link to comment

Ok so i tried the above on my main card, and my other card which i currently pass to a VM. they are both 750ti's, the same make and model. Both had been passed through to a vm in a secondary slow at the time. The exported roms both times were a tiny 62KB

 

Safe to say, booting the vm i get no error saying the device is in use, but the vm has no video output at all

 

Having read through the export i noticed my gpu was on an older bios then the one i fetched from techpower so i went and fetched n older version, edited it to remove the jump, and booted the vm

 

I have video output and the windows startup recovery launched. So i restarted it to boot windows. Again like before, the windows loading screen comes up, and the seconds windows starts to initialise the nvidia drivers, i get the same error

 

2018-05-03T20:11:39.036200Z qemu-system-x86_64: vfio_region_write(0000:04:00.0:region3+0x1088, 0x7ffe11,8) failed: Device or resource busy
KVM internal error. Suberror: 1
emulation failure
RAX=ffffe3fca3011000 RBX=ffffe3fca3011000 RCX=ffffe3fca3011000 RDX=0000000000000000
RSI=ffff8f8b58f44830 RDI=ffff8f8b58fb1000 RBP=ffff8f8b58efc000 RSP=ffffa30c4d3868f8
R8 =0000000000001000 R9 =0101010101010101 R10=fffff80a6783c4ac R11=ffffa30c4d3866b0
R12=ffff8f8b56a72ab0 R13=ffff8f8b58f43010 R14=0000000000000000 R15=0000000000100000
RIP=fffff80a67abb038 RFL=00010216 [----AP-] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =002b 0000000000000000 ffffffff 00c0f300 DPL=3 DS [-WA]
CS =0010 0000000000000000 00000000 00209b00 DPL=0 CS64 [-RA]
SS =0018 0000000000000000 00000000 00409300 DPL=0 DS [-WA]
DS =002b 0000000000000000 ffffffff 00c0f300 DPL=3 DS [-WA]
FS =0053 0000000000000000 00017c00 0040f300 DPL=3 DS [-WA]
GS =002b ffffd401e8712000 ffffffff 00c0f300 DPL=3 DS [-WA]
LDT=0000 0000000000000000 ffffffff 00c00000
TR =0040 ffffd401e8721000 00000067 00008b00 DPL=0 TSS64-busy
GDT= ffffd401e8722fb0 00000057
IDT= ffffd401e8720000 00000fff
CR0=80050033 CR2=ffffe40646de7000 CR3=000000026416e000 CR4=001506f8
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 
DR6=00000000ffff0ff0 DR7=0000000000000400
EFER=0000000000000d01
Code=66 66 66 66 0f 1f 84 00 00 00 00 00 66 48 0f 6e c2 0f 16 c0 <0f> 11 01 4c 03 c1 48 83 c1 10 48 83 e1 f0 4c 2b c1 4d 8b c8 49 c1 e9 07 74 2f 0f 29 01 0f
2018-05-03T20:11:57.679635Z qemu-system-x86_64: terminating on signal 15 from pid 12367 (/usr/sbin/libvirtd)
2018-05-03 20:11:58.880+0000: shutting down, reason=destroyed

 

I've double checked the device is in its owm iommu group and it is

I've also checked the gpu is not bound to the vfio-pci driver and its not

 

My next thought is that its because i'm booting unraid into gui mode and thats using something perhaps?

 

--Edit

 

Ok so i just did a fresh reboot with unraid in console mode and still, the exact same behaviour

 

-- Edit 2

 

Ok so i found this post elsewhere on the forum

 

So it says to run these 3 lines

 

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've ran them and the vm has started up and the rom errors have vanished

 

I'm going to run some tests and have added it into my user scripts to run on array start up to see if that is fine on a fresh restart

 

Edited by bigjme
  • Thanks 2
  • Upvote 1
Link to comment
  • 3 months later...

I get similar mmap errors to what you describe, and have the same issues on driver install.

When I run the following in the webterminal:

echo 0 > /sys/class/vtconsole/vtcon1/bind
I get 

-bash: echo: command not found

When I run:

sudo echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind
  I get:

/sys/bus/platform/drivers/efi-framebuffer/unbind: Permission denied


Any thoughts?

 

I made a post here: 

but have not gotten any feedback thus far.

Edited by paperblankets
Link to comment

It may be something unsupported on the Web terminal, try it from an actual ssh connection, echo should always be available

 

For mine I ssh'd in as the root user (same details as the gui), you may find the Web terminal user may be different to root

 

Regards, 

Jamie

  • Upvote 1
Link to comment
2 hours ago, bigjme said:

It may be something unsupported on the Web terminal, try it from an actual ssh connection, echo should always be available

 

For mine I ssh'd in as the root user (same details as the gui), you may find the Web terminal user may be different to root

 

Regards, 

Jamie

 

Thanks for the info Jamie!

I indeed get a different result when ssh'ed as root. I am still running into issues though.

Last login: Thu Aug  9 19:06:02 2018 from 192.168.1.125
Linux 4.14.49-unRAID.
root@HuananTheHydra:~# echo 0 > /sys/class/vtconsole/vtcon0/bind
-bash: /sys/class/vtconsole/vtcon0/bind: No such file or directory
root@HuananTheHydra:~# echo 0 > /sys/class/vtconsole/vtcon1/bind
-bash: /sys/class/vtconsole/vtcon1/bind: No such file or directory
root@HuananTheHydra:~# echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind
-bash: /sys/bus/platform/drivers/efi-framebuffer/unbind: No such file or directory

 

My vtcon* directories do not contain a bind folder.

root@HuananTheHydra:~# /sys/class/vtconsole/vtcon0/
power/     subsystem/
root@HuananTheHydra:~# /sys/class/vtconsole/vtcon1/
power/     subsystem/

 

image.png

Link to comment

I am not sure if I needed to restart the server, or have the array stopped, but one of those let me run two of the 3 commands:

 

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

Which resulted in a boot without mmap errors, which allowed me to install drivers.

 

@bigjme I added a user script to fix mmap, it sounds like this fix does not persist on a restart for you right?

Thank you for the debugging steps and suggestions!

Edited by paperblankets
  • Upvote 1
Link to comment
  • 1 month later...
On 5/3/2018 at 9:46 AM, bigjme said:

So, another topic on this but there are a few things I want to check with my systems as I think it may just be me

 

So I've followed spaceinvader ones video on getting a vbios for tech power up, modifying it, and using that

 

All went well, passed through the primary gpu from unraid to a vm, did a full windows 10 install and basic setup with the gpu passed through, perfect

 

So I installed the new nvidia drivers for my 750ti, and carried on tinkering. I then decided to reboot the vm so the video drivers could finish installing and it will no longer boot

 

I don't get error 43 like most others. Windows starts to load, showing the loading icon with the uefi splash screen and then the vm pauses

 

This is the vm log from boot up to shutdown

 


2018-05-02T20:54:30.216302Z qemu-system-x86_64: -device vfio-pci,host=04:00.0,id=hostdev0,bus=pci.4,addr=0x0,romfile=/mnt/cache/VMImages/GPURoms/msi-750ti.rom: Failed to mmap 0000:04:00.0 BAR 3. Performance may be slow
2018-05-02T20:57:26.776428Z qemu-system-x86_64: vfio_region_write(0000:04:00.0:region3+0x1088, 0x7ffe11,8) failed: Device or resource busy
KVM internal error. Suberror: 1
emulation failure
RAX=ffffab7e37c11000 RBX=ffffab7e37c11000 RCX=ffffab7e37c11000 RDX=0000000000000000
RSI=ffffac04d77445c0 RDI=ffffac04d6055000 RBP=ffffac04d7f12000 RSP=ffff80890cd8d8f8
R8 =0000000000001000 R9 =0101010101010101 R10=fffff80fc1dcc4ac R11=ffff80890cd8d6b0
R12=ffffac04d3a75910 R13=ffffac04d77441e0 R14=0000000000000000 R15=0000000000100000
RIP=fffff80fc204b038 RFL=00010216 [----AP-] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =002b 0000000000000000 ffffffff 00c0f300 DPL=3 DS [-WA]
CS =0010 0000000000000000 00000000 00209b00 DPL=0 CS64 [-RA]
SS =0018 0000000000000000 00000000 00409300 DPL=0 DS [-WA]
DS =002b 0000000000000000 ffffffff 00c0f300 DPL=3 DS [-WA]
FS =0053 0000000000000000 0000fc00 0040f300 DPL=3 DS [-WA]
GS =002b ffff9b8042cb9000 ffffffff 00c0f300 DPL=3 DS [-WA]
LDT=0000 0000000000000000 ffffffff 00c00000
TR =0040 ffff9b8042cc8000 00000067 00008b00 DPL=0 TSS64-busy
GDT= ffff9b8042cc9fb0 00000057
IDT= ffff9b8042cc7000 00000fff
CR0=80050033 CR2=ffffd180f654a000 CR3=0000000268559000 CR4=001506f8
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 
DR6=00000000ffff0ff0 DR7=0000000000000400
EFER=0000000000000d01
Code=66 66 66 66 0f 1f 84 00 00 00 00 00 66 48 0f 6e c2 0f 16 c0 <0f> 11 01 4c 03 c1 48 83 c1 10 48 83 e1 f0 4c 2b c1 4d 8b c8 49 c1 e9 07 74 2f 0f 29 01 0f
2018-05-02T20:57:45.189655Z qemu-system-x86_64: terminating on signal 15 from pid 12367 (/usr/sbin/libvirtd)

 

Now I did have unraid booted in gui mode but I'm assuming that as it passed through for setup, this isn't the problem. 

 

So I'm a little stuck on exactly what would be causing this error as the error says its in use, but this only occurs after installing the nvidia driver. 

 

After so many boots I am able to get into the windows recovery menus which all function fine so it seems to pause the second the drivers initialized 

 

I'm on unraid 6.5.1 with the vbios passed through the gui. The vm is ovmf with Hyper-V off on Q35-2.11. I can post the full xml if it would help

 

Any ideas as I am a little stumped? 

 

Regards, 

Jamie 

 

 

----------- 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

How did you run them in a script?

Link to comment
2 hours ago, sg14_96 said:

How did you run them in a script?

 

I installed the user scripts plugin to unraid, added a new script named Fix Gpu Passthrough and set the content to

#!/bin/bash
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 then set it to run "At first array start only" and just reboot. It will then run that command automatically when the array starts which occurs prior to any VM's being booted so happens early enough to cause no issues

  • Upvote 1
Link to comment
  • 2 months later...
On 9/30/2018 at 1:17 PM, bigjme said:

 

I installed the user scripts plugin to unraid, added a new script named Fix Gpu Passthrough and set the content to


#!/bin/bash
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 then set it to run "At first array start only" and just reboot. It will then run that command automatically when the array starts which occurs prior to any VM's being booted so happens early enough to cause no issues

Hey I just wanted to say thanks for posting this.  After trying every permutation of a solution I could think of and in desperation I tried your solution and it works beautifully.

  • Upvote 1
Link to comment
  • 4 weeks later...
On 5/3/2018 at 3:46 PM, bigjme said:

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 

This has helped me with my High Sierra VM. I was soo close to giving up. Thanks a lot!

Link to comment
  • 5 weeks later...

Hey, i can get this fix to work if i run it manually but if i run it as a script, userscript triggered or even just by calling ./script it gives me a permission denied.

 

anyone else seen this?

 

Edit:

NVM i found the problem, leaving this here for others.

 

i had to update my script to point to the actual file location as the vtcon0 folder is actually a link

i changed my script to use 

echo 0 > /sys/devices/virtual/vtconsole/vtcon0/bind
echo 0 > /sys/devices/virtual/vtconsole/vtcon1/bind
echo efi-framebuffer.0 > /sys/devices/platform/efi-framebuffer.0/driver/unbind

and now its working.

Edited by campbebj
found the problem myself
Link to comment
  • 2 weeks later...
11 hours ago, kalfun said:

I'm getting permission denied or the folder doesn't exist when I run the commands. How can I rectify this?

Hi @kalfun,

 

One of these paths does not exist for me as well:
 

/tmp/user.scripts/tmpScripts/Fix mmap/script: line 3: /sys/class/vtconsole/vtcon1/bind: No such file or directory
/tmp/user.scripts/tmpScripts/Fix mmap/script: line 4: echo: write error: No such device

`vtcon1` in my case does not exist. I have just left the script as is though since the error does not cause damage, and if a configuration change occurs and that console is used I want the script to fix that bind.

 

Things to note about this configuration that made it work in my case:
The script is set up for "At start of Array"

The script did _not_ work for me the first time when I ran it from the terminal.
I had to spin down the array, restart, and let the user script run.

 

Other thoughts:
Make sure one of those directories exists, /sys/devices/virtual/vtconsole/vtcon1/bind or /sys/devices/virtual/vtconsole/vtcon0/bind. If one or both exist but you are still getting not found/permissions issues you might need to do something to make your user script run with higher permissions (But I don't have advice on that, and the thought is unsettling to me) Others might now if there are more vtcon directories that _could_ be in use on your system. I am not sure.

Edited by paperblankets
Link to comment

It is supposed to, my results have been hit or miss though.
In the past windows 10 audio over hdmi worked as expected, in ubuntu hdmi audio tries to work, and fails or plays loud, distorted audio.

At this exact moment hdmi audio is not working in my vms, and I assumed that way unique to my setup. I am not sure if it is an update to nvidia drivers, or windows that caused it. Steam streaming drivers exacerbate the issue.


Edit: Yes audio over hdmi should work. People are still referencing this post, so I am going to mention that if you get past the mmap error mentioned in this post, you will then likely run into an error where your nvidia/amd/etc drivers are not msi enabled. The fix for that is mentioned around the forums but here is a link to the msi utility. You run that (as admin) after driver install/restart, and check the msi checkbox next to the device that needs msi support.

Edited by paperblankets
More details on audio issues.
Link to comment
  • 3 weeks later...

FIXED: Switch second VM to use SeaBios and it'll boot a Linux Distribution. About to see if Windows works.

 

Been trying to follow this guide and just not getting anywhere.

 

I'm running a Threadripper 1900X with 16GB ram and two GPU's, "slot 1" which Unraid boots with is an RX560 and "slot 2" is a FirePro V7900 and the motherboard is an Asus ROG Strix X399 E fully updated to latest bios.

 

My desired config is a dual head setup with one Linux VM and one Windows VM although TBH I'd be happy if I could only get two Linux VM's running. Right now I have a Linux VM booting on the FirePro in "slot 2", no issues, although I don't think I can reboot the VM without completely restarting Unraid, which honestly is not an issue I actually need to address at this point.

 

My pain point right now is that I cannot get Unraid to release the RX560 to the point that a VM can boot on it. I've tried the user script and it's varients mentioned above which are successfully unbinding the RX560 so I get a blank screen before the VM's try to boot. I also have the ROM for this specific card that I downloaded from TechPowerUp's collection of VBios's inserted into a test Windows VM (already installed through VNC) and the Linux test VM which is literally just the boot ISO, right now I'm not getting anywhere.

 

When the VM boots on the RX560 nothing changes, no flutter in the display connection or anything. I'll include the log for the Linux VM boot below in case I'm missing something but I can't see any reason why I'm still not getting an output from this GPU and would be open to ideas. Thanks in advance.

 

A note that I did originally have a sacrificial Quadro card in slot 1 for Unraid to devour as it saw fit but discovered that 2 out of the 6 PCIe slots on this motherboard go through the chipset and are thus bound together in the IOMMU groupings and I need to be able to pass through at least 2 USB PCIe cards for this setup to work...

 

Linux VM Log Output:

2019-03-20 08:10:04.234+0000: starting up libvirt version: 4.7.0, qemu version: 3.0.0, kernel: 4.18.20-unRAID, hostname: Tower
LC_ALL=C PATH=/bin:/sbin:/usr/bin:/usr/sbin HOME=/ QEMU_AUDIO_DRV=none /usr/local/sbin/qemu
-name 'guest=OpenSUSE Test,debug-threads=on' -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-2-OpenSUSE Test/master-key.aes'
-machine pc-q35-3.0,accel=kvm,usb=off,dump-guest-core=off,mem-merge=off -cpu host -drive file=/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd,if=pflash,format=raw,unit=0,readonly=on
-drive file=/etc/libvirt/qemu/nvram/32e2a165-5135-97f2-f984-f7b0821d1c9e_VARS-pure-efi.fd,if=pflash,format=raw,unit=1 -m 4096
-realtime mlock=off -smp 6,sockets=1,cores=6,threads=1 -uuid 32e2a165-5135-97f2-f984-f7b0821d1c9e
-display none -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=24,server,nowait -mon hardev=charmonitor,id=monitor,mode=control
-rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=delay -no-hpet -no-shutdown -boot strict=on
-device pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0xpci.1,addr=0x0
-chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,fd=29,server,nowait
-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0
-device vfio-pci,host=41:00.0,id=hostdev0,bus=pci.5,addr=0x0,romfile=/mnt/disk1/isos/Gigabyte.RX560.4096.170421.rom
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on
2019-03-20 08:10:04.235+0000: Domain id=2 is tainted: high-privileges
2019-03-20 08:10:04.235+0000: Domain id=2 is tainted: host-cpu
2019-03-20T08:10:04.277197Z qemu-system-x86_64: -chardev pty,id=charserial0: char device redirected to /dev/pts/1 (label charserial0)

 

Edited by azariah
forgot to include logs, made logs readable
Link to comment
  • 6 months later...
  • 2 months later...
Quote

----------- 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

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

Link to comment
9 hours ago, 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

You're likely to run into the msi issue next (It will manifest as poor performance, and distorted audio sometimes after driver install). Just follow the instructions to msi enable your drivers and that issue should stop after a reboot of the vm ( 

).

Edited by paperblankets
  • Like 1
Link to comment

What user are you sshed as?

 

The exact script I run is:

 

```

#!/bin/bash
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

```

 

Only one vtcon path is valid at a time for me, so I frequently get a `tmp/user.scripts/tmpScripts/Fix mmap/script: line 3: /sys/class/vtconsole/vtcon1/bind: No such file or directory`

Error, but I leave both so my script keeps working if I change video cards or pcie slots.

Link to comment
  • 2 months later...

Hi all

I hope someone will be able to help. Just trying to use two Nvidia in my Unraid system. Secondary is assigned to VM and works just fine, but primary not. When starting VM seems it is started, but no video output from primary GPU. I did bios dump, then I downloaded one and edited to remove first lines of vbios (as described in video). But still no go...no matter what I try....

Edited by mucflyer
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.