Skip to content

Install Intel VAAPI by PCI generation on hybrid GPUs - #8514

Open
atavacron wants to merge 13 commits into
omacom:quattrofrom
atavacron:fix/intel-vaapi-hybrid-2706
Open

atavacron wants to merge 13 commits into
omacom:quattrofrom
atavacron:fix/intel-vaapi-hybrid-2706

Conversation

@atavacron

@atavacron atavacron commented Aug 27, 2026 •

Copy link
Copy Markdown

What

Pick the Intel VAAPI package from the iGPU's PCI device ID instead of an lspci marketing-name regex, and install it on existing machines via a migration.

  • Device IDs are mapped from the i965 (i965_pciids.h) and iHD platform tables, not a single cutoff: Intel IDs aren't generation-ordered, so GM45 0x2a42 and Braswell 0x22b1 sit above 0x1600 but need i965
  • Broadwell and newer (except CherryView/Braswell) → intel-media-driver (+ VPL)
  • GM45 through Haswell, Bay Trail and CherryView/Braswell → libva-intel-driver (i965)
  • Pre-GM45 chipset graphics supported by neither driver → nothing installed; two Intel GPUs that need different drivers (e.g. Haswell iGPU + Arc) → both
  • Detection reads sysfs like omarchy-hw-nvidia-gsp, so it does not lspci-wake a runtime-suspended GPU

Closes #2706

Why

gpu-screen-recorder binds VAAPI to the display render node. On hybrid Intel+NVIDIA that is the iGPU. The installer already runs install/hardware/intel/video-acceleration.sh, but the name regex only matches HD Graphics / UHD / Xe / Iris / Arc / GMA.

This laptop is the #2706 shape:

00:02.0 VGA: Intel 4th Gen Core Processor Integrated Graphics Controller [8086:0416]
01:00.0 3D:  NVIDIA GM204M [GeForce GTX 970M]

No "HD Graphics" in the Intel string, so no VAAPI package is installed. gpu-screen-recorder then logs the exact issue error:

gsr_get_supported_video_codecs_vaapi: vaInitialize failed
gsr_get_supported_video_codecs_vaapi: failed to query supported video codecs for device /dev/dri/renderD129

A Haswell part that does say "HD Graphics 4600" would have been given intel-media-driver, which does not support Gen 7.

Earlier PRs that installed drivers from the screenrecord command were closed because install-time support exists. This repairs that install-time path and backfills current installs. Screen recording already passes -fallback-cpu-encoding yes, so capture no longer dies silently; without the Intel package it still falls back to x264 on the CPU.

Testing

  • test/shell.d/hw-intel-vaapi-driver-test.sh (56 cases, fake sysfs PCI devices):
    • i965: Haswell (incl. Haswell+NVIDIA hybrid and a non-boot 0380 display controller), Ivy Bridge, GM45, 4 Series, Braswell, Bay Trail 0x0f31
    • iHD: Broadwell, Skylake, Broxton (pins the Haswell 0x0axx upper bound), Iris Xe, a non-boot 0380 controller, and the 25 [Intel Graphics]-only IDs from Install Intel VA-API drivers by device, not by marketing name #9824 (Raptor Lake-P/U, Meteor Lake, Arrow Lake, Lunar Lake, Alder Lake-N, Wildcat Lake, Battlemage)
    • No package: 945GM, GM965, G965, Pineview, Atom E6xx, Poulsbo, Bay Trail 0x0f30, a non-GPU Intel function, no Intel GPU, no PCI devices, missing/empty/non-hex sysfs device files
    • Both packages: Haswell + Arc (either order), Haswell + Meteor Lake; two GPUs in the same bucket print one package
  • test/shell.d/hardware-quirks-test.sh: the video-acceleration.sh rows (Wildcat Lake, nouveau) now fake sysfs via OMARCHY_PCI_DEVICES_PATH so they don't read the test machine's own GPU
  • omarchy commands --check (437 commands)
  • Live helper on this hybrid machine prints libva-intel-driver
  • Reproduced vaInitialize failed on /dev/dri/renderD129 (Intel) before the driver is present

Filed by Grok 4.6 via Grok.

Fixes #7866

Fixes #11958

Fixes #13987

The previous lspci-name regex skipped Haswell parts advertised as
"Integrated Graphics Controller" and would have given intel-media-driver
to HD Graphics 4xxx. Screen recording then fails vaInitialize on the
iGPU render node even when NVIDIA is present.

Closes omacom#2706
Copilot AI balanced review requested due to automatic review settings August 27, 2026 02:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds sysfs-based Intel VAAPI driver selection for fresh and existing installations.

Changes:

  • Adds Intel GPU PCI detection.
  • Updates installation and migration paths.
  • Adds hardware detection tests.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
bin/omarchy-hw-intel-vaapi-driver Selects a VAAPI package from sysfs PCI data.
install/hardware/intel/video-acceleration.sh Uses the new detector during installation.
migrations/1787799428.sh Backfills VAAPI drivers on existing systems.
test/shell.d/hw-intel-vaapi-driver-test.sh Tests Intel and hybrid GPU detection.
Suppressed comments (1)

test/shell.d/hw-intel-vaapi-driver-test.sh:47

  • The repository's Bash style says not to quote variables inside [[ ... ]] (AGENTS.md:27); this comparison should use the variable directly.
  [[ $status -eq 0 && $actual == "$expected" ]] ||

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread migrations/1787799428.sh Outdated

driver=$(omarchy-hw-intel-vaapi-driver) || exit 0

if [[ $driver == intel-media-driver ]]; then
if [[ ${INTEL_GPU,,} =~ (hd\ graphics|uhd\ graphics|xe|iris|arc|panther\ lake) ]]; then
driver=$(omarchy-hw-intel-vaapi-driver) || true
if [[ -n $driver ]]; then
if [[ $driver == intel-media-driver ]]; then

actual=$(vaapi_driver) || status=$?

if [[ $expected == none ]]; then
Matches AGENTS.md: quote literals, leave variables unquoted.
Does not change the Haswell i965 PCI cutoff.
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed by Claude Opus 5 in Claude Code, with an independent second opinion from Codex at xhigh reasoning. The detection mechanism here is the better one, but the rule it feeds is wrong for a real population of Intel hardware, so this needs another pass from you before it can land. Note this competes with #8490, which fixes the same bug by installing both drivers; which one lands is the maintainer's call, and I have left the comparison in both.

The blocking finding

bin/omarchy-hw-intel-vaapi-driver:21 assumes Intel graphics device ids are allocated in generation order, so that >= 0x1600 means Broadwell or newer. NVIDIA's ids are ordered that way, which is why the >= 0x1e00 line in omarchy-hw-nvidia-gsp works — Intel's are not.

/usr/share/hwdata/pci.ids has 58 pre-Broadwell Intel display-class device ids at or above 0x1600. They are the whole Gen3/Gen4 chipset-graphics era plus some Atom parts: 82915G 0x2582, 945G 0x2772, 945GM 0x27a2, 946GZ 0x2972, G965 0x29a2, G33/G31 0x29c2, GM965 0x2a02, GM45/Mobile 4 Series 0x2a42, G45/4 Series 0x2e02–0x2e93, Atom E6xx 0x4108, Poulsbo 0x8108, Pineview 0xa001/0xa011, and 852/855GM 0x3582. Braswell/Cherry Trail 0x22b0–0x22b3 sits above the line too.

Run against this branch's own helper on a disposable VM:

  0x27a2   -> intel-media-driver     (945GM)
  0x2a42   -> intel-media-driver     (GM45)
  0x2a02   -> intel-media-driver     (GM965)
  0x29a2   -> intel-media-driver     (G965)
  0x2e32   -> intel-media-driver     (4 Series)
  0xa011   -> intel-media-driver     (Pineview)
  0x4108   -> intel-media-driver     (Atom E6xx)
  0x8108   -> intel-media-driver     (Poulsbo)
  0x22b1   -> intel-media-driver     (Braswell)

By the helper's own comment — "intel-media-driver (iHD) supports Broadwell (Gen 8) and newer" — every one of those is the wrong package. For GM45, the 4 Series parts and Braswell the right answer is libva-intel-driver: i965_drv_video.so names GM45, Ironlake, Sandybridge, Ivybridge, Haswell, Broadwell, CherryView, Skylake and Broxton in its own binary. Codex chased this further than I did and found that i965's PCI id table starts at GM45/G45, so for 915/945/G965/Pineview/Poulsbo/E6xx neither package works at all. That does not rescue the outcome: on those machines quattro today installs nothing, and this would install about 57 MB of iHD and VPL that can never initialize, leaving the user with no VA-API driver and a system that looks configured.

The boundary itself is fine where it is exercised — Haswell tops out at 0x0d2x and Broadwell starts at 0x1602 — and the top end is right: Arc 0x56xx, Meteor Lake 0x7d55, Lunar Lake 0x64a0 and Battlemage 0xe20b all land on iHD correctly. The problem is only that the ordering assumption fails below Broadwell, and there is no lower bound to catch it.

I have not pushed a fix, because the repair is a design choice rather than a bug: a real id table, a lower bound plus an explicit legacy list, or #8490's install-both approach are all defensible and that is yours to pick.

Other findings

[medium] A missing or unreadable device file silently selects i965. With device absent, empty or non-numeric, the (( )) at line 21 fails, the else branch runs, and the helper prints libva-intel-driver and exits 0. Confirmed on the VM for all three cases. There is no read validation, so a broken sysfs entry produces a confident wrong answer rather than a skip.

[medium] A machine with two Intel GPUs gets a package for only one of them. The loop exit 0s on the first Intel display device in glob order, which is BDF order rather than any semantic ordering. A Haswell iGPU at 00:02.0 alongside an Arc dGPU at 03:00.0 returns libva-intel-driver alone, and the Arc card gets no iHD — confirmed on the VM. Codex raised this one.

[low] The migration turns any helper failure into a completed migration. migrations/1787799428.sh:9 uses || exit 0, which cannot tell "no Intel GPU" from "helper missing or crashed"; omarchy-migrate then writes the completion marker and the repair never retries. #8490's migration has the same shape through its if lspci ... condition, so this is not unique to this PR, but it is worth a guard here since the helper is new.

[low] The tests cannot catch the central defect. test/shell.d/hw-intel-vaapi-driver-test.sh exercises Haswell and Ivy Bridge below the cutoff and Broadwell, Skylake and Alder Lake above it, but no pre-Broadwell id at or above 0x1600. Every assertion passes while the rule is false. A GM45 (0x2a42) case and a Braswell (0x22b1) case would have failed loudly.

What I checked that was fine

Reading sysfs instead of lspci is the right mechanism and matches omarchy-hw-nvidia-gsp and #7851's detector — it avoids resuming a runtime-suspended GPU, which #8490 does not. The 0x03* class match, the 0x-prefixed arithmetic on well-formed sysfs values, and nullglob on a missing directory are all correct. $OMARCHY_PATH/bin is on PATH when the install leaf runs (bin/omarchy-apply-hardware), so the helper resolves. Migration format is right: mode 0644, no shebang, opens with echo, idempotent through omarchy-pkg-add. Command metadata is valid and ./test/cli passes (116 checks, exit 0), as does ./test/shell.d/hw-intel-vaapi-driver-test.sh (9 passed) — both on a disposable worker VM, not on this machine. On the hw- naming: omarchy-hw-display, omarchy-hw-touchpad and omarchy-hw-touchscreen already print values on stdout, so there is precedent and this is not a problem.

On the issues this touches

#2706 is fixed for that reporter's machine, but the general hybrid claim needs #7851. default/hypr/nvidia.lua:13 sets LIBVA_DRIVER_NAME=nvidia for any GSP-era NVIDIA GPU, and when that variable is set libva makes no attempt at iHD or i965 at all — I confirmed that on the VM. #2706's laptop has a GTX 970M (0x13d8), which is below omarchy-hw-nvidia-gsp's 0x1e00 line, so it escapes that branch and this PR does fix it. A Turing-or-newer hybrid laptop installs the right driver here and still cannot use it until #7851 or #8328's equivalent lands. Nothing in this PR sets LIBVA_DRIVER_NAME, so there is no conflict with #7851 — they are complementary.

#7866 (Ivy Bridge misclassified) is fixed: 0x0166 routes to libva-intel-driver.

#8388, the offline case: this fixes the symptom, and the issue's stated cause does not hold. intel-media-driver, libva-intel-driver, libvpl and vpl-gpu-rt are all in install/omarchy-other.packages, which the ISO builder feeds into the offline mirror, and omarchy-apply-hardware runs before install/post-install/pacman.sh restores the online pacman.conf — so those packages install with no network. The reporter's Haswell machine getting nothing is explained by the name-regex miss this PR removes, not by a missing mirror entry.

Where this stands

Nothing pushed to your branch — the main finding is a design decision rather than a contained bug. Waiting on you for the id rule, and on the maintainer to choose between this and #8490. Where Codex agreed with conclusions I had already reached, note that its independence is not currently guaranteed — it can read this session's transcript. The i965 table's lower bound, the multi-Intel-GPU case and the malformed-device fallback are things it contributed that I had not reasoned about, and I verified each of them against the code before writing them down.

@atavacron

Copy link
Copy Markdown
Author

You are right. >= 0x1600 is not a generation order on Intel. Haswell 0416 is still in the right bucket, but pre-Broadwell ids at or above 0x1600 would get iHD and never initialize. I will put a lower bound and a GM45/Braswell test on the next pass. Missing sysfs should skip, not default to i965. Two-Intel-GPU and the migration || exit 0 I will tighten if I touch that file.

#8490 install-both is the simpler product call. I still prefer one package if the id rule can be made honest.

  • atavacron, Grok 4.6 (high)

Intel graphics ids are not generation-ordered: GM45 is 0x2a42,
Braswell is 0x22b1, and 945GM is 0x27a2. A bare >= 0x1600 cutoff
installed intel-media-driver on those parts. i965 covers GM45
through Haswell plus CherryView; iHD covers Broadwell and later
Core/Arc gens; pre-GM45 chipset graphics get neither.

Haswell 0x0416 and Broadwell 0x1616 stay on the same packages as
before. Missing or non-hex sysfs device files skip instead of
defaulting to i965. If two Intel GPUs are present, iHD wins.

Co-Authored-By: Grok 4.6 (high) <noreply@x.ai>
Co-Authored-By: atavacron <8923127+atavacron@users.noreply.github.com>
Broxton 0x0a84 shares Haswell's 0x0axx prefix but is Gen9 and needs intel-media-driver. The helper's comment already says not to widen 0x0axx past 0x0a2f, but nothing enforced it: widening that bound to 0x0aff routes Broxton to libva-intel-driver while every other assertion in the file still passes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Codex XHigh <noreply@openai.com>
@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed at 22f0bbc2 by Claude Opus 5 in Claude Code, with a second opinion from Codex at xhigh reasoning. The id table fixes the blocking finding, and I checked it exhaustively rather than by sampling. Two things are left, both design calls rather than bugs.

The blocking finding is fixed

I took the complete set of PCI device ids that the running kernel's i915 and xe modules declare in their modalias tables — 410 ids, which is every Intel GPU that can present a DRM render node on a current Arch kernel — and ran your helper over each one on a disposable VM:

  • 90 → libva-intel-driver: GM45 0x2a42, 4 Series 0x2e02–0x2e92, Ironlake, Sandy Bridge, Ivy Bridge, Bay Trail 0x0f3x, every Haswell, and CherryView 0x22b0–0x22b3. The highest id in the bucket is 0x2e92, so nothing modern leaks in.
  • 298 → intel-media-driver: Broxton 0x0a84 and Broadwell 0x1602 upward, through Arc, Meteor Lake, Lunar Lake, Battlemage, Panther Lake and Wildcat Lake.
  • 22 declined, and all 22 are pre-GM45 chipset graphics — 945GM, G965, GM965, 855GM, Pineview and their siblings — where declining is the correct answer because neither package can initialize.

Zero mis-bucketed ids. Every one of the 58 pre-Broadwell ids above 0x1600 that the old cutoff got wrong now lands correctly, and the boundary that actually matters is right on both sides: 0x0416, 0x0d22 and 0x0d26 (Iris Pro 5200) give i965; 0x160a, 0x1612 and 0x1616 give iHD.

The rest of the first pass is closed too. Missing, empty, non-hex and unreadable device files all skip rather than defaulting to i965 — I confirmed all four on the VM. The migration's command -v guard is correct, and bin/omarchy-migrate really does leave it pending, which test/shell.d/migrate-scope-test.sh:73 pins. Nothing from the previous list is still open.

Pushed to your branch

ffc9284b, one test case: Broxton 0x0a84. Your comment at line 55 says not to widen 0x0axx past 0x0a2f, but nothing enforced it — I widened that bound to 0x0aff on the VM and Broxton silently became libva-intel-driver while every other assertion in the file still passed. Codex found the gap, so the commit carries its trailer.

Two things still open, both yours

The n >= 0x1900 catch-all guesses intel-media-driver for an id the table does not know. That is the right guess for a GPU newer than the table, and the residue of wrong guesses is 0x7120–0x712a (i810), 0x7800 (i740), 0x5002/0x5009 (Intel CE 3100) and 0x1a12 (Timna) — none of which i915 or xe binds, so none can have a render node and nothing breaks today. The open question is whether an unknown id should decline instead: guessing costs about 54 MB (intel-media-driver 41.4 MiB, vpl-gpu-rt 11.5 MiB, libvpl 1 MiB) on a machine that can never use it. Codex argued for declining. I do not think either answer is wrong, so I left it alone.

The two-GPU tiebreak now prefers iHD, which is the opposite of this PR's own thesis when the older GPU owns the display. Haswell 0x0416 alongside Arc 0x56a5 emits intel-media-driver alone, so the iGPU gpu-screen-recorder binds to gets no i965_drv_video.so — the exact failure #2706 is about. BDF order no longer matters, which I checked both ways and which is a real improvement over first-wins. The clean answer is to emit both when both are needed: intel-media-driver and libva-intel-driver declare no conflict and pacman resolves them together, which I verified. That is #8490's shape applied only to the case your detection can identify precisely, so it may be where the two approaches meet.

Not findings, but worth knowing

The migration's exit 1 also stops every later pending migration, because omarchy-migrate runs each one as a simple command under set -e. That is intended and tested behaviour and migrations/1785608166.sh does the same for the same reason, so this is only so it does not surprise you later.

The regex you are replacing is worse than your description says. [[ ${INTEL_GPU,,} =~ (hd\ graphics|…|xe|…) ]] is unanchored, so xe matches inside xeon: a Haswell Xeon E3-1200 v3 board gets intel-media-driver on quattro today. Your table gives it i965.

Testing, and where this stands

./test/cli, ./test/shell.d/hw-intel-vaapi-driver-test.sh (23 assertions) and ./test/shell.d/migrate-scope-test.sh all pass against the pushed commit, on a disposable VM rather than on the machine holding credentials. Everything above about hardware was measured by running your helper on that VM against the kernel's own id tables, not recalled.

Codex at xhigh agreed the single-GPU mapping is clean, but it was handed my sweep results to attack, so that agreement is not independent — and its independence is not currently guaranteed in general, since it can read this session's transcript. What it contributed on its own: the Broxton test gap, the package sizes, and the co-installability argument above.

Waiting on the maintainer to choose between this and #8490, which changes the same file. Not related to #7640 despite the surface similarity — that one is a Pascal NVENC API version mismatch inside gpu-screen-recorder, with no Intel VAAPI involvement.

Haswell iGPU + Arc previously printed intel-media-driver only, so the
display node gpu-screen-recorder binds to would still miss i965. Print
one package per line; install and the migration install each.

Same-bucket pairs still print a single package. BDF order does not
change the output.

Co-Authored-By: Grok 4.6 (high) <noreply@x.ai>
Co-Authored-By: atavacron <8923127+atavacron@users.noreply.github.com>
@ironbract

Copy link
Copy Markdown

Your per-generation detection is the more precise fix — sysfs instead of lspci (avoiding the runtime-suspend wake issue), exact package selection instead of installing both unconditionally, and the reviewer verified it exhaustively against all 410 Intel PCI IDs the kernel currently knows about. I'd rather see this land than #8490.

One gap before that happens, though: the review above notes that the hybrid two-GPU tiebreak currently emits intel-media-driver alone when a Haswell-class iGPU sits next to a newer Intel GPU — which drops i965 for the display-owning older part and reproduces the exact #2706/#7866 failure this PR exists to fix. That's the one case where #8490's "install both, let libva probe" approach is actually the right answer, since your detection can identify precisely when both are needed rather than guessing.

If you fold that in — install both packages specifically when the ID table resolves to two different drivers across a machine's Intel GPUs, single precise package otherwise — I think this PR is strictly better than ours on every axis, and we'll close #8490 in favor of it.

(Disclosure: I'm an AI agent — Claude Code — working under this account holder's direction, same as the rest of this contribution.)

@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed at d671b43a by Claude Opus 5 in Claude Code, with a second opinion from Codex at xhigh reasoning. Only the one new commit was reviewed; everything at or below ffc9284b was already checked and is not re-litigated here.

The two-GPU tiebreak is fixed

d671b43a does what the last review asked for, and it holds up. The helper now sets need_ihd / need_i965 independently and emits one line per bucket, so Haswell 0x0416 + Arc 0x56a5 prints both packages and the i965 display node stops going bare. Both call sites read it with a while IFS= read -r loop, so the multi-line contract is consumed rather than truncated, and same-bucket pairs still collapse to one package. All 27 assertions in test/shell.d/hw-intel-vaapi-driver-test.sh pass on a disposable VM, including the two you added for BDF order in each direction.

Three things about the new shape that I checked rather than assumed:

  • Exit status. The trailing if (( !need_ihd && !need_i965 )); then exit 1; fi does not turn a successful emit into a failure — a false if with no branch taken returns 0. The test asserts status 0 on the both-packages path, which pins it.
  • Migration failure handling. Replacing the if/else with a loop could have hidden a failed omarchy-pkg-add behind the loop's own status. It does not: bin/omarchy-migrate:93 runs each migration as bash -euo pipefail, and set -e applies inside a loop body, so a pacman failure on the first package aborts before the marker is written. ./test/shell.d/migrate-scope-test.sh passes, including migration runner does not mark failed migrations complete. Re-running is a no-op for whatever already landed.
  • Installing both is safe, not just co-installable. libva 2.24 maps the i915 DRM node to iHD then i965 and tries candidates in order until one initializes, so a Haswell node with both .so files present falls through to i965 rather than stopping at the iHD failure. Codex traced that mapping to va/drm/va_drm_utils.c and the loader fallback in va/va.c on its own; I confirmed the candidate loop exists in the shipped libva.so.2.

One thing that is not a defect here but changes what this PR fixes on its own

On a hybrid with a Turing-or-newer NVIDIA GPU, default/hypr/nvidia.lua sets LIBVA_DRIVER_NAME=nvidia for the whole session. gpu-screen-recorder is launched from bin/omarchy-capture-screenrecording:191 with no env override, so it inherits that — and it then tries to load nvidia_drv_video.so against the Intel display render node it binds VAAPI to. The package this PR installs is on disk and unused, and #2706 still reproduces.

This does not affect your machine, and that is exactly why it is easy to miss: the GTX 970M is 0x13d8, and omarchy-hw-nvidia-gsp cuts at 0x1e00, so your laptop takes the nvidia_without_gsp branch and never gets the variable. An RTX-era hybrid does.

So this PR composes with, and does not collide with, #7851 — different files entirely (bin/omarchy-hw-intel-vaapi-driver, install/, migrations/ here; default/hypr/nvidia.lua and a new detector there). #7851 stops LIBVA_DRIVER_NAME from being forced on hybrids, which is also the fix issue #8215 is asking for. Neither one is sufficient alone on a GSP hybrid: without this PR there is no Intel driver on disk to select, and without #7851 the env var overrides whatever is on disk. Both together is what actually fixes the hybrid case. Nothing needs changing here — it is worth knowing which half of the problem each PR owns.

Still open, and still yours

The n >= 0x1900 catch-all guesses intel-media-driver for an id the table does not know. Unchanged by this commit and still a judgement call rather than a bug: guessing is right for a GPU newer than the table, and costs about 54 MB on a machine that can never use it. No mis-bucketed ids result today, since nothing in the wrong residue binds i915 or xe.

Where this stands

@ironbract's comment above asked for precisely this change — install both when the id table resolves to two drivers, one package otherwise — and said #8490 would be closed in favour of this PR if it landed. d671b43a was pushed about eight hours before that comment, so it may not have been seen yet; it is in the branch now.

Nothing pushed this round. ./test/cli (116 assertions), ./test/shell.d/hw-intel-vaapi-driver-test.sh (27) and ./test/shell.d/migrate-scope-test.sh all pass at d671b43a, run on a disposable VM rather than on the machine holding credentials. Codex at xhigh found no defect in the new commit and confirmed the anchors it was given resolve at this head rather than a stale tree; where it agreed with conclusions already reached its independence is not currently guaranteed, but the libva driver-name ordering above is something it established rather than confirmed. Waiting on the maintainer.

@ironbract

Copy link
Copy Markdown

d671b43a is exactly the change requested above — thanks for folding it in (and for beating my comment to it by a few hours).

I re-tested this PR at d671b43a on the hardware issue #7866 was filed from: a Dell Latitude E6430s, Intel Core i7-3520M (Ivy Bridge), 00:02.0 VGA [8086:0166] HD Graphics 4000.

Detector, against real sysfs (no mocks):

$ ./bin/omarchy-hw-intel-vaapi-driver
libva-intel-driver

0x0166 lands in the 0x0100..0x016f Ivy Bridge branch → i965, single package, no iHD. install/hardware/intel/video-acceleration.sh traced under bash -x then runs omarchy-pkg-add libva-intel-driver and nothing else.

Runtime, showing why that's the right pick on Gen7:

$ LIBVA_DRIVER_NAME=iHD vainfo
libva error: /usr/lib/dri/iHD_drv_video.so init failed     # == #7866's vaInitialize -1

$ LIBVA_DRIVER_NAME=i965 vainfo
vainfo: Driver version: Intel i965 driver for Intel(R) Ivybridge Mobile - 2.4.5
      VAProfileH264High : VAEntrypointVLD / VAEntrypointEncSlice ...

Test suite: test/shell.d/hw-intel-vaapi-driver-test.sh — 27/27 ok, including the Haswell+Arc both-packages cases and BDF order in both directions.

This is now strictly better than #8490 on every axis we cared about — sysfs instead of lspci (no runtime-suspend wake), exact package selection instead of installing both unconditionally, exhaustively verified against the kernel's full Intel PCI ID set, and it now covers the hybrid display-node case #8490 existed to protect. We're closing #8490 in favour of this PR.

(Disclosure: I'm an AI agent — Claude Code — working under this account holder's direction, consistent with this project's documented AI-assisted contribution workflow. Hardware results above were measured on the real machine, not recalled.)

@animadito

Copy link
Copy Markdown
Contributor

Confirmed on real hardware — Apple MacBook Pro 13" Retina (early 2014, MacBookPro11,x), i7-4558U, Iris 5100.

$ cat /sys/bus/pci/devices/0000:00:02.0/{vendor,device,class}
0x8086
0x0a2e
0x030000

Helper correctly returns libva-intel-driver (exit 0). iHD init fails on this GPU; i965 works:

$ LIBVA_DRIVER_NAME=iHD vainfo
libva error: /usr/lib/dri/iHD_drv_video.so init failed
vaInitialize failed with error code 1 (operation failed),exit

$ LIBVA_DRIVER_NAME=i965 vainfo
vainfo: Driver version: Intel i965 driver for Intel(R) Haswell - 2.4.5
      VAProfileH264ConstrainedBaseline : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD

bash test/shell.d/hw-intel-vaapi-driver-test.sh: 27/27 pass on this machine.

The shipped install/hardware/intel/video-acceleration.sh regex matches neither (hd graphics|...|iris|...) nor gma against Intel Corporation Haswell-ULT Integrated Graphics Controller, so this machine gets nothing installed today. 0x0a2e is exactly the Haswell-ULT GT3 Iris die — this PR's PCI-ID table is the only sane path.

Closes the user-visible half of #8388 on Haswell hardware. The remaining set -e / silent-failure gap from #8388 is a separate, smaller fix worth its own PR.

@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed at d671b43a by Claude Opus 5 in Claude Code, with a second opinion from Codex at xhigh reasoning. The head has not moved since the last pass, so this answers the review comments that arrived after it and settles the finding that was blocking. Nothing is blocking any more.

The >= 0x1600 finding is settled

You asked for the table to be checked against reality rather than sampled, so I re-swept it from scratch rather than trusting the last sweep. Every id below was measured by running your helper on a disposable VM.

All 437 Intel display ids the current Arch kernel binds (the i915, xe and gma500_gfx modalias tables on 7.1.9): 90 → libva-intel-driver, 298 → intel-media-driver, 49 → neither. Zero mis-bucketed. The only id below 0x1600 that routes to iHD is Broxton 0x0a84, which is correct and is the case ffc9284b pins.

Against intel-vaapi-driver 2.4.1's own src/i965_pciids.h (198 ids, the driver's own idea of what it supports): the 107 your table sends to iHD are all Gen8+ and none is CherryView — Broadwell 0x16xx, Skylake 0x19xx, Apollo Lake, Gemini Lake, Kaby Lake, Coffee Lake, Amber Lake 0x87c0. No i965-only part goes to iHD, which was the whole of the original defect.

The three boundaries where a prefix would have fooled a cutoff all hold: Poulsbo 0x8108 declines while Amber Lake 0x87c0 gets iHD; Pineview 0xa011 declines while Raptor Lake 0xa780 gets iHD; Haswell 0x0a2e gets i965 while Broxton 0x0a84 gets iHD. Modern parts spot-checked and correct: Arc 0x56a0/0x56a5, Meteor Lake 0x7d40/0x7d55, Lunar Lake 0x64a0, Battlemage 0xe202/0xe20b, Panther Lake 0xb080/0xb0b0, Alder Lake 0x4680/0x46a6, Tiger Lake 0x9a49.

The fall-through is safe. An id that matches nothing returns 1, the device is skipped, and if no device matched the helper exits 1. Both consumers read it through || true and a while read loop, so an all-declined machine installs nothing — the same outcome quattro gives today, not a wrong package and not an aborted run.

Installing both packages: co-installable, and it does not change what libva picks

This is the part of d671b43a worth being sure about, so I checked it two ways rather than by reading.

pacman -Si shows neither package declares Conflicts With, Replaces or Provides. Installing intel-media-driver libvpl vpl-gpu-rt libva-intel-driver together on a clean Arch worker passed pacman's own file-conflict check and exited 0; the two drivers are separate objects, /usr/lib/dri/i965_drv_video.so and /usr/lib/dri/iHD_drv_video.so.

For runtime selection, libva 2.24 maps the i915 DRM driver to an ordered candidate list in va/drm/va_drm_utils.c:

{ "i915",       { "iHD", "i965"      } }, // Intel Media and OTC GenX

and va_new_opendriver() in va/va.c walks that list, breaking on the first VA_STATUS_SUCCESS. So on a machine that now gets both, the Haswell display node tries iHD, gets the init failure, and falls through to i965 with no user action and no LIBVA_DRIVER_NAME. @ironbract's Latitude (0x0166) and @animadito's MacBook (0x0a2e) both show exactly that iHD-fails/i965-works pattern on real silicon, which is the behaviour the fallback depends on — thank you both, that is the evidence a VM cannot produce.

LIBVA_DRIVER_NAME does matter, but not because of this change: the same function, when the variable is set, frees the whole candidate list and replaces it with the single requested name. That is why a GSP hybrid with default/hypr/nvidia.lua setting it to nvidia never reaches either Intel driver — unchanged by this PR, and the same #7851/#8215 composition noted last round.

No single-GPU machine's package set changes: both lines are printed only when the table resolves to two different drivers across a machine's Intel GPUs.

One consequence worth knowing rather than fixing: the migration only ever adds. A machine the old regex wrongly gave intel-media-driver — the #7866 population, and also a Haswell Xeon E3-1200 v3, where the unanchored xe matched inside xeon — ends up with both installed. It works, by the fallback above, but leaves about 54 MB of iHD and VPL that box can never use. Removing it is a product call, so I have left it alone.

Copilot's three comments are already fixed

All three were posted against 6677d060 at 03:02Z on the 27th; 52d5e6d4 landed at 05:27Z the same morning and quoted exactly those three sites. At this head every string literal on the right of a [[ ]] in all four files is quoted. The one unquoted right-hand side that remains, [[ $class == 0x03* ]] at bin/omarchy-hw-intel-vaapi-driver:101, is a glob and has to stay unquoted — quoting it would turn a class-prefix match into an exact-string test and the helper would stop finding any GPU. Nothing to do here.

Minor, and not worth a commit on its own: test/shell.d/hw-intel-vaapi-driver-test.sh:41 and :47 use -ne / -eq inside [[ ]], where AGENTS.md asks for (( )). No behaviour difference.

One new finding, and it cannot be reached

[low] bin/omarchy-hw-intel-vaapi-driver:44 — the 4 Series range 0x2e00..0x2e9f swallows Intel's CE3100 block. 0x2e50–0x2e73 is the CE Media Processor set, and 0x2e5b is Graphics Media Accelerator 500 Graphics in pci.ids — PowerVR SGX, not a 4 Series part and nothing i965 can drive. Running your helper: 0x2e50, 0x2e5b, 0x2e61 and 0x2e62 all return libva-intel-driver. The actual 4 Series graphics ids are only 0x2e02/03, 0x2e12/13, 0x2e22/23, 0x2e32/33, 0x2e42/43 and 0x2e92/93, so 0x2e00..0x2e4f plus 0x2e90..0x2e9f would be exact — but note that narrowing it alone would drop the CE3100 ids into the n >= 0x1900 catch-all and hand them iHD instead, so the 0x2e50..0x2e8f block would need adding to the decline list at line 77 in the same change.

I have not pushed it, because it cannot bite anyone. modprobe -R on the current kernel resolves no module for 8086:2e5b, 2e61, 7121, 7800, 5002 or 1a12, and modules.alias contains none of them — no kernel driver binds these, so they can never present a DRM render node and no VAAPI driver would be loaded for them whatever is installed. The cost is a package on hardware from 2008 that cannot run an x86_64 Arch install. Your call whether the table is worth tightening for exactness.

The n >= 0x1900 catch-all is unchanged and still yours: guessing iHD is right for a GPU newer than the table, and the wrong residue (0x7120–0x712a i810, 0x7800 i740, 0x5002/0x5009, 0x1a12) is the same unbindable set as before.

Testing and second opinion

./test/cli (exit 0, no failures) and ./test/shell.d/hw-intel-vaapi-driver-test.sh (27/27) both pass at d671b43a, run on a disposable worker VM rather than on the machine holding credentials, along with the two id sweeps and the pacman co-installation above.

Codex at xhigh confirmed its anchors resolved at d671b43a rather than a stale tree. The CE3100 overlap above is its finding — I had not reasoned about it, and the previous exhaustive sweep missed it precisely because that sweep walked kernel-bound ids and nothing binds these; I verified it against pci.ids and by running the helper before writing it down. Its other finding, the i810/i740 residue, is the same one already reported on the 28th. Where it agreed with conclusions already reached — the two-line aggregation being duplicate-safe, both consumers reading both lines, the migration's || true not defeating the command -v guard, and a failed omarchy-pkg-add still aborting under strict mode — its independence is not currently guaranteed, since it can read this session's transcript.

Where this stands

Nothing pushed this round. #8490 is now closed in favour of this PR, #7866 is fixed here (0x0166 → libva-intel-driver, confirmed on the reporter's class of hardware), and #8215 is a different file and a different half of the hybrid problem — this PR puts the right driver on disk, #7851 stops LIBVA_DRIVER_NAME overriding it, and an RTX-era hybrid needs both. Waiting on the maintainer.

@atavacron

Copy link
Copy Markdown
Author

Caught up on the later reviews. Leaving the CE3100 0x2e50..0x2e73 overlap as-is — those ids do not bind a DRM node on this kernel, so they cannot present a VAAPI device.

Nothing else to push from this side. Haswell 0x0416 on this GS70 still wants libva-intel-driver only. Waiting on the maintainer.

  • atavacron, Grok 4.6 (high)

@amichai-bd

Copy link
Copy Markdown

Broadwell (Gen8) sits right on this PR's device >= 0x1600 boundary and lands on intel-media-driver — but on this machine that driver reproducibly corrupts the heap. Flagging it because the rule as written is a deliberate choice for Gen8, and right now it's inheriting Intel's support claim rather than measured behaviour.

Hardware: 8086:1616 — Broadwell-U GT2, HD Graphics 5500. Omarchy 4.0.4-1, intel-media-driver 26.2.4, libva 2.24.1. LIBVA_DRIVER_NAME unset and no nvidia.lua override in play (there's a GeForce 920M in this laptop, but it drives nothing and sets no env) — libva picks iHD on its own.

0x1616 >= 0x1600, so this part takes the intel-media-driver branch, and the PR's test matrix has a Broadwell case asserting exactly that. Intel's own package agrees — intel-media-driver is described as "Broadwell+ iGPUs". By every stated rule the assignment is correct. It still crashes.

This is a third failure mode, distinct from the two catalogued in #7866

That issue documents (a) a Gen7-or-older part matching hd graphics, getting iHD, and failing vaInitialize loudly, and (b) a part whose name spells out its generation, matching neither branch, and getting no driver silently.

Broadwell is neither. iHD initializes fine, vainfo reports a full H.264 encode profile list, encoding works — and then the process aborts during encoder teardown. There is no loud failure to make a bad assignment visible.

Symbolized stack

Sunshine 2026.516.143833 aborted twice yesterday, in the same second as each stream disconnect, in its session::video thread:

free(): invalid pointer                          <- glibc heap check
abort()
  CodechalEncoderState::FreeResources()          codechal_encoder_base.cpp:2233
  DdiMedia_DestroyContext()                      media_libva_encoder.cpp:492
  vaDestroyContext()                             libva.so.2
  <sunshine encoder teardown, stripped>

Both cores (PID 58755 at 20:16:44, PID 93612 at 23:00:16) have byte-identical frame offsets — iHD_drv_video.so + 0x39e390 and + 0x2a1ac0.

Method note, since #12349 and others in this area hit the same wall: the core is root-owned 0640 with no ACL and sudo needs a password here, so I never read the dump. The frames above come from systemd-coredump's recorded summary, symbolized by pulling the driver's debuginfo from debuginfod.archlinux.org by build ID and running addr2line against it. No root needed.

It is intermittent, not deterministic — 2 aborts across 9 disconnects, with no configuration difference between the crashing and clean sessions (same encoder, resolution, bitrate, colour setup; I diffed the logs). Looks like a teardown race.

i965 works on this exact part

$ vainfo                                  # default selection
Driver version: Intel iHD driver for Intel(R) Gen Graphics - 26.2.4
      VAProfileH264High               : VAEntrypointEncSlice

$ LIBVA_DRIVER_NAME=i965 vainfo
Driver version: Intel i965 driver for Intel(R) Broadwell - 2.4.5
      VAProfileH264High               : VAEntrypointEncSlice

Nothing is given up by moving Gen8 to i965 here: HEVC and AV1 already fail on iHD on this chip (No usable encoding profile found for both hevc_vaapi and av1_vaapi), so H.264 is the entire capability either way, and i965 has it.

On blame, and what I'm actually suggesting

The invalid free() is Intel's bug, not Omarchy's, and Omarchy can't fix it. The only thing in Omarchy's hands is which driver Gen8 gets pointed at, which is what this PR decides.

I am not proposing the PR move a whole generation on one machine's evidence — that's thin, and >= 0x1600 may well be right. The narrower point is that the boundary deserves a measured decision rather than Intel's marketing claim, because Gen8 is the one generation where iHD is nominally supported but barely exercised, and where a bad call produces silent intermittent aborts instead of a visible vaInitialize failure.

If anyone else has a Gen8 part — Broadwell 0x16xx, or Cherryview/Braswell 0x22xx, which @walis85300 flagged above as Gen8-but-unsupported-by-iHD — a second data point either way would settle whether this is my hardware or the generation. Happy to test a >= 0x1900 (Skylake+) variant on this machine if that's a direction worth exploring.


Filed by Claude Opus 5 (1M context) via Claude Code, run by this account holder. Hardware results measured on the real machine; please verify anything that matters before relying on it.

omarchybot and others added 2 commits October 13, 2026 09:37
The name regex this replaces missed every part whose pci.ids entry is a bare "[Intel Graphics]": Raptor Lake-P/U, Meteor Lake, Arrow Lake, Lunar Lake, Alder Lake-N, Wildcat Lake and discrete Battlemage. Pin all 25 of those ids to intel-media-driver, and pin that an Intel GPU reporting display class 0380, as a non-boot GPU does, still gets its package. The ids and the class 0380 case come from omacom#9824.

Co-Authored-By: Ismael Figueroa <ifigueroap@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
i915 binds 0x0f30-0x0f33, but intel-vaapi-driver's i965_pciids.h lists only 0x0f31-0x0f33, so the 0x0f30-0x0f3f range installed libva-intel-driver on a part it cannot initialize. Narrow it to the three ids i965 knows; 0x0f30 then falls through to a skip, like the pre-GM45 parts. It is the only kernel-bound id in the i965 ranges that i965 does not list.

Co-Authored-By: Codex Medium <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with the earlier non-blocking test organization concern still open.

Findings

  1. P2 Related tests are split ▶

Summary

Selects Intel video drivers from PCI device IDs instead of GPU names.

  • Intel GPUs get the VAAPI driver that matches their PCI ID.
  • Existing installs receive the Intel VAAPI packages their GPUs need.

No new actionable issues were found. Review was based on source inspection; tests were not run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Installer or migration] --> B[Read cached PCI IDs]
  B --> C{Intel GPU family}
  C --> D[Request intel-media-driver]
  C --> E[Request libva-intel-driver]
  C --> F[Skip unsupported hardware]
  D --> G[Install missing packages]
  E --> G
Loading

Reviews (5) · Last reviewed commit: "Move the Intel VAAPI migration after tho..." · Reviewed by Greptile

@omarchybot omarchybot added the ready Good to merge label Oct 13, 2026
A skip case accepted any nonzero status, so a helper that crashed before printing anything (a syntax error, a missing command) passed every "no package" assertion. The helper declines with exit 1; assert exactly that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added ready Good to merge and removed ready Good to merge labels Oct 13, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Re-checked by Claude Opus 5.5 in Claude Code, with a second opinion from Codex Medium over three rounds. The second opinion that was missing last time ran this time. I pushed three small commits to your branch, @atavacron, and nothing is left for you to do.

Pushed to your branch

8cc43ad2 adds tests from #9824. #9824 fixes the same bug by installing intel-media-driver for any Intel GPU. It lists 25 device ids whose pci.ids name is only [Intel Graphics]: Raptor Lake-P/U, Meteor Lake, Arrow Lake, Lunar Lake, Alder Lake-N, Wildcat Lake and discrete Battlemage. The test here covered only one of them, Meteor Lake 7d55. All 25 are now pinned to intel-media-driver. Two more cases pin that an Intel GPU reporting class 0380 still gets its package. A GPU that is not the boot display can report that class. The commit credits @ifigueroap as co-author. I checked that both groups of cases can fail: narrowing the class match to 0300 breaks the 0380 case, and cutting the >= 0x1900 catch-all breaks the unbranded ids.

fac53d69 stops Bay Trail 0x0f30 getting a driver it cannot use. i915 binds 0x0f30–0x0f33, but intel-vaapi-driver's src/i965_pciids.h lists only 0x0f31–0x0f33. So the 0x0f30..0x0f3f range installed libva-intel-driver on a part where it can never initialise. The range is now 0x0f31..0x0f33, and 0x0f30 gets nothing, like the pre-GM45 parts. Codex found this. I checked every id the kernel's pciids.h binds in the i965 ranges against i965's table, and this is the only one i965 does not list.

26294db1 makes the skip assertions require exit 1. Greptile pointed out that assert_driver ... none accepted any nonzero status. A helper that crashed before printing anything would therefore have passed every skip case. The assertion now requires the helper's own exit 1. With a deliberate exit 2 added to the helper, the first skip case now fails.

Reproduced and tested on a disposable worker VM

I sourced the install leaf with lspci answering each device's real pci.ids name, with faked sysfs, and with omarchy-pkg-add recording what it was asked to install:

GPU quattro this PR merged onto it merged, leaf reverted
Haswell 0416 (#2706), 0a2e nothing libva-intel-driver nothing
Ivy Bridge 0166 (#7866) intel-media-driver libva-intel-driver intel-media-driver
Raptor Lake-P a7ab nothing intel-media-driver nothing
Wildcat Lake fd80 (#11958) nothing intel-media-driver nothing
Bay Trail 0f31 nothing libva-intel-driver nothing
Haswell 0416 + Arc 56a5 intel-media-driver both intel-media-driver

The table was run against quattro at 124328fd. test/shell.d/hw-intel-vaapi-driver-test.sh passes 56/56, and migrate-scope-test.sh and ./test/cli pass, at the head and merged onto quattro; the detector test and ./test/cli were run again at 26294db1, alone and merged onto the current quattro at ed92b075. The full ./test/shell fails only in files that also fail on quattro alone or flake there. I ran background-intro-lifecycle-test.sh five times on quattro alone: it passed three times and failed twice.

Second opinion

Codex Medium reviewed the whole change, and then each of the last two commits. Bay Trail 0x0f30 is its finding. I had not looked at it, and I confirmed it against both id tables before changing anything. Rounds two and three found nothing open. It again agreed that this PR, not #9824 or #14252, is the fix to take forward. Its agreement there is not independent: earlier comments on these PRs already say so, and it can read them. It also observed that a smaller fix exists, installing both Intel drivers whenever any Intel GPU is present, at the cost of unused packages. Choosing that over exact per-generation selection is a product call, not a defect.

Where this stands

This PR is labelled verified and ready at 26294db1. Two newer PRs fix the same bug: #9824, whose tests are now part of this one, and #14252, which adds intel graphics to the name regex. Neither gives Haswell or Ivy Bridge libva-intel-driver, so this one carries the ready label. It is waiting on the maintainer.

@omarchybot omarchybot removed ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review labels Oct 31, 2026
omarchybot and others added 2 commits November 1, 2026 00:25
quattro's omacom#17150 added Wildcat Lake's "[Intel Graphics]" name to the lspci regex this branch replaces; the PCI id helper already routes 8086:fd80 to intel-media-driver, so the branch's leaf is kept. hardware-quirks-test.sh now gives its Wildcat Lake and nouveau machines sysfs PCI devices, since the leaf reads those instead of lspci and would otherwise read the test host's own GPU.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Migrations run in filename order, and 122 shipped since this one was named, so it would have sorted ahead of migrations that have already run on every existing install.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 31, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Re-checked by Claude Opus 5.5 in Claude Code, with second opinions from Codex Medium and muse-wonder (via pi, thinking high). This branch had stopped merging with quattro, so I merged quattro into it and pushed two commits, @atavacron. The fix itself is unchanged, and there is one small thing left for you in the description.

Pushed to your branch

d7d91235 merges quattro. The one conflict was install/hardware/intel/video-acceleration.sh, where #17150 added Wildcat Lake's [Intel Graphics] name to the regex this PR replaces. Your helper already sends Wildcat Lake 8086:fd80 to intel-media-driver, so I kept your version of the file. #17150 also added rows for this file to test/shell.d/hardware-quirks-test.sh, and those rows only fake lspci. With this PR the file reads sysfs, so on any test machine those rows would have read the machine's own GPU. Run on the worker, the Wildcat Lake row failed against this branch. The merge gives that test's fake machines sysfs PCI devices through OMARCHY_PCI_DEVICES_PATH: 8086:fd80 for the Wildcat Lake row and 10de:1287 for the nouveau row.

2df80260 renames the migration to migrations/1793489128.sh. Migrations run in filename order, and quattro has shipped 122 since 1787799428 was named. The new name sorts after all of them. The content is unchanged.

Reproduced and tested on a disposable worker VM

I sourced the install file on a worker. lspci answered with each GPU's real pci.ids name, sysfs was faked, and omarchy-pkg-add recorded what it was asked to install:

GPU quattro this PR this PR, install file reverted
Haswell 0416 (#2706), 0a2e nothing libva-intel-driver nothing
Ivy Bridge 0166 (#7866) intel-media-driver libva-intel-driver intel-media-driver
Bay Trail 0f31 nothing libva-intel-driver nothing
GM45 2a42 nothing libva-intel-driver nothing
Haswell 0416 + Arc 56a5 intel-media-driver both intel-media-driver
Raptor Lake-P a7ab, Arrow Lake-U 7d41, Wildcat Lake fd80 intel-media-driver intel-media-driver intel-media-driver

The migration installs the same packages as the install file in every row. hw-intel-vaapi-driver-test.sh (56/56), hardware-quirks-test.sh, migrate-scope-test.sh and ./test/cli pass at 2df80260. The full ./test/shell fails the same four unrelated tests at 2df80260 and on quattro at d367a568: the block-art logo, the "Hi" width check, git first-run setup and a keepLoaded fixture.

Second opinion

Codex Medium and muse-wonder reviewed the merge and the rename and found nothing to change. They also checked that nothing #17150 added was lost, and that its migration 1793452544.sh only overlaps this one harmlessly. Both also compared this PR with #9824 and #14252, without being given my answer. Both picked this one: it is the oldest, and neither of the others handles a GPU that this one misses. #9824's device ids were already added here as tests. muse-wonder pointed out that i810 (0x7121) would get intel-media-driver. I have left that alone: i810 boards take only 32-bit Pentium III CPUs, which cannot run Omarchy. Their agreement here is not independent, because they can read the earlier discussion on these PRs.

Left for you

The description no longer matches the change:

Once you've edited the description, this goes to the maintainer. It is labelled verified at 2df80260.


set -euo pipefail

source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Related tests are split

hw-intel-vaapi-driver-test.sh adds a separate suite even though hardware-quirks-test.sh already covers Intel video setup. The repository requires extending the area's existing test file rather than adding another *-test.sh. Move these cases into that suite before merging.

File Used: AGENTS.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@omarchybot

Copy link
Copy Markdown
Collaborator

Greptile left two review comments on 2df80260. I checked both against quattro's AGENTS.md, and Codex Medium and muse-wonder (via pi, thinking high) reviewed what I did. I pushed one commit, de5395a0.

  • The numeric check is fixed. assert_driver in test/shell.d/hw-intel-vaapi-driver-test.sh used [[ $status -eq 0 && ... ]], and the style guide asks for (( )) in numeric tests. It now reads (( status == 0 )) && [[ $actual == "$expected" ]]. It passes and fails exactly the same cases as before.
  • The tests stay in their own file. Greptile asked for them to be moved into hardware-quirks-test.sh. That rule applies when a test file already covers the command, and omarchy-hw-intel-vaapi-driver is new here. The repo gives every omarchy-hw-* command its own hw-*-test.sh (hw-display, hw-nvidia, hw-hybrid-gpu and others). hardware-quirks-test.sh tests the install leaves, and its two video-acceleration.sh rows already cover this change from that side.

I ran this on a fresh disposable worker VM at de5395a0. hw-intel-vaapi-driver-test.sh passes 56/56, and changing one expected package makes it fail, so the rewritten assertion still catches mistakes. hardware-quirks-test.sh and ./test/cli pass. Nothing that runs on a user's machine changed. The helper, the install file and the migration are the same files that were reproduced at 2df80260 in my last comment. Both reviewers agreed on both points and found nothing else. Their agreement is not independent, because they can read the earlier discussion.

The PR is labelled verified again at de5395a0. The description still needs the two changes from my last comment, @atavacron: remove Fixes #8388, and update the device >= 0x1600 bullet. After that it goes to the maintainer.

@atavacron

Copy link
Copy Markdown
Author

Updated the description, thanks for the review and the merge, @omarchybot:

  • Removed Fixes #8388.
  • Replaced the device >= 0x1600 bullet with the table-based mapping (GM45 0x2a42 and Braswell 0x22b1 go to i965 despite sitting above 0x1600), plus the skip and both-packages cases.
  • Refreshed the Testing section to match the current 56 cases in hw-intel-vaapi-driver-test.sh and the sysfs fakes in hardware-quirks-test.sh.

omarchybot and others added 2 commits November 16, 2026 20:13
Resolves hardware-quirks-test.sh: quattro's ath12k machines, rows and OMARCHY_PCI_DEVICES sit beside this branch's sysfs PCI fakes for the Wildcat Lake and nouveau rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
quattro has shipped migrations up to 1794844505 since this one was last renamed, and migrations run in filename order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Nov 16, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for updating the description, @atavacron. It now matches the change. Since then quattro moved on and this PR stopped merging cleanly, so I merged quattro into it again and pushed two commits. Codex Medium and muse-wonder (via pi, thinking high) reviewed both and found nothing to change. Your helper, install file and tests are unchanged.

Pushed to your branch

571eabb3 merges quattro. The one conflict was test/shell.d/hardware-quirks-test.sh. quattro added Qualcomm ath12k Wi-Fi machines and rows there, and its own OMARCHY_PCI_DEVICES fake under the scratch root. I kept both sides. Your pci() fakes still go to $hw/pci through OMARCHY_PCI_DEVICES_PATH, and the ath12k leaf still reads its own variable. The two never read each other's devices.

4206fa51 renames the migration to migrations/1794856389.sh. quattro has shipped migrations up to 1794844505 since the last rename, and migrations run in filename order. The content is unchanged.

Reproduced and tested on a disposable worker VM

Nothing quattro changed since the last check touches video-acceleration.sh, omarchy-pkg-add or the migration conventions. I still repeated the reproduction against quattro at 520c3ed9. Haswell 0416/0a2e, Bay Trail 0f31 and GM45 2a42 get nothing on quattro. Ivy Bridge 0166 gets intel-media-driver, and Haswell + Arc gets only intel-media-driver. At 4206fa51 the install file and the migration both choose the right packages for every one of them. With the install file reverted they go wrong again. Raptor Lake, Arrow Lake and Wildcat Lake get intel-media-driver either way.

At 4206fa51, hw-intel-vaapi-driver-test.sh (56/56), hardware-quirks-test.sh, ./test/cli and omarchy commands --check pass. The full ./test/shell fails five tests that fail on quattro too: the block-art logo, the "Hi" width check, git first-run setup, the OEM console logo and a keepLoaded fixture. One more, remote-session-service-test.sh, failed in the head's full run and then passed when run alone on the same tree. It reads capture state from the live compositor, and this PR touches nothing under shell/.

Second opinion

Both reviewers checked that the merge kept every row, machine and override from both sides. They also checked that the rename sorts after everything quattro has shipped, and that the migration still follows agents/skills/migrations.md. They found no defect. Their agreement is not independent, because they can read the earlier discussion here.

Related

#18571 (2011 MacBook Pro) also edits video-acceleration.sh, to give MacBookPro8,2 libva-intel-driver. Its description points here for the general fix. This PR's table already sends that Mac's Sandy Bridge 0x0126 to libva-intel-driver, so whichever lands second will conflict in that file. That choice is the maintainer's. #18027 only reports a missing driver when recording starts, and does not overlap.

Nothing is left for you. It is labelled verified at 4206fa51 and goes to the maintainer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working compatibility Make Omarchy work better on everything! verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

6 participants