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
Sleep behaves differently on Connected/Modern Standby #719
Comments
TL;DR: The behavior of Open-Shell’s sleep button varies depending upon the enabled sleep state(s). On systems with enabled "Modern Standby" (S0 Low Power Idle) the sleep state can be invoked by turning off the display programmatically [0] [1] This issue already has been raised here: #387 I’ll try to describe the issue in detail, hopefully this should allow the devs to reproduce the issue this time. Since the sleep state behavior highly differentiates between system configurations (OS/BIOS, settings/versions), this might only apply to systems similar to my setup (Dell XPS 13 9365 on Win10 20H2). Check if "Modern Standby" is enabled on system:
Behavior with "Modern Standby" and "Hibernate" available (=enabled) on the system:
Behavior with only "Modern Standby" available (=enabled) on the system:
Note: Just to clarify, this mess is due to the poor "Modern Standby" implementation by MS. Open-Shell’s behavior to enter standby, hibernate or do nothing, depending upon the sleep state configuration, is consistent with other tools, e.g. "nircmd standby" or just running "rundll32.exe powrprof.dll,SetSuspendState 0,1,0" from the command line. Test workaround:
Note: This is the same as using the "Sleep" command from the Windows Start Menu. The system should turn off the display and a few seconds later enter standby. It’s necessary that no devices (e.g. mouse) are prohibiting the system from entering standby. Entering "Modern Standby", at least on my system, can be super finicky, due to a attached mouse. Apart from the obvious, to check if the system entered the sleep state successfully, you might want to run "powercfg -SleepStudy" afterwards. Workaround for start menu "Classic style" and "Classic with two columns"
Workaround for start menu "Windows 7 style"
Proposed solution:
Ref: |
Standard API for sleep (`SetSuspendState`) seems to do nothing on systems with connected standby. Windows start menu calls `NtPowerInformation(ScreenOff)` on such systems instead. This is implemented in `shutdownux!ShutdownViewModel::_InitiatePowerTransition` function. Fixes #719
Standard API for sleep (`SetSuspendState`) seems to do nothing on systems with connected standby. Windows start menu calls `NtPowerInformation(ScreenOff)` on such systems instead. This is implemented in `shutdownux!ShutdownViewModel::_InitiatePowerTransition` function. Fixes #719
Standard API for sleep (`SetSuspendState`) seems to do nothing on systems with connected standby. Windows start menu calls `NtPowerInformation(ScreenOff)` on such systems instead. This is implemented in `shutdownux!ShutdownViewModel::_InitiatePowerTransition` function. Fixes #719
Standard API for sleep (`SetSuspendState`) seems to do nothing on systems with connected standby. Windows start menu calls `NtPowerInformation(ScreenOff)` on such systems instead. This is implemented in `shutdownux!ShutdownViewModel::_InitiatePowerTransition` function. Fixes #719
Standard API for sleep (`SetSuspendState`) seems to do nothing on systems with connected standby. Windows start menu calls `NtPowerInformation(ScreenOff)` on such systems instead. This is implemented in `shutdownux!ShutdownViewModel::_InitiatePowerTransition` function. Fixes #719
Standard API for sleep (`SetSuspendState`) seems to do nothing on systems with connected standby. Windows start menu calls `NtPowerInformation(ScreenOff)` on such systems instead. This is implemented in `shutdownux!ShutdownViewModel::_InitiatePowerTransition` function. Fixes #719
Standard API for sleep (`SetSuspendState`) seems to do nothing on systems with connected standby. Windows start menu calls `NtPowerInformation(ScreenOff)` on such systems instead. This is implemented in `shutdownux!ShutdownViewModel::_InitiatePowerTransition` function. Fixes #719
Should be fixed in latest build. |
On PCs which have Modern Standby/Connected Standby, Sleep command from Open Shell menu is making them turn off (or hibernate? I don't know) but it's definitely not entering just Sleep. Running Windows 10 20H2.
The text was updated successfully, but these errors were encountered: