desktops: enable Widevine DRM out of the box on ARM64 desktops#878
Draft
SuperKali wants to merge 2 commits intoarmbian:mainfrom
Draft
desktops: enable Widevine DRM out of the box on ARM64 desktops#878SuperKali wants to merge 2 commits intoarmbian:mainfrom
SuperKali wants to merge 2 commits intoarmbian:mainfrom
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
83cb3b3 to
9319379
Compare
Generalises the `browser` token resolution into a reusable helper and adds a parallel `widevine` map in common.yaml for libwidevinecdm0 on noble arm64/armhf. Other release/arch combos silently drop the token.
Ships an /etc/chromium.d/armbian-widevine drop-in (WebGL software fallback + Netflix CrOS User-Agent) and a replacement /usr/bin/chromium wrapper that execs via eval so flags with quoted spaces survive. The original wrapper is preserved via dpkg-divert.
9319379 to
7553603
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
HTML5 DRM streaming is broken on Armbian ARM64 desktop images —
libwidevinecdm0isn't installed by default (currently only viaextensions/mesa-vpu.shgated to rk3588/rk35xx + noble + vendor), and Chromium 128+ lost its silent software WebGL fallback (crbug.com/242999 · blink-dev Intent to Remove), breaking Netflix Akira / Disney+ / Prime Video init with opaque errors. Netflix on top of that gates on a ChromeOS UA —osname=linuxis denied server-side regardless of architecture.What this PR changes
Two commits, one goal: Netflix and every other HTML5 DRM player just work on ARM64 desktop images without launchers, extensions, or per-user setup.
Commit 1 —
desktops/yaml: add widevine virtual token_resolve_browserinparse_desktop_yaml.pygeneralised to_resolve_virtual_token(token)so additional virtual tokens are cheap to addwidevine:map incommon.yaml(noble arm64/armhf →libwidevinecdm0)widevinetoken added to themidtier next tobrowserbrowser), so pre-populating this ahead ofapt.armbian.compublishing the.debis safeCommit 2 —
desktops/branding: chromium DRM drop-in + eval-aware wrapper/etc/chromium.d/armbian-widevinedrop-in with--enable-unsafe-swiftshader(fix WebGL) and--user-agent="...CrOS aarch64..."(fix Netflixosname=linuxblock)/usr/bin/chromium.armbianwrapper — near-identical copy of the stock launcher but execs viaevalsoCHROMIUM_FLAGSentries containing spaces (any valid UA string) survive word-splittingmodule_desktop_branding.shcopiesbranding/browsers/usr/to/usr/and usesdpkg-divertto swap/usr/bin/chromiumwith a symlink to our wrapper, preserving the upstream at/usr/bin/chromium.upstreamapt upgrade chromiumlands the upstream wrapper in.upstreamthanks to the divert; our symlink stays intactWhy these specific choices
--enable-unsafe-swiftshaderis a no-op where hardware WebGL works, only matters as fallback. Safe on every board. Rationale documented in the Chromium SwiftShader removal tracker and the Chrome Enterprise Policy page.osname=linuxserver-side block. Raspberry Pi OS already hardcodes the same spoof in its chromium build (rpi-firmware discussion · Raspberry-Pi-OS-64bit#248). Asahi Linux documented the same workaround independently (da.vidbuchanan.co.uk blog · AsahiLinux/widevine-installer). Fedora ARM users reached the same conclusion (fedora discussion). We can't rebuild chromium, so the drop-in is the next-best surface./usr/bin/chromiumdoes plain word-splitting on$CHROMIUM_FLAGS— a flag with spaces in its value (any--user-agent=...) gets shattered into garbage tokens.evalfixes it without rewriting the whole wrapper.Verified on
liujianfeng1994/rockchip-multimedia), libwidevinecdm0 4.10.2662.3 (Raspberry Pi Foundation upstream repacked for noble — upstream pool)Scope / non-goals
apt.armbian.comhosting oflibwidevinecdm0is handled separately (tracked with @igorpecovnik). Until the.debis published thewidevine:token resolves to a package name that doesn't exist on apt — this PR depends on that hosting being in place. Marking as DRAFT until then.apt.armbian.commirrors xtradeb; this approach avoids taking over that).widevine:map.Depends on
apt.armbian.compublishinglibwidevinecdm0for noble arm64/armhf