VM GPU passthrough (6.7.0-rc3)


casperse

Recommended Posts

Hi All

 

Facing some trouble having two display adapters one Nvidia GPU and the other Intel iGP

especially when selecting one primary for "Nvidia Unraid" but that's a discussion in another thread ;-)

 

I am like many others following the video on getting passthrough working on a windows 10 gamer VM

and found that my MB had grouped the adapter with alot of others devices so I had to enable "PCIe ACS Override"

I then got a Group 16 with the Nvidia card

1421306218_13-02-201911-24-08.thumb.jpg.d853fe04eda9a5d88c38d3578f063ada.jpg

 

I then selected the card in the VM

948676304_13-02-201911-23-17.jpg.1dd3bf9db07c68194dd08fd546c53add.jpg

 

And fired up the VM and got this

1289737367_13-02-201911-18-31.jpg.184f9f4727978b5cbf274f3b2ecc930d.jpg

 

The card was not being initialized and updating the driver didn't help.

The log file states:

1825709877_13-02-201911-17-15.jpg.66318873b30de44aaf201d8bcb3e25a2.jpg

 

Any input to what to do next? do I need some BIOS file for the card?

 

Thanks

 

 

 

Edited by casperse
Link to comment

There are different things you can test to fix Code43 on NVidia cards. This error mostly occurs when the Nvidia driver notices it runs inside a VM. Change the VM machine type between i440fx and Q35 or setup a VM as OVMF or as Seabios, HyperV on vs off, passthrough a BIOS for the Card, change the PCIe slot the card is placed in. There are a couple threads here in the forum with this topic. There are no general fix that works for everyone. 

Edited by bastl
Link to comment
4 hours ago, casperse said:

Hi All

 

Facing some trouble having two display adapters one Nvidia GPU and the other Intel iGP

especially when selecting one primary for "Nvidia Unraid" but that's a discussion in another thread ;-)

 

I am like many others following the video on getting passthrough working on a windows 10 gamer VM

and found that my MB had grouped the adapter with alot of others devices so I had to enable "PCIe ACS Override"

I then got a Group 16 with the Nvidia card

1421306218_13-02-201911-24-08.thumb.jpg.d853fe04eda9a5d88c38d3578f063ada.jpg

 

I then selected the card in the VM

948676304_13-02-201911-23-17.jpg.1dd3bf9db07c68194dd08fd546c53add.jpg

 

And fired up the VM and got this

1289737367_13-02-201911-18-31.jpg.184f9f4727978b5cbf274f3b2ecc930d.jpg

 

The card was not being initialized and updating the driver didn't help.

The log file states:

1825709877_13-02-201911-17-15.jpg.66318873b30de44aaf201d8bcb3e25a2.jpg

 

Any input to what to do next? do I need some BIOS file for the card?

 

Thanks

 

 

 

Sounds like your booting with a single gpu and your also booting with UEFI mode.. If both of these things are true. Then try this..

 

1. Turn off autostart with the vm that has GPU passthrough

2. Restart unraid

3. Wait for unraid to fully boot and bring the array up.

4. Connect with putty and run the below commands.

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

5. Try starting the machine again

6. Tell me what happened. 

Link to comment

Ok thanks for the links... Maybee a little beyond my skill level but I will try, and document my learning here ;-)

 

I tried to use the user scripts and got this: 

Script location: /tmp/user.scripts/tmpScripts/Fix Gpu Passthrough/script
Note that closing this window will abort the execution of this script
/tmp/user.scripts/tmpScripts/Fix Gpu Passthrough/script: line 4: /sys/bus/platform/drivers/efi-framebuffer/unbind: Permission denied

Then I used putty and executed them manually, that went ok

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

That went ok, I then went back and tried to start up the VM

image.thumb.png.902e5feacbb4129ff3399ea1f24b39cc.png

Still getting the:

image.png.54a47b9afb47c6b1378eef52aa185c27.png

 

I then tried to change the Change the VM machine type between i440fx and Q35

image.thumb.png.25ebc12256209c1bfc9efbd745b1e5aa.png

 

But that wasnt allowed - Do I have to create a new from scratch?

 

Also trying to setup VM as Seabios, HyperV on vs off,

is greyed out and cannot be changed

 

image.png.71c62d9cd5905a96abe32cfc09a3156c.png

 

Finally passthrough a BIOS for the Card, I tried looking for a bios file for my Quadro P2000 card at techpowerup.com

but they didnt have one, and I could only see a way to dump it using CPU-Z if it was placed in a local windows machine which I dont have.

 

Anyone having a vBios for the Quadro P2000 that they would like to share then give me a ping Thanks!

 

 

 

 

Link to comment
3 hours ago, Jerky_san said:

Sounds like your booting with a single gpu and your also booting with UEFI mode.. If both of these things are true. Then try this..

 

1. Turn off autostart with the vm that has GPU passthrough

2. Restart unraid

3. Wait for unraid to fully boot and bring the array up.

4. Connect with putty and run the below commands.

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

5. Try starting the machine again

6. Tell me what happened. 

Ok here are the logs still same error in windows

 

image.thumb.png.54a5046a134264ec37ac25b399bcfadd.png

Link to comment
1 hour ago, Jerky_san said:

Ok pretty sure this one is it..

 

Also this might work..

https://www.techpowerup.com/vgabios/200435/200435

 

Thanks I already found that file and edited it in one of the other videoes to remove the vbios Nvidia header but at that time it didn't work?

I think it's because I run the script it now seem to work just took a little time to process

 

Here is the edited file to anyone else who need it: 

quadroP2000.rom

 

Also here is the line added:

image.thumb.png.28e430d78a86e89b55c4a1b7d9b7729a.png

 

And Voila (Thanks for all your help!)

image.thumb.png.fa70df8429390667d64fb8db3a598db8.png

 

Last thing, how do I get the user script to run the script at boot up?

Seem it doesn't have the root access to run the 3 lines any input on how to fix that?

 

Edited by casperse
Link to comment
  • 1 month later...

Hi @Jerky_san

I just updated Unraid to Version: 6.7.0-rc7 and afterwards when I try to start this VM i get this error: 

 

internal error: unknown pci source type 'vendor'

 

Anyone experienced the same? and maybee know of a quick solution?

Thanks

image.thumb.png.3b038a5a7b818d9bbbb5b6d15e5b7e77.pngimageproxy.php?img=&key=00b562fcac28e727

 

Logs:

 

 

2019-04-17 11:58:30.535+0000: 5584: info : libvirt version: 5.1.0
2019-04-17 11:58:30.535+0000: 5584: error : virUSBDeviceFindByVendor:218 : internal error: Did not find USB device 046d:c077
2019-04-17 11:58:30.781+0000: 5584: warning : virHostdevReAttachUSBDevices:1869 : Unable to find device 000.000 in list of active USB devices
2019-04-17 11:58:30.781+0000: 5584: warning : virHostdevReAttachUSBDevices:1869 : Unable to find device 000.000 in list of active USB devices
2019-04-17 11:59:28.634+0000: 5588: error : virUSBDeviceFindByVendor:218 : internal error: Did not find USB device 046d:c077
2019-04-17 11:59:28.877+0000: 5588: warning : virHostdevReAttachUSBDevices:1869 : Unable to find device 000.000 in list of active USB devices
2019-04-17 11:59:28.877+0000: 5588: warning : virHostdevReAttachUSBDevices:1869 : Unable to find device 000.000 in list of active USB devices
2019-04-17 11:59:54.230+0000: 5593: error : virDomainHostdevSubsysPCIDefParseXML:7471 : internal error: unknown pci source type 'vendor'
2019-04-17 12:00:02.880+0000: 5592: error : virDomainHostdevSubsysPCIDefParseXML:7471 : internal error: unknown pci source type 'vendor'
2019-04-17 12:00:08.092+0000: 5586: error : virDomainHostdevSubsysPCIDefParseXML:7471 : internal error: unknown pci source type 'vendor'
2019-04-17 12:01:53.411+0000: 5585: error : virUSBDeviceFindByVendor:218 : internal error: Did not find USB device 046d:c077
2019-04-17 12:01:53.655+0000: 5585: warning : virHostdevReAttachUSBDevices:1869 : Unable to find device 000.000 in list of active USB devices
2019-04-17 12:01:53.655+0000: 5585: warning : virHostdevReAttachUSBDevices:1869 : Unable to find device 000.000 in list of active USB devices
2019-04-17 12:07:38.847+0000: 5588: error : virUSBDeviceFindByVendor:218 : internal error: Did not find USB device 046d:c077
2019-04-17 12:07:39.101+0000: 5588: warning : virHostdevReAttachUSBDevices:1869 : Unable to find device 000.000 in list of active USB devices
2019-04-17 12:07:39.101+0000: 5588: warning : virHostdevReAttachUSBDevices:1869 : Unable to find device 000.000 in list of active USB devices
2019-04-17 12:08:29.534+0000: 5591: error : virDomainHostdevSubsysPCIDefParseXML:7471 : internal error: unknown pci source type 'vendor'
2019-04-17 12:09:44.069+0000: 5584: error : virDomainHostdevSubsysPCIDefParseXML:7471 : internal error: unknown pci source type 'vendor'
2019-04-17 12:10:04.432+0000: 5584: error : virDomainHostdevSubsysPCIDefParseXML:7471 : internal error: unknown pci source type 'vendor'
2019-04-17 12:11:18.173+0000: 5589: error : virDomainHostdevSubsysPCIDefParseXML:7471 : internal error: unknown pci source type 'vendor'

 

Edited by casperse
Link to comment
  • 2 weeks 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.