Repository navigation
Conversation
On hybrid GPUs whose display runs on another GPU, forcing the NVIDIA VA-API driver breaks hardware video playback in Chromium and Electron (grey/black video with a running clock). Gate the export on a new boot-VGA detector so NVIDIA-only and muxed NVIDIA-display machines keep the override.
|
Fixes #10590 |
|
Reproduced defect in the detector's fallback on real hardware: with this PR applied, the machine below would still export Machine: ROG Zephyrus G14 GA403WW, Ryzen AI 9 HX 370 (Radeon 890M) + RTX 5080 Max-Q, Omarchy 4.0.3-1, Hyprland 0.56.2, mesa 26.2.2, Chrome 153. Running Why the fallback fires. The loop only sets Suggested change. Distinguish "no arbitration information" from "arbitration information that excludes NVIDIA": treat any readable saw_boot_attr=false
...
[[ -r $device/boot_vga ]] || continue
saw_boot_attr=true
[[ $(< "$device/boot_vga") == 1 ]] || continue
[[ $(< "$device/vendor") == 0x10de ]] && exit 0
other_boot=true
...
[[ $saw_boot_attr == false ]] && exit 0 # undeterminable, old behaviour
exit 1Separately, and worth deciding before merging either approach: boot VGA is not the same as "drives the display". In @Pieter-Uys' desktop case on #8726 the monitor cable is on the NVIDIA card while |
A Display-controller (0x038000) peer exposes no boot_vga file, so the old-behavior fallback fired even when NVIDIA reported boot_vga=0. Fall back only when no display device exposes the attribute at all, and cover the G14 (Radeon 890M + RTX 5080) layout with a regression case.
353369b to
805b206
Compare
|
Applied the fallback fix to this PR — thank you for the precise reproduction. What changed ( Regression test ( Out of scope: a machine exposing no |
|
Automated duplication check: this pull request looks similar to #7851, which covers the same LIBVA-only NVIDIA gating on hybrid-GPU systems. I keep that one open and close this one to consolidate review. If you feel this is the wrong decision, please open the PR again with a note on the difference. |
Summary
Fixes grey/black video playback in Chromium and Electron apps (including the Discord webapp) on hybrid AMD+NVIDIA laptops.
Root cause
default/hypr/nvidia.luaexportedLIBVA_DRIVER_NAME=nvidiasession-wide onany machine with a GSP-capable NVIDIA GPU, with no check for which GPU drives
the display. On hybrid laptops whose display runs on the AMD iGPU, Chromium
composites on the AMD render node (
--render-node-override=/dev/dri/renderD129)while VA-API resolves to the NVIDIA driver, so every hardware-decoded frame
fails EGL import (
eglCreateImage failed with 0x00003009,Failed to create EGLImage,Unable to initialize binding from pixmap). The video clock keepsrunning while the video area renders black (seen as grey in Discord).
Fix
bin/omarchy-hw-nvidia-display: claims NVIDIA only when anNVIDIA GPU owns boot VGA (i.e. NVIDIA actually drives the display), with a
back-compat fallback that preserves the old behavior when no boot-VGA info
exists. Follows the existing sysfs-cached-ID detector style (no PCI
config-space reads that would wake a suspended dGPU).
default/hypr/nvidia.lua: gates only theLIBVA_DRIVER_NAMEexport on thenew detector.
NVD_BACKENDand__GLX_VENDOR_LIBRARY_NAMEare untouched(verified harmless: playback is green with them still set).
test/shell.d/hw-nvidia-test.sh: extended to 14 cases (hybrid AMD+NVIDIAwith display on AMD, muxed hybrid with display on NVIDIA, NVIDIA-only with
and without boot-VGA info, plus all pre-existing cases).
Before/after evidence (headed system Chromium, local files, real pixels)
Test loop: headed Chromium on a
<video autoplay muted>page, CDPPage.captureScreenshot, asserting color pixels plus advancing clock.LIBVA_DRIVER_NAME=nvidia, current default)eglCreateImage failed=radeonsi/unset runs)Crashed-vs-plays: no GPU-process or tab crash signature was found in any run
(no crash dumps on disk, all tabs stayed alive, video clock kept advancing).
The reported YouTube "crash" reproduces as the same dead (grey/black) video
surface, not a process crash — no separate fault.
Verification
./test/cli: 112/112 green../test/shell: 3162 green; 4 failures are pre-existing on the clean baseand unrelated (
command -vinomarchy-remove-ai-*, missingomarchy-pkgscheckout in this environment).(RTX 4060 Mobile + AMD HawkPoint, display on AMD): exits 1, so the fixed
config skips the override there.