Sleep inhibitor blocks manual suspend/hibernate, not just automatic idle sleep

Resolved 💬 2 comments Opened Mar 27, 2026 by zinoviosDev Closed Apr 26, 2026

Describe the bug

Claude Code registers a systemd sleep inhibitor with What=sleep:idle and Mode=block. This prevents all suspend/hibernate actions, including manual ones triggered by the user (e.g. from the KDE power menu or systemctl suspend).

The intended behavior is presumably to prevent automatic idle-based sleep during an active session, but the current implementation also blocks explicit user-initiated suspend/hibernate.

To reproduce

  1. Start a Claude Code session
  2. Run: systemd-inhibit --list
  3. Observe: Claude Code ... sleep:idle ... Active coding session ... block
  4. Try to suspend or hibernate via the DE power menu or systemctl suspend
  5. Nothing happens — the inhibitor silently blocks it

Expected behavior

Either:

  • Inhibit only idle (not sleep), so manual suspend/hibernate still works, OR
  • Use Mode=delay instead of Mode=block for the sleep part of the inhibitor

Environment

  • OS: Debian-based Linux, kernel 6.19.0
  • DE: KDE Plasma 6 (Wayland)

Workaround

systemctl suspend -i    # ignore inhibitors flag
systemctl hibernate -i

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗