Skip to content

Replace terminal screensaver with native Wayland client - #7193

Closed
tobi wants to merge 2 commits into
omacom:quattrofrom
tobi:native-screensaver
Closed

tobi wants to merge 2 commits into
omacom:quattrofrom
tobi:native-screensaver

Conversation

@tobi

@tobi tobi commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • keep omarchy-launch-screensaver as the stable entry point and exec the packaged native implementation whenever it is installed
  • retain the terminal implementation as a safe fallback until the package is available
  • add the omarchy-screensaver package from Add omarchy-screensaver omarchy-pkgs#158 for fresh and existing systems
  • stop both native and fallback clients cleanly before locking, with a bounded forced-shutdown fallback for the native client

The preferred implementation is a Rust wlr-layer-shell client. It creates one exclusive overlay per output, renders ttfx directly into persistent Wayland SHM buffers, and preserves the existing toggle, force, branding, dismissal, lock-state, cursor, namespace, and multi-monitor contracts. Once the package is installed, the launcher immediately execs the native binary and does not start a terminal.

Implementation and v1.0.0 binaries: https://github.com/tobi/omarchy-launch-screensaver/releases/tag/v1.0.0
Package dependency (must merge first): omacom/omarchy-pkgs#158

Verification

  • test/shell.d/launch-screensaver-test.sh
  • test/shell.d/system-lock-test.sh
  • ./test/cli
  • launcher tests prove argument forwarding, no-argument launch, native preference, and terminal fallback
  • launched the packaged v1.0.0 binary in the live Hyprland session; both output layer surfaces mapped and cleanup exited 0
  • package built with makepkg --force --noconfirm and passed its release checksum

A prior ./test/all run completed 178 of 181 shell test files; the remaining failures were in the Fireworks local-midnight fixture, duplicate live-session IPC registration, and a missing omarchy-iso checkout.

Copilot AI balanced review requested due to automatic review settings August 16, 2026 21:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Replaces the terminal-based screensaver with a packaged native Wayland client while preserving the launcher entry point.

Changes:

  • Delegates screensaver launches to the native package.
  • Installs the package for new and existing systems.
  • Adds graceful shutdown handling and launcher tests.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 4 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
bin/omarchy-launch-screensaver Delegates to the packaged native executable.
bin/omarchy-screensaver Removes the terminal child implementation.
bin/omarchy-system-lock Gracefully terminates the native screensaver.
install/omarchy-base.packages Adds the package to fresh installations.
migrations/1786782462.sh Installs the package on existing systems.
test/shell.d/launch-screensaver-test.sh Tests launcher delegation and failure behavior.
test/shell.d/system-lock-test.sh Tests native-client shutdown sequencing.

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

Comment thread migrations/1786782462.sh
@@ -0,0 +1,3 @@
echo "Install the native Omarchy screensaver"

omarchy-pkg-add omarchy-screensaver

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.

Agreed. omacom/omarchy-pkgs#158 is clean and mergeable, and this PR must merge only after that package is published. I also updated the launcher to retain the terminal fallback whenever the native binary is absent; the migration intentionally remains strict so a release-order mistake cannot silently mark the package installation complete.

omacut
omawrite
omarchy-nvim
omarchy-screensaver

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.

Agreed; the package PR is the release prerequisite and is now called out explicitly in the PR description. The launcher also falls back to the existing terminal implementation when the package is absent, but fresh installs must still wait for omacom/omarchy-pkgs#158 to publish the dependency.

Copilot AI review requested due to automatic review settings August 17, 2026 00:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 6 changed files in this pull request and generated no new comments.

@howdeploy

Copy link
Copy Markdown

One QXL data point that may be useful before this becomes the default screensaver path: the currently shipped Foot/ttfx implementation at 120 FPS triggered a complete render-session freeze on an Omarchy 4.0.1 QXL guest.

The recorded boot produced 117 [TTM] Buffer eviction failed messages, then qxl_alloc_bo_reserved: failed to allocate VRAM BO and repeated qxl_fence_wait -> ttm_bo_evict -> qxl_draw_dirty_fb stalls. The first TTM failure arrived 48 seconds after the screensaver launched. Full system details and timeline are in #8554.

The direct Wayland/SHM implementation here should remove substantial terminal overhead, but the native source also defaults to a 120 FPS simulation/presentation path. Could we test it on QXL or retain a supported frame-rate override when the native package is selected?

Draft #8556 adds OMARCHY_SCREENSAVER_FRAME_RATE to the terminal implementation without changing the 120 FPS default. I am happy to align the name or behavior with the native client so the mitigation does not disappear when this PR lands.

@omarchybot

Copy link
Copy Markdown
Collaborator

Revived on today's quattro in #16800, with your screensaver forked to omacom/omarchy-screensaver so it can ship from there (omacom/omarchy-screensaver#1). Thanks @tobi.

Your launcher hand-off, lock shutdown and migration carried over. Rebasing and reviewing it needed four more things:

  • Idle service. It tracked screensaver windows, which a layer surface never matches, so that tracking goes. The service now stops the overlay itself when input it never sees (a bound media key, a touchscreen) means the user is back.
  • No terminal fallback. The package is in the base list and the migration installs it.
  • ttfx pin. ttfx is pinned to v0.5.1 rather than following its default branch.
  • Scroll and frame rate. Scroll now dismisses, and --frame-rate also caps presentation, for the QXL freeze in 120 FPS ttfx screensaver triggers QXL TTM failures and freezes the session #8554.

Worker verification and review are in #16800. It stays a draft until the package is published. This one stays open for the maintainer to close in its favour.

@omarchybot

Copy link
Copy Markdown
Collaborator

Merged as #16800 on today's quattro. Thanks @tobi. Your screensaver now ships from omacom/omarchy-screensaver as the omarchy-screensaver package, and Omarchy's launcher hands off to it.

@omarchybot omarchybot closed this Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants