GPU Passthrough to Black Screen


Recommended Posts

Hello,

 

I'm trying setup a GPU passthrough with Debian using a GTX580, however after starting the VM I either get a black screen or no output on re-attempts. I've had success with another build with a GTX970 already, and I've followed the same process.

 

VM XML

<domain type='kvm'>
  <name>DebianPC</name>
  <uuid>2bb6f8a0-eba1-0f56-dcb5-15812410c64a</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Debian" icon="debian.png" os="debian"/>
  </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='1'/>
    <vcpupin vcpu='1' cpuset='2'/>
    <vcpupin vcpu='2' cpuset='6'/>
    <vcpupin vcpu='3' cpuset='7'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-q35-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/2bb6f8a0-eba1-0f56-dcb5-15812410c64a_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='2' threads='2'/>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <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/DebianPC/vdisk1.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/debian-8.7.1-amd64-netinst.iso'/>
      <target dev='hda' bus='sata'/>
      <readonly/>
      <boot order='2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </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='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <model name='i82801b11-bridge'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <model name='pci-bridge'/>
      <target chassisNr='2'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:97:1c:1b'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' 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>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' 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='0x02' slot='0x06' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

VM logs

ErrorWarningSystemArrayLogin


2017-01-31 03:42:37.509+0000: starting up libvirt version: 1.3.1, qemu version: 2.5.1, hostname: Skynet
LC_ALL=C PATH=/bin:/sbin:/usr/bin:/usr/sbin HOME=/ QEMU_AUDIO_DRV=none /usr/local/sbin/qemu -name DebianPC -S -machine pc-q35-2.5,accel=kvm,usb=off,mem-merge=off -cpu host -drive file=/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd,if=pflash,format=raw,unit=0,readonly=on -drive file=/etc/libvirt/qemu/nvram/2bb6f8a0-eba1-0f56-dcb5-15812410c64a_VARS-pure-efi.fd,if=pflash,format=raw,unit=1 -m 4096 -realtime mlock=on -smp 4,sockets=1,cores=2,threads=2 -uuid 2bb6f8a0-eba1-0f56-dcb5-15812410c64a -nographic -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-DebianPC/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -boot strict=on -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x1 -device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x7.0x7 -device ich9-usb-uhci1,masterbvirtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -device vfio-pci,host=02:00.0,id=hostdev0,bus=pci.2,addr=0x4 -device vfio-pci,host=02:00.1,id=hostdev1,bus=pci.2,addr=0x5 -device usb-host,hostbus=3,hostaddr=4,id=hostdev2 -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x6 -msg timestamp=on
Domain id=1 is tainted: high-privileges
Domain id=1 is tainted: host-cpu
char device redirected to /dev/pts/0 (label charserial0)
2017-01-31T03:45:16.262527Z qemu-system-x86_64: terminating on signal 15 from pid 12678
2017-01-31 03:45:17.663+0000: shutting down
2017-01-31 04:10:38.606+0000: starting up libvirt version: 1.3.1, qemu version: 2.5.1, hostname: Skynet
LC_ALL=C PATH=/bin:/sbin:/usr/bin:/usr/sbin HOME=/ QEMU_AUDIO_DRV=none /usr/local/sbin/qemu -name DebianPC -S -machine pc-q35-2.5,accel=kvm,usb=off,mem-merge=off -cpu host -drive file=/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd,if=pflash,format=raw,unit=0,readonly=on -drive file=/etc/libvirt/qemu/nvram/2bb6f8a0-eba1-0f56-dcb5-15812410c64a_VARS-pure-efi.fd,if=pflash,format=raw,unit=1 -m 4096 -realtime mlock=on -smp 4,sockets=1,cores=2,threads=2 -uuid 2bb6f8a0-eba1-0f56-dcb5-15812410c64a -nographic -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-DebianPC/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -boot strict=on -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x1 -device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x7.0x7 -device ich9-usb-uhci1,masterbvirtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -device vfio-pci,host=02:00.0,id=hostdev0,bus=pci.2,addr=0x4 -device vfio-pci,host=02:00.1,id=hostdev1,bus=pci.2,addr=0x5 -device usb-host,hostbus=3,hostaddr=4,id=hostdev2 -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x6 -msg timestamp=on
Domain id=7 is tainted: high-privileges
Domain id=7 is tainted: host-cpu
char device redirected to /dev/pts/0 (label charserial0)
2017-01-31T04:24:55.842939Z qemu-system-x86_64: terminating on signal 15 from pid 12678
2017-01-31 04:24:57.844+0000: shutting down

 

I noticed some errors in my unraid log. I've confirmed the GPU is connected well (Or the best I can tell).

Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: can't find device of ID0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: AER: Multiple Corrected error received: id=0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: can't find device of ID0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: AER: Multiple Corrected error received: id=0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: can't find device of ID0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: AER: Multiple Corrected error received: id=0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: can't find device of ID0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: AER: Multiple Corrected error received: id=0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: can't find device of ID0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: AER: Multiple Corrected error received: id=0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: can't find device of ID0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: AER: Multiple Corrected error received: id=0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: can't find device of ID0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: AER: Multiple Corrected error received: id=0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: can't find device of ID0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: AER: Multiple Corrected error received: id=0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: can't find device of ID0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: AER: Multiple Corrected error received: id=0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: can't find device of ID0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: AER: Multiple Corrected error received: id=0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: can't find device of ID0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: AER: Multiple Corrected error received: id=0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: can't find device of ID0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: AER: Multiple Corrected error received: id=0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: can't find device of ID0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: AER: Multiple Corrected error received: id=0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: can't find device of ID0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: AER: Multiple Corrected error received: id=0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: can't find device of ID0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: AER: Multiple Corrected error received: id=0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: can't find device of ID0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: AER: Multiple Corrected error received: id=0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: can't find device of ID0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: AER: Multiple Corrected error received: id=0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:02.0: can't find device of ID0010
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:03.0: AER: Multiple Corrected error received: id=0018
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:03.0: PCIe Bus Error: severity=Corrected, type=Physical Layer, id=0018(Receiver ID)
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:03.0: device [8086:2f08] error status/mask=00000001/00002000
Jan 30 23:13:19 Skynet kernel: pcieport 0000:00:03.0: [ 0] Receiver Error (First)

 

Any feedback would be appreciated!

Link to comment

Faced similar issue with my 550ti.

First you should use the rom for the gpu in the xml.

I tried to dump it based on the written/video guides. Failed, because of the card probably being too old. So had to use the rom from techpowerup - make sure you get the right part number...

 

1060 was fine to dumo the bios, so issue due to 550ti

 

Secondly, i assume it's in second slot, from the id. Keep it there, mine didnt worked in first slot, even after using the rom file.

 

Third, even with rom tag in xml, my card is not displaying text mode,  but only graphics mode. So what i do now is make all installations and config of the vm with 1060, then change vm settings to 550ti once all os working properly. The vm does not display a thing till the login screen, where it switches to graphic mode

 

Due to this, most os' cannot be installed directly with 550ti. I think only ubuntu gnome 16.04 was ok to install directly with 550ti. But i tried so many, that i'm not 100% sure...

 

Bottom line - old card, more tinkering, more trouble...

 

Hope this helps you overcome your issue :)

-d

Link to comment

Faced similar issue with my 550ti.

First you should use the rom for the gpu in the xml.

I tried to dump it based on the written/video guides. Failed, because of the card probably being too old. So had to use the rom from techpowerup - make sure you get the right part number...

 

1060 was fine to dumo the bios, so issue due to 550ti

 

Secondly, i assume it's in second slot, from the id. Keep it there, mine didnt worked in first slot, even after using the rom file.

 

Third, even with rom tag in xml, my card is not displaying text mode,  but only graphics mode. So what i do now is make all installations and config of the vm with 1060, then change vm settings to 550ti once all os working properly. The vm does not display a thing till the login screen, where it switches to graphic mode

 

Due to this, most os' cannot be installed directly with 550ti. I think only ubuntu gnome 16.04 was ok to install directly with 550ti. But i tried so many, that i'm not 100% sure...

 

Bottom line - old card, more tinkering, more trouble...

 

Hope this helps you overcome your issue :)

-d

 

Forgive my ignorance.. what ROM are you referring to? I've taken a look at the GTX580 page (https://www.techpowerup.com/gpudb/270/geforce-gtx-580) and haven't found anything like that.

 

For reference, I'm using the Zotac GTX580 (https://www.newegg.ca/Product/Product.aspx?Item=N82E16814500184)

Link to comment

Faced similar issue with my 550ti.

First you should use the rom for the gpu in the xml.

I tried to dump it based on the written/video guides. Failed, because of the card probably being too old. So had to use the rom from techpowerup - make sure you get the right part number...

 

1060 was fine to dumo the bios, so issue due to 550ti

 

Secondly, i assume it's in second slot, from the id. Keep it there, mine didnt worked in first slot, even after using the rom file.

 

Third, even with rom tag in xml, my card is not displaying text mode,  but only graphics mode. So what i do now is make all installations and config of the vm with 1060, then change vm settings to 550ti once all os working properly. The vm does not display a thing till the login screen, where it switches to graphic mode

 

Due to this, most os' cannot be installed directly with 550ti. I think only ubuntu gnome 16.04 was ok to install directly with 550ti. But i tried so many, that i'm not 100% sure...

 

Bottom line - old card, more tinkering, more trouble...

 

Hope this helps you overcome your issue :)

-d

 

Forgive my ignorance.. what ROM are you referring to? I've taken a look at the GTX580 page (https://www.techpowerup.com/gpudb/270/geforce-gtx-580) and haven't found anything like that.

 

For reference, I'm using the Zotac GTX580 (https://www.newegg.ca/Product/Product.aspx?Item=N82E16814500184)

Your card has this part number, as i see from the NE link: ZT-50101-10P (assuming your link and information preswnted by NE is corect)

On techpowerup, go to db, vga bios collection. Filter based on your vendor, model.

I see 12 bioses for 580 zotac. And also some of them are for same model like yours but probably various firmware versions - the dates appear different.

One of them could be the solution to your problem. Probably the most recent?

 

But first, check gridrunner's video tutorial on how to attempt to dump the rom yourself. If you manage to do it, you will be better off with that. As i said, my card was very picky and procedure didn't work...

-d

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.