Skip to content

Disable Chromium accelerated video decode on NVIDIA GSP - #13654

Closed
AnPod wants to merge 2 commits into
omacom:quattrofrom
AnPod:cursor/fix-chromium-nvidia-video-e0d3
Closed

AnPod wants to merge 2 commits into
omacom:quattrofrom
AnPod:cursor/fix-chromium-nvidia-video-e0d3

Conversation

@AnPod

@AnPod AnPod commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #13188

LIBVA_DRIVER_NAME=nvidia points Chromium at a Firefox-only VA-API driver, so video renders as a black rectangle with audio.

Change

  • Disable Chromium accelerated video decode on NVIDIA GSP sessions so playback uses a working path

Test plan

  • Focused NVIDIA/Chromium test on the branch
  • On an NVIDIA GSP machine, Chromium/Prime Video video should paint (not a black rectangle)

@cursor
cursor Bot force-pushed the cursor/fix-chromium-nvidia-video-e0d3 branch from f6574b7 to e706ca8 Compare September 29, 2026 21:14

@chessing234 chessing234 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.

please keep the nvidia workaround through chromium refreshes.

"$HOME/.config/brave-origin-flags.conf" \
"$HOME/.config/chrome-flags.conf" \
"$HOME/.config/microsoft-edge-stable-flags.conf"; do
append_flag "$conf"

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.

please also reapply this helper from omarchy-refresh-chromium: that command replaces chromium-flags.conf from the template, which has no --disable-accelerated-video-decode, and never calls this helper afterward. the flag disappears in a refresh fixture, so the black-video problem returns after a normal chromium refresh even on machines where the migration applied it.

@greptile-apps

greptile-apps Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 3/5

[Medium risk] Adds video decode workaround for NVIDIA hardware.

The PR does not yet appear safe to merge because deferred installations can miss the workaround and failed migration repairs can be marked complete.

Findings

  1. P1 Deferred installs miss video flag. ▶
  2. P1 Failed repair is marked complete. ▶
  3. P2 Hybrid laptops lose video acceleration. ▶
  4. P2 Video flag outlives GPU mode. ▶
  5. P2 Install paths remain untested. ▶

Summary

The PR adds a helper that disables accelerated video decoding in existing Chromium-family browser flag files on NVIDIA GSP systems, then invokes it during browser installation, Chromium refresh, hardware setup, and migration. The PR files have not changed since the previous review.

Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[NVIDIA GSP detection] --> B[Video flag helper]
  C[Browser install or refresh] --> B
  D[Hardware setup or migration] --> B
  B --> E[Existing Chromium-family flag files]
Loading

Reviews (2) · Last reviewed commit: "Reapply the NVIDIA Chromium video workar..."

Comment on lines +33 to +37
install_user=${OMARCHY_INSTALL_USER:-${SUDO_USER:-}}
if [[ -n $install_user ]]; then
install_home=$(getent passwd "$install_user" | cut -d: -f6)
if [[ -n $install_home ]]; then
sudo -u "$install_user" HOME="$install_home" omarchy-chromium-nvidia-video-flags || true

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.

P1 Deferred installs miss video flag. On a deferred NVIDIA GSP install, hardware setup runs before the owner account exists, so this lookup cannot apply the flag. User finalization does not call the helper, and fresh installs mark the migration complete without running it. Chromium can therefore still show black video until someone manually refreshes its configuration.

Knowledge Base Used:


set -euo pipefail

omarchy-hw-nvidia-gsp >/dev/null 2>&1 || exit 0

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 Hybrid laptops lose video acceleration. On a supported hybrid laptop with a GSP-capable NVIDIA GPU but an integrated-GPU-driven display, the session does not set LIBVA_DRIVER_NAME=nvidia. This check still adds the flag, disabling the working integrated-GPU video decode path even though the NVIDIA VA-API condition is absent.

Knowledge Base Used: Hardware profiles and device controls

Comment thread migrations/1790544670.sh

# Session-wide LIBVA_DRIVER_NAME=nvidia is correct for Firefox but makes
# Chromium paint black video (issue #13188). The helper is a no-op off GSP.
omarchy-chromium-nvidia-video-flags || true

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.

P1 Failed repair is marked complete. If an existing GSP user's flag file cannot be written, the helper fails, but || true lets the migration succeed and receive its completion marker. The flag remains absent, Chromium can retain black video, and later migration runs skip the repair instead of retrying it.

Knowledge Base Used: Migration framework


set -euo pipefail

omarchy-hw-nvidia-gsp >/dev/null 2>&1 || exit 0

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 Video flag outlives GPU mode. After a supported switch from hybrid to integrated GPU mode, this helper exits without removing flags it previously added. Those browsers keep using software-only video decoding. Chromium has a config refresh that can clear its flag, but Brave, Chrome, and Edge have no corresponding refresh.

Knowledge Base Used: Hardware profiles and device controls

Comment on lines +83 to +89
grep -q 'omarchy-chromium-nvidia-video-flags' "$ROOT/install/hardware/nvidia.sh" ||
fail "nvidia install applies chromium video flags"
pass "nvidia install applies chromium video flags"

grep -q 'omarchy-chromium-nvidia-video-flags' "$ROOT/bin/omarchy-install-browser" ||
fail "browser install applies chromium video flags"
pass "browser install applies chromium video flags"

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 Install paths remain untested. These assertions only search source text for the helper's name; they do not run browser installation or the root-owned NVIDIA setup branch. They would pass even if user selection, sudo -u, or install ordering prevented the flag from reaching the browser. Testing those paths with a configured user and flag file would catch that failure.

Knowledge Base Used: Install stages and package sets

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!

cursoragent and others added 2 commits October 2, 2026 07:26
@jandrusk

jandrusk commented Oct 7, 2026

Copy link
Copy Markdown

Thanks for this. #13189 from @jampick (who filed #13188) fixes the same black-video problem and is a few days older. It also handles the browser handoff and has a broader test set, so maintainers will probably want to pick one.

A note for whichever lands: omarchy-hw-nvidia-gsp is true on hybrid laptops even when the iGPU drives the display and nvidia.lua doesn't export LIBVA_DRIVER_NAME=nvidia. On those machines, adding --disable-accelerated-video-decode turns off working Intel/AMD VA-API decode in Chromium. Gating on the same "NVIDIA drives a display" check as nvidia.lua (see #13659) would avoid that regression.

@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for this. #13189 fixes the same bug from #13188, the same way (appending --disable-accelerated-video-decode to the Chromium-family flags files), and it's older, so it's the one being carried forward. This pull request has two gaps that #13189 doesn't:

  • It also turns off video acceleration on hybrid laptops. bin/omarchy-chromium-nvidia-video-flags:14 checks omarchy-hw-nvidia-gsp alone. On quattro, default/hypr/nvidia.lua exports LIBVA_DRIVER_NAME=nvidia only when omarchy-hw-nvidia-display also says NVIDIA drives the display. On a hybrid laptop where the Intel or AMD iGPU drives the display, the bug doesn't happen, but this would still add the flag and switch off the iGPU's working hardware decode. Force software video decode in Chromium on NVIDIA GPUs with GSP firmware #13189 gates on both checks, matching nvidia.lua.
  • It stops browser handoff. bin/omarchy-cmd-browser-handoff refuses to hand off to a running browser when the flags file has any flag outside its allowlist. This adds a flag that isn't on the list, so on affected machines every link and web app would start a new browser launch instead. Force software video decode in Chromium on NVIDIA GPUs with GSP firmware #13189 adds the flag to that allowlist.

I checked both against quattro. Nothing here is missing from #13189, so there's nothing to carry across. No tests ran on a worker for this pull request, since a fix that isn't going forward doesn't need verifying.

Second opinion: Codex Medium compared the two diffs without my conclusion. It picked #13189 for the same two reasons, and found nothing in this one that #13189 lacks. Its independence from my review isn't guaranteed.

Waiting on: the maintainer, who chooses between this and #13189.

AnPod commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded by the older #13189.

@AnPod AnPod closed this Oct 23, 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 compatibility Make Omarchy work better on everything!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chromium renders video black on NVIDIA: LIBVA_DRIVER_NAME=nvidia points it at a Firefox-only VA-API driver

5 participants