GPU pass through not working (GTX 650 Ti Boost)


Recommended Posts

Hi!

 

I have used unraid for about 3 months and I'm loving it. Today I added a graphic card to connect one of my virtual machines to a monitor. The problem is that the screen is black and I have tried to fix it after reading the FAQ and online searches.

 

My unraid server:

6.2.0-beta23

MSI X99A Raider LGA 2011-v3

Intel Core i7-5820K

ASUS GTX 650 TI Boost

 

I have tried with Windows 10 and LibreElec (i440f-2.5, OVMF) but have also tried with Q35-2.5.

 

Log when booting

Domain id=1 is tainted: high-privileges
Domain id=1 is tainted: host-cpu

 

I have tried to download the GPU ROM for my card. Full config file with ROM:

 

<domain type='kvm'>
  <name>JF</name>
  <uuid>9d8c16e6-feef-baf5-e65f-4348ce816d4e</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
    <vcpupin vcpu='2' cpuset='2'/>
    <vcpupin vcpu='3' cpuset='3'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/9d8c16e6-feef-baf5-e65f-4348ce816d4e_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor id='none'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='2' threads='2'/>
  </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/cache/vm/vdisk1.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/Windows_10_Pro_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.112-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:a8:93:7c'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <source mode='connect'/>
      <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'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0' keymap='no'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x06' slot='0x00' function='0x1'/>
      </source>
      <rom file='/mnt/user/isos/Asus.GTX650TiBoost.2048.130312.rom'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc52b'/>
      </source>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

I really appreciate any help.

Link to comment

Can you try installing the VNC driver as your first graphics card and the Nvidia as your second and see if your device manager is detecting the card?  That's the first step I did in troubleshooting my issue.  The final settings that worked for me were i440f-2.3 and OVMF.  Word of warning to you, Win10 will eventually install an update that will bork your whole VM.  I'm not sure which one it is, but last weekend I set up my first VM and ended up installing Win10 at least 13 times before I gave up and went back to 7.  Haven't had an issue since.

Link to comment

Do you have onboard video? Do you see the unRAID console on its display? What's the error code on the card in device manager?

The error message is: Code 43: Windows has stopped this device because it has reported problems

Probably because I tried adding a driver, removed it now.

 

No, I don't have onboard video. When it boots I can see the console, it goes away when I'm booting with the pass through card.

I did try to add another graphic card (9500 GT), placed it in slot 1 and moved the 650 card to slot 2. No changes.

Link to comment

Do you have onboard video? Do you see the unRAID console on its display? What's the error code on the card in device manager?

The error message is: Code 43: Windows has stopped this device because it has reported problems

Probably because I tried adding a driver, removed it now.

 

No, I don't have onboard video. When it boots I can see the console, it goes away when I'm booting with the pass through card.

I did try to add another graphic card (9500 GT), placed it in slot 1 and moved the 650 card to slot 2. No changes.

 

If you have an nvidea gpu as your primary card you will nee to do what hupster suggests in this post

http://lime-technology.com/forum/index.php?topic=43644.msg482110;topicseen#msg482110

Link to comment
If you have an nvidea gpu as your primary card you will nee to do what hupster suggests in this post

http://lime-technology.com/forum/index.php?topic=43644.msg482110;topicseen#msg482110

Thanks for your reply. I did just try that, got the dump file created and added the 650 card back to the first slot.

Added the rom in the xml:

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
      </source>
      <rom file='/mnt/user/isos/650.dump'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>

when I'm trying to boot the VM, the screen goes black and I get the same messages in the log as in my first post.  :-\

Link to comment

You do realize you need 2 video cards if you want to pass through to a VM? unRAID needs a video input and the VM needs one. Doesn't matter if unRAID is using onboard or a installed card.

Yeah, like I said: I did try to add another graphic card (9500 GT), placed it in slot 1 and moved the 650 card to slot 2. No changes.

And it seems like users with one GPU have got it working: http://lime-technology.com/forum/index.php?topic=43644.0

Link to comment

You do realize you need 2 video cards if you want to pass through to a VM? unRAID needs a video input and the VM needs one. Doesn't matter if unRAID is using onboard or a installed card.

 

This is a false statement, UnRAID doesn't require a GPU at all however will certainly use one if it is available.

The reason we need two cards is an Nvidia issue, and not apparent with an AMD GPU (however the workaround gridrunner linked to has been successful for many individuals) .

I have four video cards and run 4 VM's with GPU's assigned, UnRAID grabs the 1st card (AMD) initially, and then I "steal" it away for my primary VM.

 

You do realize you need 2 video cards if you want to pass through to a VM? unRAID needs a video input and the VM needs one. Doesn't matter if unRAID is using onboard or a installed card.

Yeah, like I said: I did try to add another graphic card (9500 GT), placed it in slot 1 and moved the 650 card to slot 2. No changes.

And it seems like users with one GPU have got it working: http://lime-technology.com/forum/index.php?topic=43644.0

 

When you had two Nvidia cards, you got the exact same condition/issue?

Have you tried SeaBIOS as opposed to OVMF? OVMF/UEFI doesn't work with all cards.

Link to comment

You do realize you need 2 video cards if you want to pass through to a VM? unRAID needs a video input and the VM needs one. Doesn't matter if unRAID is using onboard or a installed card.

Yeah, like I said: I did try to add another graphic card (9500 GT), placed it in slot 1 and moved the 650 card to slot 2. No changes.

And it seems like users with one GPU have got it working: http://lime-technology.com/forum/index.php?topic=43644.0

 

When you had two Nvidia cards, you got the exact same condition/issue?

Have you tried SeaBIOS as opposed to OVMF? OVMF/UEFI doesn't work with all cards.

Yes. I placed the 9500 GT card in the first slot, and the 650 TI card in the second slot. I tried to attach the 650 card to a VM, no output. I've tried with SeaBIOS, but I wonder if I have to reboot UnRAID between each try because when I try to start a VM with the card attached the screen goes black (UnRAID console is lost)

Link to comment

I've tried with SeaBIOS, but I wonder if I have to reboot UnRAID between each try because when I try to start a VM with the card attached the screen goes black (UnRAID console is lost)

 

No reboot needed, and the console going black is to be expected.

When using SeaBIOS and starting a VM the console output will always be lost as there is a VGA arbitration "thing" going on (I'm not looking it up right now) and this is to be expected.

The console will only come back after a reboot. The boot option with the GUI I don't believe has this issue (however I've never tried).

Unless your card is in hard locked state, reboot or power down will likely not help.

Thinking of that, and likely not your issue. If your card was hard locked, a complete power off with removal of power (turn off PSU, unplug, etc...) would get the card useable again, however this is not common at all and I doubt the issue. 

 

 

Link to comment

Okay, so I've updated my mainboard BIOS to the latest version, tried different settings (SeaBIOS/OVMF and different machines), Hyper V off. Did also try with Windows 7 (with and without the xml line rom file..)

Anything else I can test or check?

 

Did you attempt to pass the rom for the card?

Instructions in the wiki somewhere (sorry, in a hurry).

Link to comment

Okay, so I've updated my mainboard BIOS to the latest version, tried different settings (SeaBIOS/OVMF and different machines), Hyper V off. Did also try with Windows 7 (with and without the xml line rom file..)

Anything else I can test or check?

 

Did you attempt to pass the rom for the card?

Instructions in the wiki somewhere (sorry, in a hurry).

You mean downloading the rom and add the rom file= ... line under </source>? Yep, nothing changed.

Really appreciate your time

Link to comment

Okay, so I've updated my mainboard BIOS to the latest version, tried different settings (SeaBIOS/OVMF and different machines), Hyper V off. Did also try with Windows 7 (with and without the xml line rom file..)

Anything else I can test or check?

 

Did you attempt to pass the rom for the card?

Instructions in the wiki somewhere (sorry, in a hurry).

You mean downloading the rom and add the rom file= ... line under </source>? Yep, nothing changed.

Really appreciate your time

 

It is important to get a good dump of your rom. Maybe try again using hupsters guide to extract your rom file. If you have downloaded the rom from tech powerup it may well not work.

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.