Passing Through Video Card Not Working


wesman

Recommended Posts

Hi, I am hoping I can get a little help with a Graphic Card Passthrough. 

Hardware:
Asus Crosshair 8
AM4 Ryzen 3700 (No dedicated graphics)

RTX 2070 Super (Only Graphics Card)

 

I have setup the Windows 10 VM with VNC and it works fine. 

 

Attempting to add the Graphic card however causes this error (MORE BELOW IMAGE)

Sorry the image is so large. :(

162961434_ScreenShot2019-10-16at6_44_20PM.thumb.png.c0390b1c3446f23eea696b0dfe055b82.png

 

I have confirmed that its in its own IOMMU group

 

711230538_ScreenShot2019-10-16at6_45_07PM.thumb.png.94e2ee1c51e59225cf80a3b63700a697.png

 

Also attempted to add the BIOS from https://www.techpowerup.com

2045861174_ScreenShot2019-10-16at6_46_06PM.thumb.png.dcb06dbffea83eec344d768da1e2fee8.png

 

and Allow Unsafe Interrupts

1435082104_ScreenShot2019-10-16at6_47_43PM.thumb.png.03ad27c88b1ceafcb8bb7e73e37945b6.png

 

but still I get the same error. IF i change ACS override (reboot) and try again, when launching the VM, the entire system hangs requiring a full (push the button) reset. 

 

I upgraded the 6.8.0 RC1 to see if there way any help there, but no. Any ideas?

Link to comment

 

45 minutes ago, Squid said:

You're not passing through the USB controller or the serial that's also on the card (why your passthrough isn't viable).

I did see the other two, but didn't know how to pass them through. There is a "Other PCI Devices" but it was not editable, do I have to edit the XML and if so, what would that syntax look like?

Link to comment
1 hour ago, wesman said:

 

I did see the other two, but didn't know how to pass them through. There is a "Other PCI Devices" but it was not editable, do I have to edit the XML and if so, what would that syntax look like?

I have Nvidia RTX card also and I just set ACS to both which split them into there own seperate iommu groups and has worked great.

Link to comment
1 hour ago, wesman said:

 

I did see the other two, but didn't know how to pass them through. There is a "Other PCI Devices" but it was not editable, do I have to edit the XML and if so, what would that syntax look like?

Also you can pass the usb through by adding vfio-pci.ids=10de:1ad8,10de:1ad9 to your syslinux config for them to show up in the VM template in unRAID.

Link to comment
9 hours ago, jpowell8672 said:

I have Nvidia RTX card also and I just set ACS to both which split them into there own seperate iommu groups and has worked great.

I did try that

1993226626_ScreenShot2019-10-16at10_05_04PM.thumb.png.9e6b86005b04a7b29a773dd60a2b208f.png

 

but it made no difference. @jpowell8672 with regards to passing through, is this the correct syntax?

 

<qemu:commandline>     <<<----- add the two device in this group on the XML File
     <qemu:arg value='-device'/>      
     <qemu:arg value='vfio-pci,host=0b:00.2,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>    
     <qemu:arg value='-device'/>    
     <qemu:arg value='vfio-pci,host=0b:00.3,bus=root.1,addr=00.1'/>  
</qemu:commandline>

 

or do I need to use the 10de:1ad8 and 10de:1ad9 numbers?

 

Link to comment

Update:

 

@jpowell8672 I was wrong about it working, the Window 10 VM got a green Play Icon and I assumed it was working but it wasn't. 

 

I think I had a black screen, I followed the second video with updating the ROM, but still black screen. 

 

I looked at the VM Log and was seeing this.. 0000:0b:00.0 is my Nvidia card

2019-10-18T02:02:08.239896Z qemu-system-x86_64: vfio_region_write(0000:0b:00.0:region1+0x12a738, 0x0,8) failed: Device or resource busy

 

 

Edited by wesman
Link to comment
3 hours ago, wesman said:

Update:

 

@jpowell8672 I was wrong about it working, the Window 10 VM got a green Play Icon and I assumed it was working but it wasn't. 

 

I think I had a black screen, I followed the second video with updating the ROM, but still black screen. 

 

I looked at the VM Log and was seeing this.. 0000:0b:00.0 is my Nvidia card

2019-10-18T02:02:08.239896Z qemu-system-x86_64: vfio_region_write(0000:0b:00.0:region1+0x12a738, 0x0,8) failed: Device or resource busy

 

 

Any thing else I can try? is this only an issue if the system has a only one graphic card (primary)?

Link to comment
35 minutes ago, wesman said:

Any thing else I can try? is this only an issue if the system has a only one graphic card (primary)?

Can't help you with so little info, post your current vm xml, screenshot of your vm template, syslinux config, Tools>System Devices & Tools>Diagnostics.

Edited by jpowell8672
add system devices
Link to comment
On 10/16/2019 at 9:54 PM, jpowell8672 said:

Do you have HVM & IOMMU enabled in the bios and not on auto which makes a difference? Do you have the latest bios? Newest bios agesa have caused problems with passthrough. Try another video bios close to your card or dump your actual bios. Try multifunction acs. What is machine type & bios type set to in the vm config?

You never even answered these questions to be able to properly help you.

Link to comment
On 10/16/2019 at 8:55 PM, wesman said:

Hi, I am hoping I can get a little help with a Graphic Card Passthrough. 

Hardware:
Asus Crosshair 8
AM4 Ryzen 3700 (No dedicated graphics)

RTX 2070 Super (Only Graphics Card)

 

I have setup the Windows 10 VM with VNC and it works fine. 

 

Attempting to add the Graphic card however causes this error (MORE BELOW IMAGE)

Sorry the image is so large. :(

162961434_ScreenShot2019-10-16at6_44_20PM.thumb.png.c0390b1c3446f23eea696b0dfe055b82.png

 

I have confirmed that its in its own IOMMU group

 

711230538_ScreenShot2019-10-16at6_45_07PM.thumb.png.94e2ee1c51e59225cf80a3b63700a697.png

 

Also attempted to add the BIOS from https://www.techpowerup.com

2045861174_ScreenShot2019-10-16at6_46_06PM.thumb.png.dcb06dbffea83eec344d768da1e2fee8.png

 

and Allow Unsafe Interrupts

1435082104_ScreenShot2019-10-16at6_47_43PM.thumb.png.03ad27c88b1ceafcb8bb7e73e37945b6.png

 

but still I get the same error. IF i change ACS override (reboot) and try again, when launching the VM, the entire system hangs requiring a full (push the button) reset. 

 

I upgraded the 6.8.0 RC1 to see if there way any help there, but no. Any ideas?

You might have a similiar issue as me. When i boot into my vm. It doesn't hang. Instead i get a black screen for about 10 minutes and the screen comes on. During that time cpu usuage is at 100% but only one 1 core.

Link to comment
11 hours ago, jpowell8672 said:

You never even answered these questions to be able to properly help you.

Hi @jpowell8672 Thanks for all your assistance, below is the information you asked for.

The last thing I tried was to Dump my own BIOS from the Video Card (GPU-Z), mod it, and use that in the passthrough. 

Yes, I downgraded the BIOS to each previous level and tried on it, currently, I am down to the release BIOS for the this board ASUS Crosshair Hero 8

 

Yes, i made sure the BIOS Virtualization was set to enabled, not just "auto"

**** SYSLINUX

default menu.c32
menu title Lime Technology, Inc.
prompt 0
timeout 50
label Unraid OS
  menu default
  kernel /bzimage
  append initrd=/bzroot vfio-pci.ids=144d:a802,10de:1ad8,10de:1ad9,10ec:8125
label Unraid OS GUI Mode
  kernel /bzimage
  append initrd=/bzroot,/bzroot-gui
label Unraid OS Safe Mode (no plugins, no GUI)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label Unraid OS GUI Safe Mode (no plugins)
  kernel /bzimage
  append initrd=/bzroot,/bzroot-gui unraidsafemode
label Memtest86+
  kernel /memtest

 

*** VM Config

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm'>
  <name>Windows 10 DualBoot</name>
  <uuid>52af3a68-d904-87f5-3ac3-04d9E4573ac2</uuid>
  <description>Dual Bootable Bare Metal and via Unraid</description>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>24641536</memory>
  <currentMemory unit='KiB'>24641536</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>14</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='1'/>
    <vcpupin vcpu='1' cpuset='9'/>
    <vcpupin vcpu='2' cpuset='2'/>
    <vcpupin vcpu='3' cpuset='10'/>
    <vcpupin vcpu='4' cpuset='3'/>
    <vcpupin vcpu='5' cpuset='11'/>
    <vcpupin vcpu='6' cpuset='4'/>
    <vcpupin vcpu='7' cpuset='12'/>
    <vcpupin vcpu='8' cpuset='5'/>
    <vcpupin vcpu='9' cpuset='13'/>
    <vcpupin vcpu='10' cpuset='6'/>
    <vcpupin vcpu='11' cpuset='14'/>
    <vcpupin vcpu='12' cpuset='7'/>
    <vcpupin vcpu='13' cpuset='15'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-3.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/52af3a68-d904-87f5-3ac3-04d9f5873ac2_VARS-pure-efi.fd</nvram>
    <boot dev='hd'/>
  </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='14' 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='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/virtio-win-0.1.160-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='0x03' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:cc:63:4b'/>
      <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'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x0b' slot='0x00' function='0x0'/>
      </source>
      <rom file='/mnt/user/domains/ASUSRTX2070SuperROM_ORG_Modded.rom'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x0b' slot='0x00' function='0x1'/>
      </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='0x04' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x0b' slot='0x00' function='0x2'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x0b' slot='0x00' function='0x3'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc045'/>
      </source>
      <address type='usb' bus='0' port='2'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x0518'/>
        <product id='0x0001'/>
      </source>
      <address type='usb' bus='0' port='3'/>
    </hostdev>
    <memballoon model='none'/>
  </devices>
</domain>
valyria-diagnostics-20191018-1337.zip

Link to comment
5 hours ago, Sleepyme said:

You might have a similiar issue as me. When i boot into my vm. It doesn't hang. Instead i get a black screen for about 10 minutes and the screen comes on. During that time cpu usuage is at 100% but only one 1 core.

Interesting, I tried waiting 10 minutes, went and ate breakfast and came back, the Windows VM was in a Paused state, trying to resume it just made it move to a Stopped state with the Error that CONT was not an option. 

Link to comment
  • 3 weeks later...

I Think I had a similar problem with my 980ti, that it was busy.

What I did was to put this in my sys linux conf under the unraid os boot option.

append vfio-pci.ids=mygf:xcard

 

What this did was half way through the boot of unraid my gfx card was disabled from being used by unraid and it was no longer busy for the vm.

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