Intel iGPU passthough
-
@olivierlambert I'm not sure as it not like a discrete GPU in a dedicated PCIe slot as it's integrated into the CPU. The model I'm testing in particular is an Intel 12400.
This is the lspci output
It looks like there is a VGA there. Should I try this guide? https://docs.xcp-ng.org/compute/
-
You could try to pass it through and see the result
-
@olivierlambert I tried but getting this error when turning on the VM
INTERNAL_ERROR(xenopsd internal error: (Failure
"Error from xenguesthelper: Populate on Demand and PCI Passthrough are mutually exclusive"))Not sure what it means
EDIT: after googleing it seems that static and dynamic memory has to be the same:
-
@bullerwins Update. The VM recognized the intel GPU:
intel_gpu_top
lspci -k | grep -EA2 'VGA|3D'
I will test with Plex Encoding
-
That's a good sign, please let us know!
-
I got it working!
Pic while transcoding with plex
Plex info:
Detected:
For future reference if anyone finds this with google:
I had to " sudo chmod -R 777 /dev/dri" inside the Ubuntu VM, otherwise it didnt work.
I'm using binhex plex docker image, I have to add the device to the container. It's really easy with portainer:
The "/dev/dri/" part is the important
PS: @olivierlambert there is a typo in the xcp docs, a space is missing in Step 5:
https://docs.xcp-ng.org/compute/#5-put-this-pci-device-into-your-vm
This copy/pastes as:
xe vm-param-set other-config:pci=0/0000:04:01.0uuid=<vm uuid>It should be:
xe vm-param-set other-config:pci=0/0000:04:01.0 uuid=<vm uuid> -
Wow, great news! Happy to see you have now a working setup!!
Fixing the doc now
-
Doc is now fixed
-
Could you please tell us what your motherboard is called? Last time I tried, my motherboard didn't support it, though it was Intel. Also I assume such a thing is not possible on Intel Xeon chipsets like Intel C242 chipset?
-
@adriangabura Gigabyte B760M Gaming X / DDR4 / MicroATX
-
Hello All,
Coming from ESXi 8 where I was doing this for a long time but for some reason I can't get it to work on XCP-NG 8.2.1 and 8.3 on my NUC11 and NUC13.
I can see the device in the VM when I do lspci, Plex also recognizes it.
The (hw) sign comes up but nothing happens after that.
Tried different OS's Ubuntu/Talos nothing seems to make it work then that its detected.Are there some kernel arguments I need to pass in Grub for this to make it work?
Really hate to switch to something else as I'm really like the setup and how everything works out the box, but this is a show stopper for my use case.Hope someone can give me a hint here.
-
@xerxist are you using Plex in docker or native install?
-
Tried docker/kubernetes Manjaro(just to switch to a later kernel)
Changed it to run as root.
Changed the permissions on the /dev/dri to 777.
Its just weird as it clearly sees the device.Actually got it to repond with FFMPEG
It gives an error and the GPU stays like that so it hangs, which is what happens to Plex too I guess.
-
@bullerwins Why would the driver have to be world writable (permissions 777) which seems like a security risk unless the /dev directory itself isn't. But still, a writable driver area seems very strange.
-
It was to rule out any permission problems.
But it seems more on the iommu side of things where it goes wrong.
I’ve just tried the same on proxmox and it works right away. (Well not right away, like you need to do some grub adjustments and load modules) Not sure what I can do to fix it. Does the xcp ng kernel take these iommu grub settings too?GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt"
and these modules
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd -
@xerxist I honestly do not know, but it seems it cannot hurt to try.
-
Giving this another try
I couldn't find those modules so this is probably not something in xcp-ng.
Is your vm running in EFI or BIOS?
-
Got it working !!!!!
Changed the VM from UEFI to BIOS and it started working.
Still though why would it need it be BIOS instead of UEFI
Need to do some more testing as I also disabled something in the BIOS of the NUC11 for ASPM to so I'll bring up another VM with UEFI and test it again.
-
@xerxist Good news! Some boot mechanisms will work one way or the other, or in some cases, even either one of them.
It's also important to keep the BIOS up-to-date. -
Strange it works on UEFI too now.
Only thing that changed is "ASPM off" in the BIOS of the NUC.
Need to try that too on the NUC 13.