Repository navigation
fix: give the power key back to logind while cosmic-comp is frozen - #241
Open
LinuxBoy-96 wants to merge 1 commit into
Open
LinuxBoy-96 wants to merge 1 commit into
LinuxBoy-96 wants to merge 1 commit into
Conversation
This was referenced Nov 8, 2026
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.
cosmic-session blocks logind's power key handling for the whole session, and cosmic-comp handles the key. While cosmic-comp is frozen, the power button does nothing, so a hard reset is the only way out.
cosmic-session now sends a heartbeat every 2 s, one at a time. When cosmic-comp doesn't answer for 10 s, the inhibitor is closed, so a short press of the power button does a clean poweroff through logind. It's taken again as soon as cosmic-comp answers. A cosmic-comp that never answers (an older version) keeps the inhibitor and only gets one message.
Needs pop-os/cosmic-comp#. Related: pop-os/cosmic-comp#, which aborts cosmic-comp after 60 s frozen.
Tested with cosmic-comp nested in Xvfb and a fake logind: with the main thread held for 30 s, the inhibitor was closed after 10 s and taken again as soon as cosmic-comp answered.
Needs pop-os/cosmic-comp#3045. Related: pop-os/cosmic-comp#3044, which aborts cosmic-comp after 60 s frozen.