ContextCleaner: see every entry in the Windows 11 right-click menu, and which app added it — on the Microsoft Store.
Deep Dive StayGreen

Why Does Windows Still Sleep With a Keep-Awake App Running? The Rules No App Can Override

Published October 17, 2026 Updated October 17, 2026 8 min read

Windows can still sleep with a keep-awake app running because some sleep triggers are designed to win over every app: pressing the power button, closing the lid, or choosing Sleep from Start ends power requests, and on Modern Standby laptops running on battery, Windows ends system requests a few minutes after the sleep timeout. These are documented Windows behaviors, not bugs in your app. StayGreen works within them: it holds a standard power request, pauses itself on battery and when the lid closes without an external display, and tells you when Modern Standby will override it rather than showing a reassuring green light that is wrong.

Knowing which rule you hit tells you whether there is a fix.

A keep-awake app that tells you the truth about when Windows will override it.

Get it from Microsoft

What does a keep-awake app actually do?

A proper keep-awake app asks Windows to stay awake using a power request. Microsoft documents this in PowerSetRequest and the older SetThreadExecutionState, which “enables an application to inform the system that it is in use, thereby preventing the system from entering sleep or turning off the display while the application is running.”

The key word is automatic. A power request stops Windows from sleeping because of the idle timer. It is not a lock on the machine.

Which sleep triggers override a keep-awake app?

From Microsoft’s own documentation:

TriggerWhat Microsoft saysCan any app stop it?
Power buttonPower requests “are terminated upon user-initiated system sleep entry (power button, lid close or selecting Sleep from the Start menu)“No
Lid closeSame rule, user-initiated sleepNo, but your lid setting can be changed
Start, SleepSame ruleNo
Modern Standby on battery”System and execution required power requests are terminated 5 minutes after the system sleep timeout has expired” on DC powerNo
Idle timerThis is what power requests preventYes

The SetThreadExecutionState page says the same thing in plain words: it “cannot be used to prevent the user from putting the computer to sleep,” and “applications should respect that the user expects a certain behavior when they close the lid on their laptop or press the power button.”

There is one documented exception: away mode requests on Traditional Sleep (S3) systems, which Microsoft describes as meant for “media-recording and media-distribution applications.” It is not a general keep-awake tool.

What is the Modern Standby rule?

Many current laptops use Modern Standby instead of traditional sleep. On those machines, when you are on battery, Windows lets power requests hold off sleep only for a limited time: “On Modern Standby systems on DC power, system and execution required power requests are terminated 5 minutes after the system sleep timeout has expired.”

In practice: if your battery sleep timeout is 10 minutes, a keep-awake app can hold the laptop awake for roughly 15 minutes of inactivity on battery, then Windows ends the request. Plugged in, the limit does not apply.

How do I know if my laptop uses Modern Standby?

Run powercfg /a in a terminal. Microsoft documents /availablesleepstates (short form /A) as reporting “the sleep states available on the system” and attempting to report why others are unavailable. A Modern Standby laptop lists Standby (S0 Low Power Idle).

What can I do about each one?

You wantWhat to do
Keep working with the lid closedConnect an external display and set “When I close the lid” to Do nothing for plugged in, in Control Panel power options
Stay awake on battery for a long sessionPlug in, or raise the battery sleep timeout in Settings, System, Power and battery
Stop accidental power button sleepChange what the power button does in power options
Keep a download running with the screen offUse a system-only request so only the display turns off
Find out what is blocking sleep insteadRun powercfg /requests as administrator

Our guide to powercfg /requests explains how to read the output.

Pauses on battery and lid close by design, and keeps working in clamshell mode.

Get it from Microsoft

Why does StayGreen pause on battery instead of fighting it?

Because fighting it drains batteries and fails anyway. From StayGreen’s Store listing:

  • On battery and Battery Saver, it “hands control back to your Windows power settings.”
  • When you close the lid with no external monitor attached, it pauses, and “it keeps working when one is,” so clamshell mode with a monitor works.
  • When you lock the PC, it releases the power request.
  • On Modern Standby laptops, where “Windows ends keep-awake requests a few minutes after the sleep timeout while running on battery,” StayGreen “detects the situation and says so.”

The tray icon is green while a request is held, amber while paused, and grey while idle, so you can see which state you are in.

What about apps that fake activity?

Mouse jigglers and key-press tools avoid power requests entirely by pretending a user is present. They still cannot stop the power button, lid close, or Start menu Sleep, because those are explicit user actions. They can also trip IT monitoring and keep presence apps showing you as active when you are not.

StayGreen’s optional Presence mode, off by default and clearly disclosed, sends a single unused keypress every four minutes for people who need it. Its main mode uses the documented power request only. For more, see keep the computer awake without fake input.

A checklist when Windows sleeps anyway

  1. Did you close the lid or press the power button? That always wins.
  2. Are you on battery with Modern Standby? Check powercfg /a, then plug in or raise the battery timeout.
  3. Did the keep-awake app pause? StayGreen pauses on battery, Battery Saver, lock, and lid close without a display. Check the tray icon color.
  4. Did a timed session end? StayGreen’s timed sessions end on their own.
  5. Is a per-app rule active? StayGreen’s per-app rules hold the request only while chosen apps are in the foreground.
  6. Is the request there? Run powercfg /requests as administrator and look for it.

Frequently asked questions

Can any app keep my laptop awake with the lid closed?

Not by overriding Windows. Closing the lid is user-initiated sleep. Change your lid setting, ideally only when plugged in with an external display.

Why does my laptop sleep after 15 minutes on battery even with StayGreen?

On Modern Standby laptops, Windows ends requests 5 minutes after the battery sleep timeout. StayGreen detects this and tells you.

Does StayGreen work with Group Policy sleep settings?

StayGreen uses standard power requests. If your organization manages power settings, follow its policy.

Will StayGreen keep me showing as Available in Teams?

Not on its own. Presence apps use their own idle logic. See will a keep-awake app keep Teams status green.

Try StayGreen

Get StayGreen from the Microsoft Store and read the StayGreen product page.

Stay awake when you need it, and let Windows protect your battery when you don’t.

Get it from Microsoft

Microsoft, Windows, and Teams are trademarks of the Microsoft group of companies. Other product names are trademarks of their owners. StayGreen is not affiliated with or endorsed by any of them.

Last updated 17 October 2026. Published by Automata Labs, a software company in Canada.

// release_radar

Get notified about new releases.

We build native, local-first tools for professionals who refuse SaaS fatigue. Drop your email to hear about new apps, major updates, and zero-telemetry releases as they land on the Microsoft Store. No spam — just release news.