Help with GPU passthrough


Nanobug

Recommended Posts

I'm having trouble making the GPU passthrough work.

So far, I can see the GPU in the Windows VM I can install the driver, but right after I've installed it, I can install it again.

And it doesn't use it either.

 

I tried following different guides, but I can't make it work.

 

Does anyone have a guide or can tell me the exact requirements to make it work?

Link to comment
16 hours ago, Nanobug said:

I'm having trouble making the GPU passthrough work.

So far, I can see the GPU in the Windows VM I can install the driver, but right after I've installed it, I can install it again.

And it doesn't use it either.

 

I tried following different guides, but I can't make it work.

 

Does anyone have a guide or can tell me the exact requirements to make it work?

 

Sorry but your description says nothing :)

Imagine a user reading what you wrote, how can be possible to help?

Which troubles? Which gpu, which driver?

If I have an installer with the gpu driver and I install it, then I can click again on it and reinstall it again, I see no issue.

Be more specific, and attach diagnostics file!

Link to comment
1 hour ago, ghost82 said:

 

Sorry but your description says nothing :)

Imagine a user reading what you wrote, how can be possible to help?

Which troubles? Which gpu, which driver?

If I have an installer with the gpu driver and I install it, then I can click again on it and reinstall it again, I see no issue.

Be more specific, and attach diagnostics file!

 

I haven't told it in details, but I asked if anyone has a guide, or can guide me through it from start to finish.

I described the problem;

I can see the GPU, I can install the driver, and right after, I can install it again. And it's not using the GPU.

It's a P2200, and its the newest in Nvidia GeForce Experience which is version 496.49.

Diagnostics are added as well.

 

 

nanostorage-diagnostics-20211206-2032.zip

Link to comment

Try to properly set the multifunction device, replace this:

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x06' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>

 

With this:

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x06' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
    </hostdev>

 

Sometimes drivers can have issues if the gpu in the target is not multifunction.

Link to comment
58 minutes ago, ghost82 said:

Try to properly set the multifunction device, replace this:

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x06' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>

 

With this:

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x06' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
    </hostdev>

 

Sometimes drivers can have issues if the gpu in the target is not multifunction.

Where do I change that?

I tried looking for it in the VM, but there's no hostdev section.

Link to comment

Same result.
Device manager says:
image.thumb.png.111f8a0b5fadcdb1b660b22ab2862f41.png

 

I tried downloading a driver and save it on the desktop as well and install that.

This is version 472.47 (had it from the first time I tried this) of the Nvidia driver.

 

When I tried from Nvidia Geforce Experience I can install it again right after, so there's never an installed driver. I always do a clean install.

It's version 496.49 here.
image.png.605621bce85b58e2e350c6b47e7807a7.png

And right after:

image.thumb.png.705bce9707fae9ba978b15c1251e4588.png

 

If I check on my desktop (not the VM):

image.thumb.png.fa7af0dedb2fe447d898e9973e8b8a84.png

 

Link to comment

That's really odd...I have no idea of what is happening...If I search in google it seems you are not alone, so I'm not sure this issue is related to virtualization.

What happens if you uninstall the drivers from the device manager, reboot and run windows update? Does it install any driver (not with the geforce experience app, nor manually)?

 

What does the yellow mark say in device manager?Any error code?

Edited by ghost82
Link to comment
13 hours ago, ghost82 said:

That's really odd...I have no idea of what is happening...If I search in google it seems you are not alone, so I'm not sure this issue is related to virtualization.

What happens if you uninstall the drivers from the device manager, reboot and run windows update? Does it install any driver (not with the geforce experience app, nor manually)?

 

What does the yellow mark say in device manager?Any error code?

I just thought I did it the wrong way. Because all I've heard, is that it's supposed to be really easy to set up GPU passthrough in unRAID.

 

I'll check that later when I'm home, and give the information.

Link to comment

It could be error 43 because nvidia detects a virtual machine.

It is true that nvidia now allows passthrough of its gpus, from march 2021?, but this should only be with its consumer cards.

From Nvidia:

Quote

The feature is enabled on all GeForce/TITAN GPUs supported in the R465 driver (Kepler and later for Desktop; Maxwell and later for Notebook) for Windows 10.

 

It could be that quadro cards are not "consumer gpus", so you need to apply all the fixes to hide the hypervisor from nvidia.

If this is the case I would try to hide the hypervisor by modifying the xml.

 

Replace this:

  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='none'/>
    </hyperv>
  </features>

 

With this:

  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='1234567890ab'/>
    </hyperv>
    <kvm>
      <hidden state='on'/>
    </kvm>
  </features>

 

Link to comment
2 hours ago, ghost82 said:

It could be error 43 because nvidia detects a virtual machine.

It is true that nvidia now allows passthrough of its gpus, from march 2021?, but this should only be with its consumer cards.

From Nvidia:

 

It could be that quadro cards are not "consumer gpus", so you need to apply all the fixes to hide the hypervisor from nvidia.

If this is the case I would try to hide the hypervisor by modifying the xml.

 

Replace this:

  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='none'/>
    </hyperv>
  </features>

 

With this:

  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='1234567890ab'/>
    </hyperv>
    <kvm>
      <hidden state='on'/>
    </kvm>
  </features>

 

 

I'll try that later when I'm home.
Thank you so far.

I'll let you know what happens.

Link to comment
21 hours ago, ghost82 said:

It could be error 43 because nvidia detects a virtual machine.

It is true that nvidia now allows passthrough of its gpus, from march 2021?, but this should only be with its consumer cards.

From Nvidia:

 

It could be that quadro cards are not "consumer gpus", so you need to apply all the fixes to hide the hypervisor from nvidia.

If this is the case I would try to hide the hypervisor by modifying the xml.

 

Replace this:

  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='none'/>
    </hyperv>
  </features>

 

With this:

  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='1234567890ab'/>
    </hyperv>
    <kvm>
      <hidden state='on'/>
    </kvm>
  </features>

 

This didn't work. I'll double check it though, since I only had 10 minutes yesterday to do it. Just in case.

 

Haven't had time to try removing the driver and reboot Windows.

I'll try to get it done during today at work.

Link to comment

You were right about the code 43:

image.png.6efc3d80dc02f9e9b2ac6430bfde688e.png

 

It's a bit quiet here, so I've had time to check the rest.

Removing it from Device Management and rebooting it didn't help.

 

Found this one in the updates:
image.png.32c3ee6514c7673f731158efd14139e5.png

 

Didn't work either.

I've tried disabling the graphics card, reboot the VM and enable it again.

 

 

I did mod the XML file with the addition you made, and it didn't help either.

Any other ideas I could try, or should I just start over?

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.