Jump to content

Unraid 6.11 - Having trouble passing through Intel UHD Graphics 630 to a VM on HP 290 G2 MT Server


Demag
Go to solution Solved by ghost82,

Recommended Posts

 

I am trying to passthrough a single GPU to a Windows 10 VM. Hardware details are as follows:-

 

HP 290 G2 MT

16gb RAM

Intel i5-8500 CPU

BIOS Version AMI F40 21/11/2019

Intel UHD Graphics 630 (integrated into CPU) also this is the only GPU

 

After a lot of tinkerly around a managed to get the VM to recognise the GPU when using a RDP connection (before I was get error 43 in device manager for the UHD 630), however I always end up with a black screen on the undraid’s  monitor after starting the VM. I have also tried to play around with the PCIe ACS override setting (Downstream, multi function or both) and tried the combinations with VFIO allow unsafe interrupts set to Yes. Also tried it with “Permit UEFI boot mode” enabled and Disabled.

 

IOMMU Groups can be seen in the attachment

 

XML Config for the VM is as follows:-

 

XML Config for the VM is as follows

<?xml version='1.0' encoding='UTF-8'?>

<domain type='kvm'>

  <name>Windows 10 bbb</name>

  <uuid>620dd81f-3632-636c-488d-75b34ef2beef</uuid>

  <metadata>

    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>

  </metadata>

  <memory unit='KiB'>5767168</memory>

  <currentMemory unit='KiB'>5767168</currentMemory>

  <memoryBacking>

    <nosharepages/>

  </memoryBacking>

  <vcpu placement='static'>2</vcpu>

  <cputune>

    <vcpupin vcpu='0' cpuset='0'/>

    <vcpupin vcpu='1' cpuset='1'/>

  </cputune>

  <os>

    <type arch='x86_64' machine='pc-i440fx-7.1'>hvm</type>

    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>

    <nvram>/etc/libvirt/qemu/nvram/620dd81f-3632-636c-488d-75b34ef2beef_VARS-pure-efi.fd</nvram>

  </os>

  <features>

    <acpi/>

    <apic/>

    <hyperv mode='custom'>

      <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' migratable='on'>

    <topology sockets='1' dies='1' cores='2' threads='1'/>

    <cache mode='passthrough'/>

  </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/Test Win 10/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/virtio-win-0.1.221-1.iso'/>

      <target dev='hdb' bus='ide'/>

      <readonly/>

      <address type='drive' controller='0' bus='0' target='0' unit='1'/>

    </disk>

    <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>

    <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>

    <interface type='bridge'>

      <mac address='52:54:00:87:79:73'/>

      <source bridge='br0'/>

      <model type='virtio-net'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' 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'/>

    <audio id='1' type='none'/>

    <hostdev mode='subsystem' type='pci' managed='yes'>

      <driver name='vfio'/>

      <source>

        <address domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>

      </source>

      <rom file='/mnt/user/domains/Test Win 10/intelgraphis.rom'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>

    </hostdev>

    <hostdev mode='subsystem' type='pci' managed='yes'>

      <driver name='vfio'/>

      <source>

        <address domain='0x0000' bus='0x00' slot='0x1f' function='0x3'/>

      </source>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>

    </hostdev>

    <hostdev mode='subsystem' type='usb' managed='no'>

      <source startupPolicy='optional'>

        <vendor id='0x046d'/>

        <product id='0xc548'/>

      </source>

      <address type='usb' bus='0' port='2'/>

    </hostdev>

    <hostdev mode='subsystem' type='usb' managed='no'>

      <source startupPolicy='optional'>

        <vendor id='0x09eb'/>

        <product id='0x0131'/>

      </source>

      <address type='usb' bus='0' port='3'/>

    </hostdev>

    <memballoon model='none'/>

  </devices>

</domain>

 

LOG file from VM can be seen in the attachment

 

Additionally I tried to download a ROM file for the GPU however I was not able to do this, or even find one on the Internet for this GPU. Tried to download the vbios from GPU-z, Dump vBios Script in unraid, and Space Invador’s method from a putty session:-

 

cd /sys/bus/pci/devices/0000:00:02.0

echo 1 > rom

cat rom > /mnt/user/domains/Test Win 10/intelgraphis.dump

echo 0 > rom

 

At this stage I am a little lost and even wonder if what I am trying to achieve is even possible with this hardware? Any help or pointers on what I can try next would be greatly appreciated?

 

Many thanks

 

Al

 

IOMMU Groups.png

VM Logs.png

Link to comment

Hi

 

Thanks for coming back to me on this, much appreciated. The ROM BIOS i915ovmf.rom did the trick in the end for me. As soon as I add that into the VM config, the monitor came to life straight away. Spent hours trying to solve this one. How did you come by the BIOS? Is this published somewhere or did you manage to dump it. I centrally tried to dump it via various methods but never managed to successfully grab it.

 

Also note that I had:-

 

PCIe ACS override: Disabled

VFIO allow unsafe interrupts: No

 

syslinux config

video=efifb:off

 

Cheers for the great support

 

regards

 

Al

Link to comment
49 minutes ago, Demag said:

Is this published somewhere or did you manage to dump it

nice, it's taken from here:

https://github.com/patmagauran/i915ovmfPkg

 

I don't think it can be easily dumped within a os from the igpu itself, but I think it could be extracted from the motherboard bios file.

Anyway, it seems that the extracted vbios needs some modifications to make it work with ovmf, read the link for more info.

I don't have any igpu, just knew how that works for that igpu 

Edited by ghost82
Link to comment
18 hours ago, Demag said:

The ROM BIOS i915ovmf.rom did the trick in the end for me

The rom I attached in the previous post which worked for you was taken from the release package which was compiled on December 8th 2020.

However, other commits were added after this release, fixing various issues, but the author never attached new release packages.

I compiled the latest master version with included 2022 commits, based on edk2 202011 stable: it was not possible to compile with newer versions of edk2 because they changed several things and compilation fails without modifying the i915ovmf code, but at least it contains i915ovmf new commits which is the most important thing.

You should try this attached vbios and report back if it works.

If it doesn't work simply switch back to the older one.

i915ovmf.rom

Edited by ghost82
Link to comment
  • 2 months later...

Thank you so much for posting that!  For other newbs like me, I uploaded that rom to my vm folder in /user/domains (is this the best spot?), enabled the igpu in the VM settings and linked to the rom, and then, upon logging into the Windows 10 VM, Device Manager showed the iGPU started properly.  I'm not sure if it matters, but I also have the Intel-GPU-TOP plugin installed.

 

I'm also using a GTX 1650 with my docker containers (namely Plex -- yes, I should probably have those swapped, but it is what it is).  I wanted to enable the iGPU in Windows so I could occasionally use it with DVDFab.  We'll see how that goes.

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

×
×
  • Create New...