Jump to content

The millionth GPU passthrough issue


bwainhouse

Recommended Posts

hey unraiders

 

can't get my GPU to passthrough to a windows 10 VM , followed spaceinvaiderone videos a few times but i just can't seem to get it to work 

the VM logs are showing this 

 

2018-10-27T18:14:15.805403Z qemu-system-x86_64: vfio_region_write(0000:01:00.0:region3+0x30b88, 0x0,8) failed: Device or resource busy
 

think maybe my issue is that i need to unbind my GPU but not sure

 

The GPU is showing on the hardware list: 

IOMMU group 12:[10de:118e] 01:00.0 VGA compatible controller: NVIDIA Corporation GK104 [GeForce GTX 760 OEM] (rev a1)

 

If i use GPU as a primary device then I just a blank screen 

if i use VNC as my primary graphics device, and the card as a secondary then I can see the card on the Windows 10 devices list but it is unusable 

if i reboot the server it the screen will come on the screen GPU will work until i turn on the vm 

Link to comment
3 minutes ago, TType85 said:

Is this the only GPU in the system? Are you passing the Bios through if it is?

Hi Thanks for responding 

 

No i have a second card a gt 710 on the server 

I have put the bios dump (without header) into a folder  but im not 100% its working as I can nerver see the file when i select the path option also doesn't seems to show in the XML 

 

?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm'>
  <name>Windows 10</name>
  <uuid>914e401c-2535-9348-69ea-66050a631b2d</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>3</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='1'/>
    <vcpupin vcpu='1' cpuset='2'/>
    <vcpupin vcpu='2' cpuset='3'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-3.0'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='none'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='3' threads='1'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/Windows 10/vdisk1.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/Win10_1607_English_x64.iso'/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <boot order='2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/virtio-win-0.1.141-1.iso'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:29:f2:be'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <hostdev mode='subsystem' type='pci' managed='yes' xvga='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' 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='0x01' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x045e'/>
        <product id='0x07b9'/>
      </source>
      <address type='usb' bus='0' port='2'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc52b'/>
      </source>
      <address type='usb' bus='0' port='3'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x04b8'/>
        <product id='0x08c3'/>
      </source>
      <address type='usb' bus='0' port='4'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x093a'/>
        <product id='0x2510'/>
      </source>
      <address type='usb' bus='0' port='5'/>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </memballoon>
  </devices>
</domain>
 

just not sure if the bios dump is working and can't see the GPU 

Link to comment

this is how one of my cards (the primary card) is passed through to a VM with the bios.  Once it starts the VM, unraid will not be able to take it back until reboot.

<hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x49' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <rom file='/mnt/user/isos/BIOS/GP106-1060.rom'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>

Link to comment

great thanks!

now showing file in path. woo hoo !

 

so booted the VM and .......................didn't work :(

 

Got this in the logs:

2018-10-28T13:20:46.604216Z qemu-system-x86_64: -device vfio-pci,host=01:00.0,id=hostdev0,x-vga=on,bus=pci.0,addr=0x5,romfile=/mnt/cache/appdata/760rom.rom: Failed to mmap 0000:01:00.0 BAR 3. Performance may be slow

Link to comment

Have you edited the rom file with a hex editor or is it the original version you dumped from the card? Maybe have a look in Spaceinvaders thread, scroll a bit down and the second video he explains how to edit the vbios with a hex editor. I had to do this for the dumped vbios of my 1050ti. The 1080ti i didn't need to modify the vbios to get it to work.

 

 

Link to comment
2 hours ago, bastl said:

Have you edited the rom file with a hex editor or is it the original version you dumped from the card? Maybe have a look in Spaceinvaders thread, scroll a bit down and the second video he explains ho to edit the vbios with a hex editor. I had to do this for the dumped vbios of my 1050ti. The 1080ti i didn't need to modify the vbios to get it to work.

 

Yes mate

 

Followed the video a few times 

That's why I named the bios file .dump not .rom 

 

The impression I'm getting is that GPU passthrough should be quite straightforward

 

so I just can't work out why is not working

 

Any other suggestions?

 

Link to comment

I gues your card is in the first PCI slot, right? You can try to put it in another slot. For some users with 1 GPU it only works that way. Other solution could be to put a second GPU in your system same in as before in the first slot, to give it to unraid itself and the second or third slot the gpu you wanna passthrough. Here is another thread with a user also having issues passing through a 7xx Nvidia Card with the same error, maybe that will do the job for you.

 

EDIT:

My mistake, you have a 710 also in your system. Make sure that the card you wanna passthrough isn't in the first slot. Also make sure you pasthrough the HDMI sound device from your GPU as soundcard. Btw. is your BIOS up to date? If not update it. Make sure to note your current BIOS settings and reaply them after the update. 

Link to comment

ok sooooooo....

 

just tried my unraid on my primary gaming machine 

i7 8700

GTX 710 in slot one 

GTX 1070 in slot two 

added the HDD/SDD's from the Array 

 

Built a new VM added new bios etc booted the VM and BOOM! the flipping thing worked flawlessly 

 

so i'm guessing GTX 760 needs Bios updating or there are compatibility issue with motherboard

 

Might try this on my kids gaming PC see what happends

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...