Fix Widevine DRM sandbox access - #871
Open
rakonkido wants to merge 1 commit into
Open
Conversation
Contributor
|
🚧 Test build enqueued. |
Contributor
|
🚧 Started test build. |
Contributor
|
✅ Test build succeeded. To test this build, install it from the testing repository: Built for x86_64 architecture. |
Author
|
Test results from the above build:
|
Collaborator
|
Zypak is not enabled for Edge in this configuration, so this is likely not the solution to the playback issue. |
Author
|
@evan-a-a What do you mean by that? I ran the following to check if the current stable (unpatched) release is using Zypak: (deck@steamdeck com.microsoft.Edge)$ flatpak run --system --env=G_MESSAGES_DEBUG=cobalt com.microsoft.Edge//stable --version
(cobalt:2): cobalt-DEBUG: 10:05:08.898: Loading config file '/app/etc/cobalt.ini'
(cobalt:2): cobalt-DEBUG: 10:05:08.900: Inferred application name 'edge'
(cobalt:2): cobalt-DEBUG: 10:05:08.901: Exec= line is: /app/bin/edge %U
(cobalt:2): cobalt-DEBUG: 10:05:08.901: Zypak is available
(cobalt:2): cobalt-DEBUG: 10:05:08.901: Flextop is available
(cobalt:2): cobalt-DEBUG: 10:05:08.901: Inferred sandbox filename 'msedge-sandbox'
(cobalt:2): cobalt-DEBUG: 10:05:08.901: expose-pids is available
(cobalt:2): cobalt-DEBUG: 10:05:08.906: Flags file '/home/deck/.var/app/com.microsoft.Edge/config/edge-flags.conf' not found
(cobalt:2): cobalt-DEBUG: 10:05:08.907: Flatpak version: 1.16.6
(cobalt:2): cobalt-DEBUG: 10:05:08.907: Flatpak version is >= 1.11.1, shared /tmp is available
(cobalt:2): cobalt-DEBUG: 10:05:08.907: setenv: TMPDIR=/tmp
(cobalt:2): cobalt-DEBUG: 10:05:08.907: setenv: LIBGL_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/GL/lib/dri
(cobalt:2): cobalt-DEBUG: 10:05:08.907: setenv: VK_DRIVER_FILES=/usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d
(cobalt:2): cobalt-DEBUG: 10:05:08.907: setenv: XCURSOR_PATH=~/.icons:/app/share/icons:/usr/share/icons:/usr/share/pixmaps:/usr/share/runtime/share/icons:/run/host/user-share/icons:/run/host/share/icons
(cobalt:2): cobalt-DEBUG: 10:05:08.907: setenv: CHROME_DESKTOP=com.microsoft.Edge.desktop
(cobalt:2): cobalt-DEBUG: 10:05:08.907: setenv: CHROME_WRAPPER=/app/bin/edge
(cobalt:2): cobalt-DEBUG: 10:05:08.907: setenv: ZYPAK_SANDBOX_FILENAME=msedge-sandbox
(cobalt:2): cobalt-DEBUG: 10:05:08.907: setenv: ZYPAK_SPAWN_LATEST_ON_REEXEC=1
(cobalt:2): cobalt-DEBUG: 10:05:08.907: Arg: 'zypak-wrapper.sh'
(cobalt:2): cobalt-DEBUG: 10:05:08.907: Arg: '/app/extra/msedge'
(cobalt:2): cobalt-DEBUG: 10:05:08.907: Arg: '--enable-features=WebRTCPipeWireCapturer'
(cobalt:2): cobalt-DEBUG: 10:05:08.907: Arg: '--disable-features=WebAssemblyTrapHandler,DesktopPWAsRunOnOsLogin'
(cobalt:2): cobalt-DEBUG: 10:05:08.907: Arg: '--version'
Microsoft Edge 151.0.4129.78I see The zypak wrapper is indeed installed by the Edge manifest: com.microsoft.Edge/com.microsoft.Edge.yaml Line 106 in 9796a2d |
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.
Summary
Enable Zypak's Widevine handling and provide Cobalt with the Edge profile directory.
Problem
Netflix failed with error
D7702-1003even thoughedge://componentsreported that the Widevine Content Decryption Module was installed. Edge logged the following error when loading the downloaded CDM:Granting broader Flatpak filesystem access did not resolve the error. Running Edge with Chromium's
--no-sandboxoption did, which isolated the failure to the Chromium/Zypak sandbox rather than the outer Flatpak filesystem sandbox.Widevine components downloaded at runtime are stored under the browser profile directory. Zypak must explicitly expose this directory to Chromium's sandbox. Cobalt uses ConfigDir to locate the profile and, when
ExposeWidevineis enabled, configures Zypak to expose its WidevineCdm directory.For the stable Edge package, the profile directory is
$XDG_CONFIG_HOME/microsoft-edge.This follows the same Cobalt/Zypak configuration used to fix DRM handling in the Opera Flatpak: flathub/com.opera.Opera#127.
Testing
The equivalent change was built and tested locally from the repository's beta branch on SteamOS. The beta-specific profile directory, microsoft-edge-beta, was used for that build.
Testing included:
ConfigDirandExposeWidevine=truesettings.--no-sandbox.Playback succeeded both before and after restarting Edge. The Chromium/Zypak sandbox remained enabled, and the previous libwidevinecdm.so permission error did not recur.