Skip to content

fix: replace suspend-then-hibernate with hybrid-sleep#1380

Open
kellyson71 wants to merge 2 commits into
caelestia-dots:mainfrom
kellyson71:fix/sleep-use-hybrid-sleep
Open

fix: replace suspend-then-hibernate with hybrid-sleep#1380
kellyson71 wants to merge 2 commits into
caelestia-dots:mainfrom
kellyson71:fix/sleep-use-hybrid-sleep

Conversation

@kellyson71
Copy link
Copy Markdown

Problem

The Sleep launcher action and the idle timeout action both use systemctl suspend-then-hibernate, which:

  • Requires hibernation to be properly configured (swap partition/file + resume= kernel param)
  • Has its systemd unit absent on some distributions (e.g. the unit suspend-then-hibernate.service may simply not exist)
  • Silently does nothing when unavailable

Solution

Replace with systemctl hybrid-sleep, which:

  • Simultaneously suspends to RAM and saves state to disk
  • Achieves the same safety goal (state preserved on power loss)
  • Is more universally supported across distributions

Additionally, sleep is now exposed as a named entry in SessionConfig (alongside logout, shutdown, hibernate, reboot), so users can override it in their config file.

Changes

  • config/LauncherConfig.qml — Sleep action: suspend-then-hibernatehybrid-sleep, updated description
  • config/GeneralConfig.qml — idle timeout action: suspend-then-hibernatehybrid-sleep
  • config/SessionConfig.qml — added sleep icon (bedtime) and command (hybrid-sleep)
  • config/Config.qml — expose sleep icon/command in serializeSession()

🤖 Generated with Claude Code

kellyson71 and others added 2 commits April 6, 2026 15:50
suspend-then-hibernate requires a pre-configured hibernate setup
(swap partition/file with resume= kernel param) and its systemd
unit may not be present on all distributions. hybrid-sleep achieves
the same goal (saving state to disk while suspending to RAM) and is
more universally supported.

Also exposes sleep icon/command in SessionConfig so users can
override the default via their config file.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
hybrid-sleep requires disk-based hibernation. Systems with only zram
have no swap on disk, so hybrid-sleep fails silently. Plain suspend
is the correct default for these systems.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@joaovictorsoars
Copy link
Copy Markdown

Well, im having problems with suspend-then-hibernate, so i come to search if anyone have submitted a PR related. Im gladly that you submitted that, but your description and your code diverges. While you are saying that you will change to hybrid-sleep, actually you changed to systemctl suspend.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants