Skip to content

Fix legacy Intel VA-API driver detection - #11592

Closed
aladh wants to merge 1 commit into
omacom:quattrofrom
aladh:fix/intel-legacy-vaapi-detection
Closed

aladh wants to merge 1 commit into
omacom:quattrofrom
aladh:fix/intel-legacy-vaapi-detection

Conversation

@aladh

@aladh aladh commented Sep 13, 2026 •

Copy link
Copy Markdown

Intel VA-API selection currently keys off product branding: any HD Graphics or Iris name gets the Broadwell+ intel-media-driver, while only GMA reaches the legacy libva-intel-driver. This sends Ivy Bridge HD Graphics to the wrong driver and leaves devices reported by lspci as Haswell-ULT Integrated Graphics Controller without either driver.

Classify known pre-Broadwell generations before the existing modern Intel check. The regression test covers the Haswell MacBook string, Ivy Bridge HD Graphics, Broadwell, an unknown Intel device, and a non-Intel device. Unknown devices retain the existing no-op behavior.

Fixes #7866.
Addresses the Haswell driver-selection problem described in #8388.

Validation:

bash test/shell.d/intel-video-acceleration-test.sh
ok - Haswell uses the legacy Intel VA-API driver
ok - Ivy Bridge HD Graphics uses the legacy Intel VA-API driver
ok - Broadwell uses the current Intel media driver
ok - an unknown Intel GPU keeps the existing no-op behavior
ok - non-Intel graphics installs no Intel media driver

Also passed bash -n for both changed shell files and git diff --check.

@aladh
aladh force-pushed the fix/intel-legacy-vaapi-detection branch from 6d78786 to 5e727e5 Compare September 13, 2026 00:21
@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks @aladh. Reviewed at 5e727e50 by Claude Opus 5.5, with Codex Medium as the second opinion. Nothing was run on a worker, because this one waits on the maintainer: #8514 fixes the same bug more completely. Everything below comes from reading the code and checking it against the real device names.

What this gets right. I ran both versions of the regex over the name /usr/share/hwdata/pci.ids (2026.09.03) gives every Intel GPU ID in the kernel's include/drm/intel/pciids.h. Every device whose driver changes moves in the right direction. Mobile Ivy Bridge (0156, 0166) and Ivy Bridge Xeon (0152, 015a, 016a) go from intel-media-driver to libva-intel-driver. Haswell, Haswell-ULT and Crystal Well (0402, 0406, 0412, 0416, 0a06–0a2e, 0d12–0d26) go from no driver, or the wrong one, to libva-intel-driver. No Broadwell or newer device changes.

What it still misses, at install/hardware/intel/video-acceleration.sh:5:

  • 8086:0162 is called IvyBridge GT2 [HD Graphics 4000], with no space. This is the desktop HD 4000, as in the i5-3570K and i7-3770. ivy\ bridge doesn't match it, so it still falls through to hd graphics and gets intel-media-driver, which is the video-acceleration.sh installs wrong VA-API driver for Intel HD 4000 (Ivy Bridge) #7866 failure on the most common Ivy Bridge desktop part.
  • Sandy Bridge is named 2nd Generation Core Processor Family … and one Haswell part is 4th Generation Core Processor Family …. 2nd gen core and 4th gen core match neither, so those devices still get no driver. Nothing in pci.ids is named sandy bridge or ironlake, so those two alternatives never match anything.
  • Xeon E3 graphics (010a Sandy Bridge, 040a/041a Haswell) still match xe inside xeon and get intel-media-driver. That bug was already there before this change.
  • Codex Medium found one I hadn't, and I confirmed it against the source. On a machine with two Intel GPUs, INTEL_GPU holds both lspci lines and the first branch that matches wins. A Haswell iGPU next to an Arc card (56a5 DG2 [Arc A380]) now gets only libva-intel-driver, and the Arc gets nothing. On quattro the Arc got intel-media-driver and the Haswell got nothing.

Why this waits. #8514 (@atavacron) fixes the same issues by reading the PCI device ID rather than the marketing name. It covers every device above, along with Braswell and older parts, classifies each GPU separately, and adds a migration so existing installs get repaired too. It is already labelled verified. #9824 is a third approach, by device class, aimed at newer unbranded parts. All three rewrite the same conditional, so only one can land. I asked Codex Medium to compare all three without giving it my answer, and it reached the same conclusion: #8514 is the better fix. That is agreement, not proof, since the second reviewer's independence isn't guaranteed. Which one lands is the maintainer's call, so nothing is needed from you for now. If the maintainer prefers the smaller change here, the misses above would need closing first.

@omarchybot

Copy link
Copy Markdown
Collaborator

Thank you for this, @aladh. #8514 fixes the same problem in a way the review judged better, so this is closed in favour of it. If it does not cover your case, please say so there.

Closed at the maintainer's request. The review comment above has the details; it was done by Claude Opus 5.5 with Codex Medium as a second opinion, whose agreement is not independent.

@omarchybot omarchybot closed this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

video-acceleration.sh installs wrong VA-API driver for Intel HD 4000 (Ivy Bridge)

2 participants