Skip to content

VAAPI: bundled libva-intel-media-driver too old for Alder Lake-N/Twin Lake iGPUs (init fails) #10

Description

@jtrotsky

Summary

The VAAPI support added in #9 ships libva-intel-media-driver-23.4.3_1, which
predates Alder Lake-N / Twin Lake iGPU support. On those chips (e.g. Intel N150,
PCI ID 0x46d4) driver init fails and Immich silently falls back to software
transcoding. The current ports version, 26.1.5, works.

Environment

  • Image: ghcr.io/daemonless/immich-server:latest (post-add VAAPI transcoding support via Intel iHD media driver #9)
  • Host: FreeBSD 15.1, Intel N150 (Twin Lake), drm-latest-kmod-6.9.1501000_1,
    GuC/HuC firmware loaded, /dev/dri/renderD128 present and working
    (host vainfo with iHD 26.1.5 initialises fine)

Reproduce

Inside the published image, with the render node passed through and accessible:

$ ffmpeg -init_hw_device vaapi=accel:/dev/dri/renderD128 ...
[AVHWDeviceContext] libva: /usr/local/lib/dri/iHD_drv_video.so init failed
[AVHWDeviceContext] Failed to initialise VAAPI connection: -1 (unknown libva error).
Device creation failed: -5.
$ pkg info -x libva libdrm gmmlib     # inside the image
libva-2.23.0
libva-intel-media-driver-23.4.3_1
libva-utils-2.23.0
libdrm-2.4.131,1
gmmlib-22.5.4

Cause

The base image's pkg repository is FreeBSD quarterly
(pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/quarterly), and quarterly still
carries libva-intel-media-driver 23.4.3_1 (March 2025). The latest branch
has had 26.1.5 since 2026-05-18 (ports commit bumping the version). The 23.x
driver has no Twin Lake / ADL-N PCI IDs, so iHD_drv_video.so refuses the
device.

Verified fix

Rebuilding the image with the current packages from latest
(libva-intel-media-driver-26.1.5, which pulls libva-2.24.0 and
libdrm-2.4.133,1) makes the same host + container do a full non-root VAAPI
encode: 1080p30 H.264 → HEVC via hevc_vaapi at ~90 fps / 3× realtime, and a
214-video Immich production run completed with 0 failures.

Suggested fix

Install the VAAPI stack (libva-intel-media-driver, and implicitly libva,
libdrm, gmmlib) from the latest package set in the runtime stage —
either by switching the relevant pkg install to -r a latest-configured
repo, or by bumping these packages explicitly. Older iGPUs keep working (the
26.x driver retains legacy device support); newer ones start working.

Happy to PR whichever approach fits the build pipeline best.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions