stretchly
stretchly copied to clipboard
[Bug]: Stretchly prevents system sleep on Debian with Gnome
Version
- [X] I'm using version 1.6.0
Known issues
- [X] I've checked Known issues
Existing issues
- [X] I've checked Existing issues
What operating system are you using?
Linux
Operating System Version
Debian
Reproduction steps
- Let the computer be idle
Expected Behavior
Computer sleeps
Actual Behavior
Computer doenst sleep while stretchly is running.
Relevant log output
No response
Preferences
No response
Additional information
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Interesting, I don't even know where to look. I have Debian with KDE. Could you please make a screenshot of your "Sleep" settings?
I believe it is the notifications. Just a minute ago my laptop had its screen off, and suddenly it went on, on the bottom displayed an information about a new notification from Stretchly.
Maybe try disabling notifications in Preferences -> Schedule?
What is your break schedule setup?
I'm trying your settings on my work ubuntu with gnome but all seems good, system went to sleep
I will investigate more, when I am back at that laptop!
I just had the time to test.
- There was no other app running
- I set the sleep timer to 700 seconds using dconf-editor
Without Stretchly: Sleep after 700 seconds With Stretchly: No Sleep. It didn't matter if I had notifications enabled.
Also the "natural break" detection doesn't seem to work, when I came back stretchly started a large break immidiately after.
Do you know if there is a log, about what keeps the system awake?
Do you know if there is a log, about what keeps the system awake?
No idea, never heard about it and could not google anything.
Could also paste the logs from your test here? Preferences -> About -> Ctrl+D -> logsFile
You need to find the inhibitors, a.k.a. which processes are preventing your suspend:
systemd-inhibit --list --mode=block That will list the processes which do not "want to sleep"
says stackexchange. Will try it later and also send the log
18.05.2021 13:40:21 Jan Hovancik @.***>:
Do you know if there is a log, about what keeps the system awake?
No idea, never heard about it and could not google anything.
Could also paste the logs from your test here? Preferences -> About -> Ctrl+D -> logsFile
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub[https://github.com/hovancik/stretchly/issues/931#issuecomment-843095301], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AQEZOY4ZCU6EJKQXPNQ2FDDTOJGZ5ANCNFSM43O5LZVA]. [data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD8AAAA/CAYAAABXXxDfAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAAmSURBVGiB7cEBDQAAAMKg909tDwcUAAAAAAAAAAAAAAAAAAAAJwY+QwABivJx1AAAAABJRU5ErkJggg==###24x24:true###][Verfolgungsbild][https://github.com/notifications/beacon/AQEZOY4QWONZ5TFNMPB3AG3TOJGZ5A5CNFSM43O5LZVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGJAJ2BI.gif]
Here's what I get:
➜ ~ systemd-inhibit --list --mode=block
WHO UID USER PID COMM WHAT WHY MODE
PowerDevil 1000 conta 1328 org_kde_powerde handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch KDE handles power events block
1 inhibitors listed.
I started stretchly at 11:10 and then let the laptop sit idle:
[2021-05-23 11:10:11.884] [info] Stretchly: initializing...
[2021-05-23 11:10:11.897] [info] Stretchly: loading preferences
[2021-05-23 11:10:11.906] [info] Stretchly: starting Idle time monitoring
[2021-05-23 11:10:11.906] [info] Stretchly: starting Do Not Disturb monitoring
[2021-05-23 11:20:12.194] [info] Stretchly: showing window 1 of 1
[2021-05-23 11:20:12.197] [info] Stretchly: starting Mini Break
[2021-05-23 11:20:42.201] [info] Stretchly: finishing Mini Break
[2021-05-23 11:30:42.472] [info] Stretchly: showing window 1 of 1
[2021-05-23 11:30:42.475] [info] Stretchly: starting Mini Break
[2021-05-23 11:31:12.479] [info] Stretchly: finishing Mini Break
[2021-05-23 11:41:12.756] [info] Stretchly: showing window 1 of 1
[2021-05-23 11:41:12.758] [info] Stretchly: starting Mini Break
[2021-05-23 11:43:00.385] [info] System: suspend or lock
[2021-05-23 11:43:00.388] [info] Stretchly: finishing Long Break
[2021-05-23 11:43:00.396] [info] Stretchly: pausing breaks for 1
[2021-05-23 11:47:26.113] [info] System: resume or unlock
[2021-05-23 11:47:26.116] [info] Stretchly: resuming breaks
Interestingly it managed to sleep after 30 minutes.
Systemd also doesnt list anything out of order:
WHO UID USER PID COMM WHAT WHY MODE
xxx 1000 xxx 2456 gsd-media-keys handle-power-key:handle-suspend-key:handle-hibernate-key GNOME handling keypresses block
1 inhibitors listed.
Interesting then, not sure. Might be worth trying to see what systemD will show when system seems not to go to sleep. I found that there is some API in electron to disable sleep but I am not using it.
Hi, I have similar issue and I don't think it's only related to system sleep. In my case, if there is no activity for 10m, monitor should be turned off (no sleep, just screen/monitor).
Stretchly notifications are kind of "sticky". When it appears (eg. "Mini break in 10 sec") it will stay on the screen until there is any kind of user-input activity - moving a mouse, click on keyboard - only then it disappears.
But when there is no activity (which is eg. when I'm not in front of my laptop), notification stays visible on the screen and that is probably what causes that system doesnt go sleep or monitor doesn't turn off cause the system sees that notification as some kind of activity that it prevents it from going forward with sleep/screen off.
Summary: I don't think it's related to sleep/systemd, but it's related to stretchly notifications not disappearing when there is no user-input activity.
This is GNOME on Fedora, so my another assumption is that is related to sth in GNOME notification system which works someway differently than in KDE.
@ekasprzak could you try disabling pre break notifications and see what happens? It's in Schedule tab.
@hovancik yes, I meant those notifications exactly, I was pretty sure that those are the issue (not the notification itself, but its "stickiness" in GNOME), but I waited to actually test it and yes, I can confirm that at least in my case it makes screen/monitor auto off work.
@tzugen I know it's been some time, but if you're still using Stretchly, maybe you could check if this solves your problem with system sleep (then, we would be sure that it's the sticky notification, not Stretchly itself issue) ?
As a summary - I don't consider it as solved, cause I really like this pre break notification", so I have at least a short moment to finish/pause what I was doing and prepare for a break (instead of immediately click on skip when I'm in the middle of sth and there is no pre break notification).
@ekasprzak can you try running Stretchly from source, specifically PR linked above? I think it should fix it.
@ekasprzak can you try running Stretchly from source, specifically PR linked above? I think it should fix it.
Yes, it does! Notification disappears by itself, doesn't prevent screen going off, which was my main issue. But, because I kind of stole this issue (preventing sleeping) because I was pretty sure it's connected so tested that too, enabled system auto sleep and this also worked after inactivity time)
So, all good (Fedora 37 Workstation/GNOME), thanks a lot @hovancik!