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

Swayidle doesn't actually register a sleep inhibit #3377

Closed
rassouly opened this issue Jan 6, 2019 · 0 comments · Fixed by #3381
Closed

Swayidle doesn't actually register a sleep inhibit #3377

rassouly opened this issue Jan 6, 2019 · 0 comments · Fixed by #3381

Comments

@rassouly
Copy link
Contributor

rassouly commented Jan 6, 2019

Sway version: sway version 1.0-beta.2-100-gbb5b168b (Jan 5 2019, branch 'master')
I start swayidle with the following command

swayidle -d before-sleep 'echo "42"' 

And I get the following log when I run systemctl suspend afterwards

2019-01-06 12:33:32 - [sway/swayidle/main.c:357] Got before-sleep
2019-01-06 12:33:32 - [sway/swayidle/main.c:270] Command: echo "42"
2019-01-06 12:33:32 - [sway/swayidle/main.c:321] Setup sleep lock: echo "42"
2019-01-06 12:33:32 - [sway/swayidle/main.c:108] Got sleep lock: 9
2019-01-06 12:33:50 - [sway/swayidle/main.c:123] PrepareForSleep signal received 1
2019-01-06 12:33:50 - [sway/swayidle/main.c:53] Cmd exec echo "42"
2019-01-06 12:33:50 - [sway/swayidle/main.c:70] Spawned process echo "42"
2019-01-06 12:33:50 - [sway/swayidle/main.c:141] Prepare for sleep done
42
2019-01-06 12:33:56 - [sway/swayidle/main.c:81] Releasing sleep lock 9
2019-01-06 12:33:56 - [sway/swayidle/main.c:123] PrepareForSleep signal received 0
2019-01-06 12:33:56 - [sway/swayidle/main.c:108] Got sleep lock: 9

Even though the logs look like swayidle was able to acquire the lock, the lock is released after the system has resumed (look at the timestamps). Moreover, when I run systemd-inhibit (which lists all the inhibitors currently registered), I can't see swayidle

$ systemd-inhibit --list
WHO            UID USER PID   COMM           WHAT  WHY                                       MODE 
NetworkManager 0   root 445   NetworkManager sleep NetworkManager needs to turn off networks delay
UPower         0   root 27834 upowerd        sleep Pause device polling                      delay

2 inhibitors listed.

I looked at the logind.conf man page and couldn't find any setting that might be relevant to this issue. Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant