Skip to content

fix(sandbox): bind /run/opengl-driver for accelerated media helpers - #2326

Merged
l0gicgate merged 1 commit into
mainfrom
fix/2261-sandbox-opengl-driver
Nov 13, 2026
Merged

l0gicgate merged 1 commit into
mainfrom
fix/2261-sandbox-opengl-driver

Conversation

@l0gicgate

@l0gicgate l0gicgate commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

On NixOS the Mesa, VA-API and Vulkan drivers live only under /run/opengl-driver, a set of symlinks into /nix/store. The preview sandbox never mounted that path. Accelerated media helpers got the render nodes and /sys but had no driver to load, so NixOS users had to patch the source.

This adds a read-only --ro-bind-try /run/opengl-driver next to the GPU device and /sys binds. It is a -try bind, so nothing changes on distributions that lack the path. Its symlink targets are reachable because the Nix package already sets STRATA_SANDBOX_ROOT=/nix/store. Software, image, PDF, thumbnail and other non-media helpers still get no GPU mounts, and the existing GPU sandbox tests now assert that for the new path too.

/run/opengl-driver-32 is not bound: it only holds 32-bit drivers, and the 64-bit helper can never load them.

Visual evidence

N/A: this changes which paths the sandbox mounts, not the UI.

How to test

  1. On NixOS with a GPU, build Strata from this branch's flake without the substituteInPlace workaround from the issue.
  2. Leave video acceleration on Automatic (or pick VA-API or Vulkan) and preview a long H.264 or HEVC video while watching the GPU's video-decode engine in nvtop or intel_gpu_top.
  3. Repeat on the current release without the workaround.

Expected result: With this branch the decode engine is busy during playback. On the current release it stays idle because the helper falls back to software. On other distributions, previews behave as before.

Related issue

Closes #2261

NixOS publishes its Mesa, VA-API and Vulkan drivers only under
/run/opengl-driver, so accelerated media helpers found no driver inside
the preview sandbox. Bind it read-only, where present, alongside the GPU
render nodes and /sys. Software and non-media helpers still get no GPU
mounts.

Refs #2261
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preview sandbox: bind /run/opengl-driver so GPU helpers work on NixOS

1 participant