-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
timer keeps running while sleeping #73
Comments
Yup, I am facing the same issue. I tried to inhibit the suspension by using a "lock" file:
and
And also doing the same when I encounter a lid close event and lid open event. But it seems like that workaround fails. |
can confirm i'm facing the same issue. this happens on both my desktop and my laptop. suspending and then immediately waking is fine, but waking after a long time of sleep (my sleep timeout is set to 30 minutes) causes the system to immediately suspend again. |
I've also tried another workaround, which is to kill hypridle using Killing hypridle works, and the timer stops (cause duh), but hypridle doesn't restart, nor do the So, in the end, this workaround appears to fail as well. |
The exact same behavior is occurring to me also. Laptop immediately suspends when I open the lid. |
I've noticed that if I suspend the laptop manually (by running My theory is that hypridle does not recognize the lid switch event as activity and does not reset the idle timer when waking the machine by opening the lid. |
Same here. It doesn't always happen, but when it happens it's usually after I've closed the lid and let it go to suspend-then-hibernate and let it go to hibernate 4 hours later. When I resume the laptop from hibernation it immediately goes back to suspend. |
What about using hypridle as a systemd-service, and stopping it before suspend and starting it after suspend? |
I've found an actual workaround for the moment. I'd much rather have it all handled solely through hypridle, but this works for now. If you remove the suspend block from hypridle and use In my case, I created
And a standard hypridle config -
|
came here from a reddit post im using this restarting hypridle on wake general={
"lock_cmd": ["pidof hyprlock || hyprlock"],
"unlock_cmd": ["pkill -USR1 hyprlock"],
"before_sleep_cmd": ["loginctl lock-session"],
"after_sleep_cmd": [
"(kill $(pidof hypridle) || true) && (pidof hypridle || hypridle)"
],
"ignore_dbus_inhibit": [False],
},
listener=[
# Screenlock
{
"timeout": [300],
"on-timeout": ["loginctl lock-session"],
},
# Suspend
{
"timeout": [600],
"on-timeout": ["systemctl suspend"],
},
], |
@fjueic , it looks like the |
yes i didn't copy entire file, just wanted to give to an idea
i don't use hyprlang to configure hyprwm programs like hyprpaper, hypridle, and hyprland itself. I have a custom library(just one big file) written in python. So, i just wanted to give a reference as there was no point in sharing the irrelevant python code |
Hey, regarding this workaround, do we know for sure if, "receiving a dbus post prepare_sleep event" as the wiki puts it, is triggered when the system goes into sleep mode or when it wakes up? I have yet to test it myself, but the wording of the description gives me the impression the command triggers when the system actually goes to sleep rather than when it comes out of sleep. |
I have one of my listeners set to
suspend
. However, if I manually suspend (like close the lid), it seems that hypridle's timer keeps running. If I don't resume my laptop until after the suspend timeout period has lapsed, as soon as my laptop finishes resuming, hypridle immediately suspends it again.Can you either pause the timer while sleeping, or reset the timer or restart hypridle on resume?
This was not a problem with swayidle.
The text was updated successfully, but these errors were encountered: