Skip to content

fix(browsers): disable hardware video decode on Chromium-family browsers - #418

Open
duketopceo wants to merge 1 commit into
omacom:quattrofrom
duketopceo:fix-chromium-avd-green
Open

duketopceo wants to merge 1 commit into
omacom:quattrofrom
duketopceo:fix-chromium-avd-green

Conversation

@duketopceo

Copy link
Copy Markdown

Summary

Fixes the Omarchy-side half of #388 / #370.

On Apple Silicon, browser hardware video decode runs through the AVD driver via libva-v4l2_request-avd — and renders green frames on a subset of streams. A prior shipped workaround used --disable-accelerated-video-decode, but that switch is dead on Linux: in Chromium 152 (content/public/common/content_switches.cc) it's documented as ChromeOS-only policy plumbing, and the actual decoder gate — GetPreferredLinuxDecoderImplementation() in media/mojo/services/gpu_mojo_media_client_linux.cc — checks only the AcceleratedVideoDecoder feature. That's enabled by default in builds with VA-API (Brave, Brave Origin — matching the reporters' strings findings) and compiled out of Arch's chromium, which is why stock Chromium never shows the bug.

Changes:

  • config/chromium-flags.conf gains --disable-features=AcceleratedVideoDecoder. omarchy-install-browser already copies this file into every browser's *-flags.conf (chromium, chrome, brave, brave-origin, edge), so one line covers the whole family. On VA-API-less builds it's a no-op; native players (mpv/ffmpeg/GStreamer) keep full AVD decode — only browsers drop to software.
  • New migration 1789045438.sh merges the flag into ~/.config/*-flags.conf files already on disk — extending an existing --disable-features= list instead of shadowing it (a repeated flag would replace, not combine).

Test plan

  • test/shell.d/chromium-avd-decode-test.sh: append, merge-into-existing-list, idempotence, multi-browser coverage, no-op — 5/5 pass
  • Source-verified against Chromium 152.0.7977.75 (the version in ALARM repos)
  • Flag parses cleanly on installed chromium (--dump-dom smoke test)

Generated with Devin

On Apple Silicon the VA-API path decodes through the AVD driver, which
renders green frames on a subset of streams. The shipped
--disable-accelerated-video-decode switch is a ChromeOS-era toggle that no
Linux decode path reads — current Chromium gates decoder creation solely
on the AcceleratedVideoDecoder feature, enabled by default in builds with
VA-API (Brave, Brave Origin) and compiled out of Arch's chromium package.

Add --disable-features=AcceleratedVideoDecoder to the shared flags file
omarchy-install-browser copies into every browser's *-flags.conf, and a
migration that merges it into flag files already on disk (extending any
existing --disable-features list rather than shadowing it). Native players
still use AVD via libva; only browser decode drops to software.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

defer Parked. Needs a decision, or may die with the fork. Do not close or port yet.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants