Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: fix sleep delay and simplify process spawning #127

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

PaideiaDilemma
Copy link
Contributor

@PaideiaDilemma PaideiaDilemma commented Feb 6, 2025

So releasing the sleep inhibitor did not work properly so far, cause of forked fds.
That lead to suspend taking max delay seconds, which defaults to 5. (I used a sleep 4 && hyprlock to test that the system does not go sleep, so I did not notice.)

As can be seen in my comments, for some reason we still need to explicitly close the fd in the child process despite setting O_CLOEXEC, which is weird.

I removed the second fork cause we don't need it in hypridle, which also allowed to set SA_NOCLDWAIT and stuff which is nice to have for a daemon process.

@PaideiaDilemma PaideiaDilemma force-pushed the fix-inhibit-and-process-stuff branch from d50ea65 to 29bb352 Compare February 7, 2025 13:12
@PaideiaDilemma PaideiaDilemma force-pushed the fix-inhibit-and-process-stuff branch from 219d993 to 2ac0133 Compare February 13, 2025 17:55
@fxzzi
Copy link

fxzzi commented Feb 19, 2025

can confirm this completely fixes the issue for me. System now sleeps immediately after I see hyprlock show up :)

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot to review

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.

3 participants