Spotify Web Player in Brave on ARM64: PWA install + icon fix + ad silencing

Spotify (and other DRM sites) in Brave on ARM64 Linux

Why this exists: Brave ships with Widevine DRM disabled by default, and on ARM64 Linux (Asahi, Raspberry Pi, etc.) Brave does not auto-download the Widevine CDM. You get "Playback of protected content is not enabled" on Spotify, Netflix, and similar sites until you install the CDM manually and switch Widevine on.

Everything below was verified on Asahi Linux (Arch Linux ARM, aarch64), Brave 151. The same steps apply to any ARM64 Linux distro.

1. Prerequisites

  • Brave installed (any recent version, 1.63+).
  • A copy of the Widevine CDM for ARM64. The easiest reliable source is the Google Chrome install, because its bundled CDM is complete and its manifest matches the actual binary version.
If you already have Google Chrome or Chromium installed, you already have a working CDM and can skip straight to step 2:
  • Chrome: /opt/google/chrome/WidevineCdm
  • Chromium: ~/.config/chromium/WidevineCdm/
If you have neither, install Chrome once:
# Debian/Ubuntu
wget -qO- https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
# or, on Arch ARM, install google-chrome from the AUR, or grab any known-good
# ARM64 WidevineCdm folder (manifest.json + _platform_specific/linux_arm64/)
The Arch ARM widevine package also ships a CDM at /opt/WidevineCdm/chromium, but its manifest can be out of sync with the binary (see the troubleshooting section). Prefer Chrome's copy.

2. Point Brave at the CDM

Find Brave's install directory first (it varies by distro):

ls -la /opt/brave-bin        # Arch
ls -la /opt/brave.com/brave  # RPM/DEB
ls -la /usr/lib/brave-bin    # some distros

The folder you want is the one containing the brave binary. In that folder there is (or should be) a WidevineCdm directory. Replace it with a symlink to a known-good CDM:

# adjust the paths to your machine
sudo rm -rf /opt/brave-bin/WidevineCdm
sudo ln -s /opt/google/chrome/WidevineCdm /opt/brave-bin/WidevineCdm

After this you should have:

/opt/brave-bin/WidevineCdm/manifest.json
/opt/brave-bin/WidevineCdm/_platform_specific/linux_arm64/libwidevinecdm.so

No-sudo alternative

Brave also accepts a pointer file in your user data directory instead of the install-dir symlink:

mkdir -p ~/.config/BraveSoftware/Brave-Browser/WidevineCdm
echo '{"Path":"/opt/google/chrome/WidevineCdm"}' \
  > ~/.config/BraveSoftware/Brave-Browser/WidevineCdm/latest-component-updated-widevine-cdm

3. Clean up any stale/broken copies (optional)

If a previous attempt left a WidevineCdm folder in the profile, remove it so it can't shadow the good one:

rm -rf ~/.config/BraveSoftware/Brave-Browser/WidevineCdm/4.*

4. Enable Widevine in Brave

  1. Quit Brave completely, then relaunch it.
  2. Go to brave://settings/extensions.
  3. Turn Enable Widevine ON.
  4. Relaunch again if it prompts you.

5. Verify

  1. Open brave://components.
  2. "Widevine Content Decryption Module" should be listed with a real version number (e.g. 4.10.3057.0) and status "Up-to-date".
  3. Open Spotify (or a DRM test page like https://bitmovin.com/demos/drm). Playback should work.

If brave://components shows the CDM but a site still refuses, hard-refresh the page (Ctrl+Shift+R).

Troubleshooting

The CDM is present but Brave won't load it. Most common cause on ARM64: the manifest version doesn't match the binary version. Brave rejects the CDM as invalid. Check it:

# manifest version
grep '"version"' /path/to/WidevineCdm/manifest.json

The binary's own reported version can be read by loading it:

# quick check of the exported version string
strings /path/to/WidevineCdm/_platform_specific/linux_arm64/libwidevinecdm.so \
  | grep -E '^4\.10\.' | head -1

Both must agree. The Arch ARM widevine package has shipped a mismatch in the past (binary reports 4.10.2662.3 while the manifest claims 4.10.2891.0), which is exactly what this guide avoids by using Chrome's self-consistent CDM.

The settings toggle flips back off. Seen on old Brave ARM64 builds. Update Brave to 1.63+ and redo steps 2 and 4.

GLIBC errors when loading the CDM. Widevine for ARM64 requires glibc 2.36+ (RELR relocations). Arch ARM and modern distros are fine; very old distros are not. If you're on something ancient, update it first.

Easier fallback. Chromium and Google Chrome auto-download the ARM64 CDM and work out of the box. If you just want Spotify playing and don't care which browser, use one of those.

6. Install Spotify as a PWA

Once playback works, use the web player as an installed app (it runs in its own window with a proper app name):

  1. Open https://open.spotify.com in Brave and log in.
  2. Open the three-dot menu (top right). If Install Spotify... is shown, pick it. If not, the site isn't offering an installable app, so use Cast, save, and share → Install page as app.... Both work; the latter is how this was tested on Brave 151. If only Create shortcut is available, pick it and tick Open as window.

The result is a desktop entry named after the app (e.g. ~/.local/share/applications/brave--Default.desktop) that points back at Brave with --app-id=. The same extension and Widevine setup apply automatically, since the PWA shares the Brave profile.

7. Fix the PWA icon

Spotify's manifest icon URLs live on open.spotifycdn.com/cdn/images/icons/ and they are dead (HTTP 404), so Brave stores a dull fallback tile (a grey rounded square with the letter S) as the app icon. This affects the window title bar, not the launcher.

Get the official icon (one time, from the official client package):

# fetch the latest spotify-client .deb URL from the repo index
curl -sL "http://repository.spotify.com/dists/stable/non-free/binary-amd64/Packages" | \
  grep -E '^Filename: pool/non-free/s/spotify-client/' | head -1
# download it, extract the icons, remove the .deb afterwards
curl -sL -o /tmp/spotify-client.deb "http://repository.spotify.com/.deb"
dpkg-deb -x /tmp/spotify-client.deb /tmp/spotify-extract
# install the icons into your hicolor theme (16 to 512 px)
cd /tmp/spotify-extract/usr/share/spotify/icons
for s in 512 256 128 64 48 32 16; do
  mkdir -p ~/.local/share/icons/hicolor/${s}x${s}/apps
  cp spotify-linux-${s}.png ~/.local/share/icons/hicolor/${s}x${s}/apps/spotify.png
done
rm -rf /tmp/spotify-client.deb /tmp/spotify-extract
gtk-update-icon-cache -f -t ~/.local/share/icons/hicolor
update-desktop-database ~/.local/share/applications

Point the PWA's desktop entry at it:

# in ~/.local/share/applications/brave--Default.desktop, change
Icon=brave--Default
# to
Icon=spotify

Fix the in-window (title bar) icon. Brave caches the app icon inside the profile at:

~/.config/BraveSoftware/Brave-Browser/Default/Web Applications/Manifest Resources//Icons/

Replace every N.png there with the real logo resized to the matching size (convert spotify.png -resize 96x96 96.png, etc.). Back up the folder first. Then fully quit Brave and relaunch. If it regenerates a tile later, it means a manifest refresh tried to re-fetch the dead URLs, and you can redo the swap.

The launcher entries for the YouTube / Google Keep PWAs on this machine work the same way: their .desktop files are named brave--Default.desktop.

8. Silence/completely hide ads

  • uBlock Origin (any recent version, full build not Lite) blocks and silences Spotify web player ads via the built-in "uBlock filters" list: ad audio requests from open.spotify.com are redirected to a silent 1-second file instead of being blocked outright (blocking would freeze playback). Nothing needs configuring. Keep "uBlock filters - Quick fixes" enabled (it is by default) because Spotify changes its ad delivery often.
  • Extensions run inside the PWA window without extra settings because the PWA shares the Brave profile. For userscript managers (Tampermonkey etc.) you must enable Allow User Scripts in Brave for them to inject at all.

Hide the "Explore Premium" button. Spotify's premium pill uses data-testid="upgrade-button", and the install-app link is a[href="/download"]. Add two lines to uBlock Origin's My filters:

open.spotify.com##[data-testid="upgrade-button"]
open.spotify.com##a[href="/download"]

Domain-specific filters are required here because EasyList ships an exception (@@||open.spotify.com^$generichide) that disables generic cosmetic hiding on Spotify; anchored ## filters still apply.

Troubleshooting additions

Ads still audible on Spotify. Confirm the "uBlock filters" list is enabled in uBO's dashboard (Filter lists tab) and that the dashboard's red/green update indicator isn't stale. Do not block Spotify's media requests wholesale with a hard block rule: the player freezes on a failed audio request rather than skipping the ad. Redirect (silent) rules are the correct approach.

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论