You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`idle` prevents the system from going to sleep on an idle timer, while `sleep` tries to prevent the system from going to sleep explicitly by the user (Whether `sleep` also prevents idle sleep varies by OS). `sleep` is restricted and will only work under certain conditions, most notably, the computer must be on AC power (AKA plugged in, not on battery), and is not allowed on Windows on any computer that has modern standby on (Which is unfortunate as modern standby is also used in laptops not only in handheld mobile devices).
Preventing the computer from explicitly sleeping, and/or by closing the lid, is often restricted in various ways by the OS, e.g. Only on AC power, not in any PC running Windows with [Modern Standby](https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/modern-standby). Also note that Modern Standby ignores/terminates power requests on DC (Battery) power, [PowerSetRequest - Remarks](https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-powersetrequest#remarks).
0 commit comments