Check systemd inhibitors before shutdown/reboot #2

Open
opened 2026-04-06 19:46:30 +02:00 by nevaforget · 0 comments
Owner

Currently moonset calls systemctl poweroff/reboot directly without checking for active systemd inhibitors. If an inhibitor is active (e.g. a package manager running, an unsaved document), the action either silently fails or shows a generic error.

Desired behavior:

  • Before executing a power action, query active inhibitors via logind D-Bus API (ListInhibitors)
  • If inhibitors are active, show a meaningful message (e.g. "Package update in progress — shutdown blocked")
  • Optionally allow the user to force the action despite inhibitors

Reference: org.freedesktop.login1.Manager.ListInhibitors on D-Bus

Currently moonset calls systemctl poweroff/reboot directly without checking for active systemd inhibitors. If an inhibitor is active (e.g. a package manager running, an unsaved document), the action either silently fails or shows a generic error. **Desired behavior:** - Before executing a power action, query active inhibitors via logind D-Bus API (ListInhibitors) - If inhibitors are active, show a meaningful message (e.g. "Package update in progress — shutdown blocked") - Optionally allow the user to force the action despite inhibitors **Reference:** org.freedesktop.login1.Manager.ListInhibitors on D-Bus
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nevaforget/moonset#2
No description provided.