Yet another code 43 (Windows 10)


Recommended Posts

I've been trying to get this to work for more than a month now by reading all the related threads on this forum and on the internet in general. Hopefully you guys will be able to help me out if I provide all the necessary information.

 

- I'm on UnRaid 6.2.4.

- I have been able to create an Ubuntu Mate VM, using the default template and passthough my video card without any issues (OVMF / Q35-2.5).

 

See my next post for full hardware list.

EDIT: Looks like the full hardware list is too big to post here directly. Let me know if you need more info about my hardware.

 

I originally had my main video card in the first slot but I tried swapping it with the GeForce 210 and boot from the 210 instead since I know it was easier to make it work in the past if you would assign a GPU that is not already used.

I have to say it doesn't matter if I try to assign the main video card or the 210, I always get the Code 43 anyway for both these cards,

 

It seems like Nvidia is detecting this is in a VM and preventing me from using the video card.

 

I tried ACS Override ON or OFF (it's currently ON at the moment).

 

I tried adding this in the domain section:

<qemu:commandline>
        <qemu:arg value='-cpu'/>
        <qemu:arg value='host,kvm=off'/>
    </qemu:commandline>
 

 

I tried adding this in the features section:

    <kvm>
      <hidden state='on'/>
    </kvm>
 

 

to hide the VM from NVIDIA, but it doesn't seem to work.

 

I'm using Guacamole (RDP) in order to test if the GPU pass-through is working, so I don't have to set VNC to the Domain (I know it won't work if I set VNC for the VM).

 

I can successfully install the latest NVidia drivers (I'm only installing drivers and PhysX, no Geforce Experience or 3D). At the end it says the installer has finished and it needs to restart the computer to complete the installation. But then once I reboot and check the device manager, under Display Adapters, my video card is listed with the full name with an exclamation mark next to it. If I right click on it and look at the device status, it says "Windows has stopped this device because it has reported problems. (Code 43)".

 

I tried 3 different BIOS, the one I dumped using Mr. Spaceinvader's method. One dumped from GPU-Z, one from Overclockers forums. I put the line like this in the XML:

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

 

My video card has 2 physical BIOS, but the second one isn't working at all anyway (I can't get a video signal when booting normally), so I'm only using the stock one using the dip switch on the video card itself.

 

I'm currently running in a Windows 10 Pro VM without it being registered yet (since I'm testing first to see if it works). Are you guys aware of an issue with GPU pass-through if the Windows license is not registered ?

 

I tried any combination of Seabios / OVMF / i440 / Q35 (I have a few different VMs for testing this now, that I created from scratch).

 

I tried deleting the libvirt.img and let UnRaid recreate it.

 

Please let me know what else I can try as I am running out of options here.

 

Thanks !

Edited by Ti133700N
Link to comment

I guess I could also include one of the XML I'm testing with:

<domain type='kvm' id='12' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>Gaming5</name>
  <uuid>1569af02-c0a5-05fd-206c-59ba443c1fda</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>10485760</memory>
  <currentMemory unit='KiB'>10485760</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>12</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
    <vcpupin vcpu='2' cpuset='2'/>
    <vcpupin vcpu='3' cpuset='3'/>
    <vcpupin vcpu='4' cpuset='4'/>
    <vcpupin vcpu='5' cpuset='5'/>
    <vcpupin vcpu='6' cpuset='6'/>
    <vcpupin vcpu='7' cpuset='7'/>
    <vcpupin vcpu='8' cpuset='8'/>
    <vcpupin vcpu='9' cpuset='9'/>
    <vcpupin vcpu='10' cpuset='10'/>
    <vcpupin vcpu='11' cpuset='11'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <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/1569af02-c0a5-05fd-206c-59ba443c1fda_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <kvm>
      <hidden state='on'/>
    </kvm>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='6' threads='2'/>
  </cpu>
  <clock offset='localtime'>
    <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='qcow2' cache='writeback'/>
      <source file='/mnt/user/domains/Gaming5/vdisk1.img'/>
      <backingStore/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <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'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:b0:77:dd'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/0'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/0'>
      <source path='/dev/pts/0'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-Gaming5/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/>
      <alias name='channel0'/>
      <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='0x06' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <rom file='/mnt/user/roms/GK110Stock.rom'/>
      <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>
      <alias name='hostdev1'/>
      <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='0x00' slot='0x1b' function='0x0'/>
      </source>
      <alias name='hostdev2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc07d'/>
        <address bus='3' device='5'/>
      </source>
      <alias name='hostdev3'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x1532'/>
        <product id='0x011a'/>
        <address bus='3' device='4'/>
      </source>
      <alias name='hostdev4'/>
    </hostdev>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </memballoon>
  </devices>
</domain>

Link to comment

You could try to see if setting bar=on works.

 

<rom bar='on' file='/etc/fake/boot.bin'/>

 

You don't have to use rdp to check if pass through is working. You only check if you get a post screen on the monitor.

 

The card that is not working is the card that unraid console is grabbing, right? There is no guaranty this will work even when specifying the rom file.

I don't know how the ROM is dumped using Mr. Spaceinvader's method. The one I know have been working for many is this one by hupster.

 

Link to comment

I tried adding bar='on' and use

<rom bar='on' file='/mnt/user/roms/GK110Stock.rom'/>

 

It doesn't seem to change anything. I still get the Code 43.

 

Here is the VM log:

2016-11-26 23:24:35.848+0000: starting up libvirt version: 1.3.1, qemu version: 2.5.1, hostname: LimeHive
LC_ALL=C PATH=/bin:/sbin:/usr/bin:/usr/sbin HOME=/ QEMU_AUDIO_DRV=none /usr/local/sbin/qemu -name Gaming5 -S -machine pc-i440fx-2.5,accel=kvm,usb=off,mem-merge=off -cpu host,kvm=off -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/1569af02-c0a5-05fd-206c-59ba443c1fda_VARS-pure-efi.fd,if=pflash,format=raw,unit=1 -m 10240 -realtime mlock=on -smp 12,sockets=1,cores=6,threads=2 -uuid 1569af02-c0a5-05fd-206c-59ba443c1fda -nographic -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-Gaming5/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -boot strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x7.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x7 -device ich9-usb-uhci2,masterbus=usb.0,firbus=pci.0,addr=0x8 -device usb-host,hostbus=3,hostaddr=5,id=hostdev3 -device usb-host,hostbus=3,hostaddr=4,id=hostdev4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x9 -msg timestamp=on
Domain id=13 is tainted: high-privileges
Domain id=13 is tainted: host-cpu
char device redirected to /dev/pts/0 (label charserial0)

 

That's wierd though, I remember seeing prior logs with the rom argument, now I don't see it anymore, is it normal ?

 

Quick question: When you boot a Windows 10 VM, do you immediately get a signal from your monitor and see the BIOS or do you only get the signal once you get to the Windows loading screen ? I ask because with the Ubuntu VM, I only get video signal at the login screen, and since the bootloader takes like 60 seconds, the screen is black for at least 60 seconds which made things difficult to diagnose at first.

 

Both cards (Geforce) are not working, but currently UnRaid is booting from the 210 (top 16x PCI slot), and I'm trying to pass through the 780. But I also tried swapping the cards before, and try to pass though either the 210 or the 780, it doesn't matter I still get Code 43.

 

I'll check out hupster's method but I think it's the same as Mr. Spaceinvader AKA gridrunner.

 

Thanks a lot for your help !

 

Link to comment

I tried adding bar='on' and use

<rom bar='on' file='/mnt/user/roms/GK110Stock.rom'/>

 

It doesn't seem to change anything. I still get the Code 43.

 

Here is the VM log:

2016-11-26 23:24:35.848+0000: starting up libvirt version: 1.3.1, qemu version: 2.5.1, hostname: LimeHive
LC_ALL=C PATH=/bin:/sbin:/usr/bin:/usr/sbin HOME=/ QEMU_AUDIO_DRV=none /usr/local/sbin/qemu -name Gaming5 -S -machine pc-i440fx-2.5,accel=kvm,usb=off,mem-merge=off -cpu host,kvm=off -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/1569af02-c0a5-05fd-206c-59ba443c1fda_VARS-pure-efi.fd,if=pflash,format=raw,unit=1 -m 10240 -realtime mlock=on -smp 12,sockets=1,cores=6,threads=2 -uuid 1569af02-c0a5-05fd-206c-59ba443c1fda -nographic -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-Gaming5/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -boot strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x7.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x7 -device ich9-usb-uhci2,masterbus=usb.0,firbus=pci.0,addr=0x8 -device usb-host,hostbus=3,hostaddr=5,id=hostdev3 -device usb-host,hostbus=3,hostaddr=4,id=hostdev4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x9 -msg timestamp=on
Domain id=13 is tainted: high-privileges
Domain id=13 is tainted: host-cpu
char device redirected to /dev/pts/0 (label charserial0)

 

That's wierd though, I remember seeing prior logs with the rom argument, now I don't see it anymore, is it normal ?

 

Quick question: When you boot a Windows 10 VM, do you immediately get a signal from your monitor and see the BIOS or do you only get the signal once you get to the Windows loading screen ? I ask because with the Ubuntu VM, I only get video signal at the login screen, and since the bootloader takes like 60 seconds, the screen is black for at least 60 seconds which made things difficult to diagnose at first.

 

Both cards (Geforce) are not working, but currently UnRaid is booting from the 210 (top 16x PCI slot), and I'm trying to pass through the 780. But I also tried swapping the cards before, and try to pass though either the 210 or the 780, it doesn't matter I still get Code 43.

 

I'll check out hupster's method but I think it's the same as Mr. Spaceinvader AKA gridrunner.

 

Thanks a lot for your help !

 

Not sure why you don't see the ROM option in the log, but did you edit the VM after adding the ROM tag in XML edit?

 

Normally there should be a signal as soon as the VM starts from my experience, but others might have other experiences.

 

Have you tried dumping the ROM in both switch positions?

The card was not in the first pcie slot and not grabbed by the unraid console.

 

I only know gridrunner by his name here. He most likely used the same method as hupster.

Link to comment

I'm not editing the VM using the UI after I make modifications in the XML as I know it will erase the custom edits. That being said I just tried doing exactly that (using the UI to re-set the values) and then custom edited the XML to add the rom line afterwards. Still, I'm not seeing the rom option in the logs. Do you think it's an issue I should look into, as in, it's not taking into account the rom option at all ?

 

Yea I tried dumping the rom anyway with the switch in the other possition. The rom files are identical in size as far as I can tell.

 

I did flash one of my GPU BIOS a while ago, it was working back then but it stopped working a few months ago and it looks like the video card is not working at all if I set it to that position (2) as I'm not even getting a video signal when booting / POST. So that's why I'm mainly testing with position 1 as I'm thinking this should be stock BIOS and easier to work with ?

 

Edited by Ti133700N
Link to comment

I went back to the BIOS and saw that with my latest GPU testing positions, the main video card was is the "wrong" slot, where it was only 1X effective, so that probably didn't help. I went ahead and simply removed the 210, and put the main video card back in the first x16 slot. I booted and visually confirmed that UnRaid is booting from that video card. I also disabled ACS Override.

 

Since I'm still not seeing any mention of the rom in the logs, is there a command I can directly run on the server so that I could test various custom settings and possibly make it work that way ? Would it be easier to diagnose ?

 

Thanks.

Edited by Ti133700N
Link to comment

Thanks for the suggestion. Based on that I guess there might be something I don't understand though. As I mentioned, I'm using RDP to quickly be able to confirm that Windows boots and then I can go in Devices Manager and see the Code 43. I'm now doing this because when I was checking directly for the video input while trying to make the Ubuntu VM work, I was mislead since it was taking more than a minute to get the video signal (I messed with that for a week, recreating VMs, trying different settings because I thought it was not working even though it was), so I thought when diagnosing Windows, it would be more reliable to check the presence of Code 43. So do you think that even if there is a Code 43, the driver could still be working fine and I could get a video signal ? So I should try all the display output anyway to confirm ? My understanding was that if there is a Code 43, that meant the NVIDIA driver can't be used at all.

Link to comment

I spent the day again trying to figure out what's wrong. Instead of trying to make the main video card to work, I tried with the 210. I get the exact same Code 43 error no matter what I do.

I was wondering, before dumping the BIOS, when the video card is installed in the secondary PCI-E slot, should it be already working when you assign it to a VM and boot the VM (so no Code 43) or is it only supposed to work once you have dumped the BIOS for that secondary graphics card too ?

I find it odd that people got their GPU pass through to work one way or another by simply swapping the video cards in different slots and use the UI (and most also got it to work using the rom dump method), while I can't get any of my 2 video cards to work at all (for Windows VMs). Is there something I am blatantly missing, any command I could run that would tell me I can't pass through GPU at all ? Could it be a mobo BIOS config ?

Thanks.

Edited by Ti133700N
Link to comment

I finally got it working using only the UI !

I tried putting my main video card in another PCI-E slot and use the 210 in the primary slot. I set the VM to use i440fx / OVMF and pass through the main video card and corresponding sound and that worked without the need for a rom. Out of curiosity, I tried the method to dump the rom and to my surprise, the file size is different than any other BIOS I had tried / dumped before. Even when the main video card was in another slot and discoverable, the dumped BIOS was different than the current working one (wierd huh ?). I haven't tried actually using it yet since I haven't moved back the main video card to the primary slot and it's working without any custom edits, but I'm hoping it will also work using that new BIOS.

Also note that when I start the VM, I immediately see the BIOS and Windows loading, contrary to when I boot Ubuntu where I only see the VGA output once the login screen appears.

I hope this will also help someone else, basically I would say you have to try one video card in the primary slot and then try the other video card in all the other slots one by one until it works...

Thanks !

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