Skip to content

fix(linux): give the Actions Ring overlay the GPUI runtime RUNPATH - #785

Open
tagawa0525 wants to merge 3 commits into
AprilNEA:masterfrom
tagawa0525:fix/nix-overlay-runtime-libs
Open

fix(linux): give the Actions Ring overlay the GPUI runtime RUNPATH#785
tagawa0525 wants to merge 3 commits into
AprilNEA:masterfrom
tagawa0525:fix/nix-overlay-runtime-libs

Conversation

@tagawa0525

Copy link
Copy Markdown
Contributor

Summary

The Nix package ships two GPUI processes but patches only one. postFixup added
the runtime library RUNPATH (libGL, wayland, vulkan-loader) to
openlogi-desktop, leaving openlogi-overlay without it. GPUI dlopens those
libraries, so the overlay panics at startup, long before it reaches the
compositor:

thread 'main' panicked at gpui_linux-0.1.0/src/linux/wayland/client.rs:569:49:
called `Result::unwrap()` on an `Err` value: NoWaylandLib

The agent supervises the overlay, so the panic is not a one-off failure: the
helper is restarted on every backoff tick, forever. On a NixOS install the
only visible symptoms are journal noise and wasted CPU — the Actions Ring
itself simply never appears.

Nothing in the package's own checks could catch this, because a missing dlopen
path is neither a link error nor a test failure; the binary installs perfectly
and only fails when it runs.

Changes

  • packaging/linux/package.nix
    • postFixup now loops over both GPUI binaries (openlogi-desktop,
      openlogi-overlay) instead of naming the desktop app alone.
    • preInstallCheck asserts that every GPUI binary carries every entry of
      runtimeLibs in its RUNPATH, so the next GPUI process added to the bundle
      cannot silently ship without it.

Testing

nix build .#openlogi                     # green, installCheck included
patchelf --print-rpath result/bin/openlogi-overlay   # contains wayland / vulkan-loader / libGL
nix run nixpkgs#nixfmt -- --check packaging/linux/package.nix

The RED commit's assertion was confirmed to fail against a build without the
postFixup change (that is what it pins). No Rust code changed, so the Rust
gate is untouched by this diff.

Runtime-verified on NixOS (Wayland): the overlay starts and the restart loop
in journalctl --user -u openlogi-agent stops.

GPUI dlopens wayland, vulkan-loader and libGL, so a binary that never got
`patchelf --add-rpath` still links and installs cleanly — it only fails at
startup, panicking on `NoWaylandLib`. Nothing in the package check looked at
the RUNPATH, so the gap was invisible to the build.

Assert it in preInstallCheck for both GPUI processes. This fails today on
openlogi-overlay, which postFixup does not patch.
postFixup patched only openlogi-desktop, so openlogi-overlay shipped without
wayland, vulkan-loader or libGL on its RUNPATH. GPUI dlopens those, so the
overlay panicked with `NoWaylandLib` before it ever reached the compositor,
and the agent's supervisor restarted it on every backoff tick — a permanent
crash loop that only shows up as journal noise and wasted CPU, since the
Actions Ring simply never appears.

The overlay is a sibling of the desktop app, not a part of it, so the fixup
loops over both GPUI binaries. The preInstallCheck added in the previous
commit now passes.
@tagawa0525
tagawa0525 requested a review from AprilNEA as a code owner August 22, 2026 05:44
Copilot AI lite review requested due to automatic review settings August 22, 2026 05:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Define the GPUI binary set once so future additions cannot bypass runtime-path patching and validation.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates Linux Nix packaging so both GPUI processes receive required graphics-library RUNPATH entries.

Changes:

  • Patches openlogi-desktop and openlogi-overlay.
  • Adds RUNPATH validation for both binaries.
File summaries
File Summary
packaging/linux/package.nix Adds and validates GPUI runtime paths; the binary list is duplicated, allowing future binaries to bypass the patching and checks.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packaging/linux/package.nix Outdated
Comment on lines +209 to +211
for binary in openlogi-desktop openlogi-overlay; do
patchelf --add-rpath "${runtimeLibs}" "$out/bin/$binary"
done

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2665ba1 — the binary sets are now single let bindings (gpuiBinaries, binaries) that install, fixup, and the check all iterate. cargoBuildFlags stays explicit because it pairs package names with binary names; a binary added to the list without a matching build flag fails the install loudly (install -Dm755 on a missing file) rather than shipping half-packaged.

@greptile-apps

greptile-apps Bot commented Aug 22, 2026

Copy link
Copy Markdown

Greptile Summary

The Nix package now applies the GPUI runtime-library RUNPATH to both the desktop and Actions Ring overlay binaries.

  • Centralizes the four packaged executables and the two GPUI executables into shared lists.
  • Patches every GPUI executable with the graphics-backend RUNPATH.
  • Adds an install check that verifies each required RUNPATH entry.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
packaging/linux/package.nix Centralizes packaged binary lists, adds the missing overlay RUNPATH, and verifies all GPUI runtime-library entries during the install check.

Reviews (2): Last reviewed commit: "refactor(linux): define the packaged bin..." | Re-trigger Greptile

The GPUI binary list lived in both postFixup and the install check, so a
future GPUI binary added to one but not the other would ship without its
runtime RUNPATH while the check still passed. Hoist the binary sets into
let bindings that install, fixup, and the check all iterate.

cargoBuildFlags stays explicit because it pairs package names with binary
names; a binary added to the list without a matching build flag fails the
install loudly rather than shipping half-packaged.

Refs: AprilNEA#785 (comment)
@davidbudnick davidbudnick added type: bug Something is broken or behaves incorrectly platform: linux Linux-specific issue labels Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform: linux Linux-specific issue type: bug Something is broken or behaves incorrectly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants