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

Allow awake to keep device awake even if lid is closed. #16422

Closed
vixalien opened this issue Feb 17, 2022 · 9 comments
Closed

Allow awake to keep device awake even if lid is closed. #16422

vixalien opened this issue Feb 17, 2022 · 9 comments
Assignees
Labels
Idea-Enhancement New feature or request on an existing product Product-Awake Issues regarding the PowerToys Awake utility

Comments

@vixalien
Copy link

Description of the new feature / enhancement

On laptops (or other devices with lids) the awake module has one weird quirk: It does not handle closing of the rid. I believe it would be very helpful if the device could be forced to be awake even if the lid is closed (or an option that says so).

Scenario when this would be used?

When you close the lid, the device needn't sleep, it should instead respect your Awake configuration i.e if you set it to be awake indefinitely, closing the lid force the device to stay awake indefinitely.

As this can be energy consuming, an option can be provided that enables this feature if possible.

Supporting information

No response

@vixalien vixalien added the Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams label Feb 17, 2022
@crutkas
Copy link
Member

crutkas commented Feb 17, 2022

xref #13622 lets keep this one open as we're seeing requests for it. @runxel as fyi as they did the original ask.

@crutkas crutkas added Idea-New PowerToy Suggestion for a PowerToy 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 Feb 17, 2022
@crutkas
Copy link
Member

crutkas commented Feb 17, 2022

and xref #13785

@dend dend self-assigned this Mar 18, 2022
@dend dend added Idea-Enhancement New feature or request on an existing product and removed Idea-New PowerToy Suggestion for a PowerToy labels Mar 18, 2022
@dend
Copy link
Collaborator

dend commented Mar 18, 2022

Interesting - I will have to research and see if this is possible without messing with the power settings (or, maybe in this context we need to mess with the power settings). Last I checked this was only controlled by the power plan settings, but maybe things changed.

@dend
Copy link
Collaborator

dend commented Mar 21, 2022

So theoretically possible - that's good. Would also need to check if listening to events means that I can override power settings (i.e., can I actually keep the machine awake despite the lid being closed).

Now to the real question - should Awake be handling this?

My hunch is that this needs to be a very explicit opt-in and never the default, to prevent unintended battery drains or overheating of the machine (you wouldn't want the laptop to stay awake as you closed it and put it in the backpack).

@gexgd0419
Copy link

Maybe we could use the away mode.

When away mode is enabled, any operation that would put the computer to sleep puts it in away mode instead. When away mode is activated, it turns off the display and mutes the audio, but the system will still be awake.

SetThreadExecutionState(ES_AWAYMODE_REQUIRED | ES_SYSTEM_REQUIRED | ES_CONTINUOUS); would do this.

However, when away mode is enabled, other actions such as pressing the "sleep" button or choosing Power > Sleep in the Start menu will not put the system to sleep, either.

@ChristopherTheBoss
Copy link

Yeah, I assumed that was the only usage for Awake...to keep a laptop awake with the lid closed...I'm guilty of keeping my desktop powered on at all times I guess. I've closed the lid, expecting a file to download only to return to no progress. Would definitely be a good feature.

@nopeless
Copy link

@crutkas I would like to contribute to this issue if overriding closing lid is allowed (I believe this would cause confusion so I am asking with caution)

https://github.com/seerge/g-helper/blob/382080922d45733f995a4fbf2c0c68ebaa8f6746/app/Helpers/ClamshellModeControl.cs#L124-L140

This is how G-Helper implemented it. They have a configurable default when disengaged. I think this should be good enough

@dend
Copy link
Collaborator

dend commented Sep 25, 2024

Consolidating this issue in #34479.

@dend dend closed this as completed Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Idea-Enhancement New feature or request on an existing product Product-Awake Issues regarding the PowerToys Awake utility
Projects
Status: Done
Development

No branches or pull requests

6 participants