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

Awake not working #12326

Closed
1 task done
eirinn1975 opened this issue Jul 11, 2021 · 41 comments
Closed
1 task done

Awake not working #12326

eirinn1975 opened this issue Jul 11, 2021 · 41 comments
Assignees
Labels
Issue-Bug Something isn't working Priority-1 Bug that is high priority Product-Awake Issues regarding the PowerToys Awake utility

Comments

@eirinn1975
Copy link

Microsoft PowerToys version

0.41.4

Running as admin

  • Yes

Area(s) with issue?

Awake

Steps to reproduce

Awake doesn't work out of the box for me. I selected stay awake for two hours, and after the usual "sleep" time the computer went off.
Secondarily, I can't change the setting from the tray area icon, it just reflects what is set in the app itself.

✔️ Expected Behavior

should keep the computer alive

❌ Actual Behavior

computer goes to sleep mode regardless of the setting.

Other Software

No response

@eirinn1975 eirinn1975 added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Jul 11, 2021
@dend
Copy link
Collaborator

dend commented Jul 13, 2021

For the tray, this is tracked in #12145.

Can you clarify what the "usual sleep time" is? How did you select the 2 hour limit for Awake?

@dend dend added Product-Awake Issues regarding the PowerToys Awake utility and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Jul 13, 2021
@dend dend self-assigned this Jul 13, 2021
@eirinn1975
Copy link
Author

Sorry if it wasn't clear. I've selected keep computer awake for the next 2hrs from the power toys main window app, under awake section. By usual sleep time (in my case after 20 idle minutes the computer goes to suspend mode) I meant the sleep time is specified in the windows settings in power management.

@dend
Copy link
Collaborator

dend commented Jul 14, 2021

I can't reproduce this on my machine - can you share your logs, please? What is the version of PowerToys that you are using?

@eirinn1975
Copy link
Author

As stated in the first message, version is 0.41.4.
Where can I find the logs? I've tried looking in the PowerToys folder but haven't found anything

@jaimecbernardo
Copy link
Collaborator

Hi @eirinn1975 ,
The logs would be included in a bug report. Could you please send one?

Right-click on the PowerToys icon in the tray menu and select Report Bug
image
Drag and drop report into a GitHub comment.

Thank you!

@eirinn1975
Copy link
Author

PowerToysReport_2021-07-15-14-30-10.zip
There you are :)

@dend
Copy link
Collaborator

dend commented Jul 18, 2021

Looking at the logs, I don't see the timed keep-awake ever kicking in. Specifically, the last line in the app log is:

[2021-07-15 14:29:59.4582 INFO Awake.Core.APIHelper] Initiated indefinite keep awake in background thread: 25464. Screen on: False

This echoes what's in the Awake settings (see AwakeMode for reference on number mapping):

{"properties":{"awake_keep_display_on":false,"awake_mode":1,"awake_hours":2,"awake_minutes":0},"name":"Awake","version":"1.0"}

Which tells me that somehow the setting did not take effect. @eirinn1975 - can you try switching modes (from indefinite back to timed), and see if the issue persists?

@eirinn1975
Copy link
Author

I'll make some tests today. Is the awake feature based on some service?

@eirinn1975
Copy link
Author

After a few tests: I set up suspension and screen off to 1 minute. turned on the awake function for both screen and indefinite time on awake. screen worked, and suspension avoided. I then turned off the keep screen awake function, it worked (screen went black). Then I disabled awake, and the computer stayed on. Seems now I'm in the opposite situation...

Here is the log after these tests.
PowerToysReport_2021-07-19-08-54-53.zip

@MountainDudeWV
Copy link

I am having the same issue on my machine running Win11

@dedavis6797 dedavis6797 added the Priority-1 Bug that is high priority label Jul 28, 2021
@dedavis6797 dedavis6797 added this to the Stability Release milestone Jul 28, 2021
@weoinvm
Copy link

weoinvm commented Aug 4, 2021

Having the same issue win 10

@dend
Copy link
Collaborator

dend commented Aug 4, 2021

@weoinvm can you please provide some context as to what you are trying to do, what behavior you are seeing, and what system configuration do you have?

@K0media
Copy link

K0media commented Aug 27, 2021

I'm facing the same issue. I thought they've fixed it on the latest releases, but perhaps it's working the same way as before.

I'll provide logs soon, but I'll have to clear things first and generate a fresh one.

However, I believe this issue is related to system lock/hibernate settings/effects, not after a new startup.

I hibernate my machine a lot, and attempted to run it while I watched some stuff on Telegram Desktop, but the screen turns off even the setting of 1/2 hours is turned on.

What do you guys need besides the activity/dump logs? Anything else I could help you with to figure this out?

@Jay-o-Way
Copy link
Collaborator

@dend Any update? Since it's labeled prio-1 and 0.49 is around the corner...

@dend
Copy link
Collaborator

dend commented Oct 28, 2021

No major update yet as I haven't been able to pinpoint the issue. We might get it out post-0.49 as I am in the process of drafting up the spec for the next Awake version.

@ned-martin
Copy link

I have the same problem.

Awake does not keep the computer awake. Does not appear to make any difference what I set it to. Computer goes to sleep after the usual amount of time.

(I realise this isn't a particularly helpful report - let me know if you want logs or anything - I'm just adding it here to indicate that I'm another person finding that this tool doesn't do what it's designed to do)

@ironboy1
Copy link

ironboy1 commented Dec 7, 2021

Same behavior with my Surface Book 2...

@manic232
Copy link

Just to put in my two penny's worth. I am having the same issue with Windows 11 (all updates as of 12 Dec 2021) and Awake 0.51.1. After some work I think the issue only happens after the PC awakes from a sleep state. It works fine after a cold start. I hope this helps find the issue.

@CRi83
Copy link

CRi83 commented Dec 17, 2021

I have same issue here on one computer.

Maybe it's related to Modern Standby (S0 power state), because it works without issue on other computers that don't support modern standby...

@dend
Copy link
Collaborator

dend commented Jan 29, 2022

Interesting - thank you for the observation and detailed report @abenneke. I am currently investigating if there is a way to do this.

@dend
Copy link
Collaborator

dend commented Jan 29, 2022

An interesting tidbit in the official docs:

Windows prevents desktop applications from running during any part of modern standby after the DAM phase completes.

Wonder if this has anything to do with observed behavior. It also seems like I need to expand logging to see when the behavior occurs before this can be addressed, and for that I need to get the SYSTEM_POWER_STATE. Just need to figure out which API returns that.

@Morgy93
Copy link

Morgy93 commented Mar 11, 2022

Does not work for me as well.

If I set "Keep screen on" to true, then the display still goes dark after predefined time.

The logs constantly state:

[2022-03-11 20:16:18.3749 INFO Awake.Program] Detected a settings file change. Updating configuration...
[2022-03-11 20:16:18.3749 INFO Awake.Program] Resetting keep-awake to normal state due to settings change.
[2022-03-11 20:16:18.3749 INFO Awake.Program] Operating in passive mode (computer's standard power plan). No custom keep awake settings enabled.

So it seems that it acutally never enables the keep-awake state?

Anything I can do to help debug the issue?

@dend
Copy link
Collaborator

dend commented Mar 12, 2022

@Morgy93 are you setting a specific mode of operation other than passive after setting the display on? Are you doing this through the tray or the PowerToys settings?

Also - what OS version do you have?

@Morgy93
Copy link

Morgy93 commented Mar 12, 2022

@Morgy93 are you setting a specific mode of operation other than passive after setting the display on? Are you doing this through the tray or the PowerToys settings?

Also - what OS version do you have?

OS: Windows 11 Home 21H2 22000.556

I used the tray icon and only enabled "Keep screen on".
I'll see if it makes a difference if set via PowerToys directly.
PowerToys is not run with administrator privileges.

Edit: It seems to work if I also change the power plan accordingly - is this intended or a bug? If intended, the UX should be improved.
It does not seem to make a difference if set via tray icon or PowerToys directly.

@dend
Copy link
Collaborator

dend commented Mar 12, 2022

@morgy - "Keep Screen On" should only work when you have the active mode selected (either timed or indefinite) and not passive. I'll think through this a bit more from the UX perspective - maybe the option should not be available to keep the display on unless you've selected a compatible mode.

@Morgy93
Copy link

Morgy93 commented Mar 13, 2022

@morgy - "Keep Screen On" should only work when you have the active mode selected (either timed or indefinite) and not passive. I'll think through this a bit more from the UX perspective - maybe the option should not be available to keep the display on unless you've selected a compatible mode.

Yes, that would be great! Shall I open another issue for it?
That makes it clear so that the option is bound to an enabled Awake state.

@dend
Copy link
Collaborator

dend commented Mar 17, 2022

@Morgy93 yes please - a new issue would be great here.

@marcelgood
Copy link

marcelgood commented Nov 6, 2022

Glad I found this. So looks like this PowerToy isn't working at all. I tried to keep my Surface Book 3 awake to test something while I was away, but my test failed and apparently because Awake didn't keep the machine awake. The Event log shows that my Surface Book entered connected standby mode regardless. I think this tool doesn't work with modern standby.

The system is entering connected standby 

Reason: Idle Timeout.

@marcelgood
Copy link

So apparently setting "Put the computer to sleep" to "Never" in the regular power options doesn't work, either. It still goes to connected standby. Now I'm wondering if it has something to do with Dynamic lock, which I've configured. According to the System log, it goes to connected standby as soon as I walk away with my phone.

@marcelgood
Copy link

It's possible that I may have just figured out what's going on. I enabled the group policy to allow apps to prevent automatic sleep. By default the policy doesn't allow it. It seems to have worked. YMMV, but at least for the tests I just did my machine stayed awake.

Screenshot 2022-11-06 160220

@schnodo
Copy link

schnodo commented Nov 9, 2022

I enabled the group policy to allow apps to prevent automatic sleep. By default the policy doesn't allow it. It seems to have worked.

It seems to have worked for me, too. Thank you!

@dend
Copy link
Collaborator

dend commented Nov 17, 2022

This seems to have been addressed. That said, @marcelgood @schnodo - I am tagging this item for myself to address in documentation as well, since it's a good way to get tripped up if you don't actually have the GPO set up. Thank you for the feedback!

@dend dend closed this as completed Nov 17, 2022
@padevel
Copy link

padevel commented Nov 20, 2022

The ticket's closed but...what about those of us with Home editions of Windows. Any tips?

@dend
Copy link
Collaborator

dend commented Nov 22, 2022

@padevel if the app is not working for you, please open a new issue with repro steps along with system details 👍

@bdforbes
Copy link

@dend I don't see anything at https://learn.microsoft.com/en-us/windows/powertoys/awake about the group policy setting - is it still expected that we need to do this in order for Awake to work properly?

@looeee
Copy link

looeee commented Sep 4, 2023

For anyone else having this issue with Windows 11 Home Edition.
I think I found the issue.

If I go to the Control Panel -> Changed Advanced Power Settings, I can see that I have Sleep set to Never.
However, Hibernate was still set to 15 minutes and sure enough the computer was powering down after fifteen minutes even with Powertoys Awake set to "indefinite".

@TomRaraAvis
Copy link

For anyone else having this issue with Windows 11 Home Edition. I think I found the issue.

If I go to the Control Panel -> Changed Advanced Power Settings, I can see that I have Sleep set to Never. However, Hibernate was still set to 15 minutes and sure enough the computer was powering down after fifteen minutes even with Powertoys Awake set to "indefinite".

Yep; same for me! Changed hibernate settings and finally stayed awake. Thanks for posting @looeee !

@pucgenie
Copy link

pucgenie commented Nov 29, 2023

Hibernate setting disabled for AC (battery was set to 400000min or so), standby setting disabled for AC, gpedit allow apps to keep awake system in AC enabled, rebooted...
Powertoys Awake set to "indefinite" and enabled.
System still enters Modern Standby when locking the screen (log: Idle Timeout).
Completely preventing standby via firmware option works but is undesired.
Do you want me to create a new issue ticket?

EDIT 2024-03-29: It works somehow, just not as I thought it would, e.g. sound continues to be playing, but event log says modern standby nonetheless

@pesa79

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working Priority-1 Bug that is high priority Product-Awake Issues regarding the PowerToys Awake utility
Projects
None yet
Development

No branches or pull requests