Conversation
- Change logind inhibitor lock from 'block' to 'delay': a block-mode lock made systemd-logind refuse ManagerReboot/Shutdown entirely, so KDE restart with an active mount silently degraded into a session logout instead of rebooting. Delay mode lets the OS proceed while still giving the app a grace period. - Release the inhibitor on PrepareForShutdown=true: the signal handler previously only logged a warning and never released the lock, so the lock survived until process exit even when the OS was shutting down.
nvandamme
force-pushed
the
fix/power-inhibitor-shutdown-handling
branch
from
September 13, 2026 10:03
5091556 to
81b0cd0
Compare
Collaborator
|
Hi @nvandamme, Thank you for opening this PR and highlighting the shutdown hang on KDE Plasma / systemd! We looked deeply into this behavior across different desktop environments and inhibitor modes:
Solution ImplementedTo solve both the shutdown hang and the sleep handling cleanly, we implemented a comprehensive fix:
Because this required reworking the inhibitor target and adding the D-Bus signal listener, we have implemented this fix directly in the codebase (targeted for the upcoming release). Closing this in favor of the integrated solution. Thank you again for your valuable contribution and for helping us diagnose this! Fixes in this commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Linux, while any mount/job is active, RClone Manager acquires a logind
inhibitor lock with MODE=block. This causes two issues:
systemd-logindrefusesManagerReboot/Shutdownentirely — on KDE Plasma,clicking "Restart" silently degrades into a black screen, waiting indefinitely instead of rebooting.
The reboot transaction never starts.
PrepareForShutdown=truesignal handler only logged a warning and neverreleased the lock, so the lock survived until process exit even during shutdown.
Fix
"block"to"delay": logind proceeds withthe reboot after its grace period instead of refusing it outright. A user app
cannot truly block power-off anyway (power button, Ctrl+Alt+Del, remote admin).
PrepareForShutdown=true, actually callstate.release()so the lock isreleased as soon as the OS begins shutting down — mirroring what already happens
when all mounts are unmounted.
Verification
Tested on CachyOS (systemd 261, Plasma 6): with kDrive mounted and the patched
binary running,
ListInhibitorsnow shows mode "delay", and KDE Restart performsa real reboot instead of logging out.