Troubleshooting iGPU passthrough on Incus to Ubuntu guest

I’m trying to do GPU pass through on a NixOS 25.11 host running Incus and guest running ubuntu 24.04. I’m trying to pass the Intel Core Ultra 5 225 CPU’s (on a Asus B860-i mobo) integrated GPU but screen goes black when guest boots. I launch my system with kernelParams =intel_iommu=on iommu=pt vfio.ids=8086:7d67and kernelModules = vfio vfio_pci vfio_iommu_type1 i915

On host:

user@host:~#  lspci -nnk -d 8086:7d67
00:02.0 VGA compatible controller [0300]: Intel Corporation Arrow Lake-S [Intel Graphics] [8086:7d67] (rev 06)
        DeviceName: Onboard IGD
        Subsystem: ASUSTeK Computer Inc. Device [1043:88ef]
        Kernel driver in use: vfio-pci
        Kernel modules: i915, xe

On guest:

root@test2:~# lspci -nnk -d 1af4:1050
04:00.0 VGA compatible controller [0300]: Red Hat, Inc. Virtio 1.0 GPU [1af4:1050] (rev 01)
        Subsystem: Red Hat, Inc. Virtio 1.0 GPU [1af4:1100]
        Kernel driver in use: virtio-pci
root@test2:~# lspci -nnk -d 8086:7d67
06:00.0 VGA compatible controller [0300]: Intel Corporation Arrow Lake-U [Intel Graphics] [8086:7d67] (rev 06)
        Subsystem: ASUSTeK Computer Inc. Device [1043:88ef]
        Kernel driver in use: i915
        Kernel modules: i915, xe

Furthermore, the guest seems to fail on loading the driver:

root@test2:~# vainfo
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
error: can't connect to X server!
libva info: VA-API version 1.23.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/virtio_gpu_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva error: /usr/lib/x86_64-linux-gnu/dri/virtio_gpu_drv_video.so init failed
libva info: va_openDriver() returns 2
vaInitialize failed with error code 2 (resource allocation failed),exit

root@test2:~# ls /usr/lib/x86_64-linux-gnu/dri | grep -iE 'virtio|virgl|i915'
i915_dri.so
virtio_gpu_dri.so
virtio_gpu_drv_video.so
root@test2:~#

Anyone see anything fishy? Personally I find it odd I have 2 gpu’s on the guest?

In my case, when doing GPU passthrough on incus, I used a container instance.

With a multi-GPU setup (AMD & Nvidia), implementing a kernel blacklist was necessary to get it working.

1 Like

I only have one graphics controller - the iGPU one. Or do you mean it’s important to blacklist that too on bootup?

You’ll also very likely need to manually install the firmware package for your GPU.

If you only have a single GPU and want to use GPU passthrough, I recommended using a container instance instead.

I tinkered some tonight. And for the first time in weeks I finally got display working. It was either

  • blacklisting both graphics drivers in kernelParams (of host):
 module_blacklist=i915
 module_blacklist=xe

Thanks a bunch!

​…now I seem to have a new problem to hammer on. Mouse and keyboard is not working but I figured that’s also passthrough affair.

After some testing today, it’s clear i DON’T need the blacklisting xe/i915 drivers above. So so the romfile is enough: I managed to make that work with

  raw.qemu.conf: |-
    [device "dev-incus_gpu-1"]
    romfile = "/usr/share/kvm/idg.rom"
1 Like