PM: hibernate: Allow hybrid sleep to work with s2idle
Subsystems (2)
PATCH 1/1 PM: hibernate: Allow hybrid sleep to work with s2idle
Hybrid sleep is currently hardcoded to only operate with S3 even on systems that might not support it.
Instead of assuming this mode is what the user wants to use, for hybrid sleep follow the setting of mem_sleep_current which will respect mem_sleep_default kernel command line and policy decisions made by the presence of the FADT low power idle bit.
--- kernel/power/hibernate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/power/hibernate.c +1 -1
@@ -641,7 +641,7 @@ static void power_down(void)int error;if (hibernation_mode ==HIBERNATION_SUSPEND ) { - error =suspend_devices_and_enter (PM_SUSPEND_MEM ); + error =suspend_devices_and_enter (mem_sleep_current);if (error) { hibernation_mode = hibernation_ops ? HIBERNATION_PLATFORM :
Signature · 1 line
2.34.1
Quoted 8 lines · Mario Limonciello
Hybrid sleep is currently hardcoded to only operate with S3 even on systems that might not support it.
Instead of assuming this mode is what the user wants to use, for hybrid sleep follow the setting of
mem_sleep_currentwhich will respectmem_sleep_defaultkernel command line and policy decisions made by the presence of the FADT low power idle bit.
Quoted 6 lines
Reported-and-tested-by kolAflash <[email protected]>Signed-off-by Mario Limonciello <[email protected]>--- kernel/power/hibernate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Hi Rafael,
This got sent near the merge window a few weeks ago. It's a trivial fix so I just want to make sure it didn't get misplaced.
Thanks!
Quoted 14 lines
kernel/power/hibernate.c +1
-1@@ -641,7 +641,7 @@ static void power_down(void)int error;if (hibernation_mode ==HIBERNATION_SUSPEND ) { - error =suspend_devices_and_enter (PM_SUSPEND_MEM ); + error =suspend_devices_and_enter (mem_sleep_current);if (error) { hibernation_mode = hibernation_ops ? HIBERNATION_PLATFORM :
Rafael J. Wysocki
maintainerQuoted 17 lines · Mario
Quoted 8 lines · Mario Limonciello
Hybrid sleep is currently hardcoded to only operate with S3 even on systems that might not support it.
Instead of assuming this mode is what the user wants to use, for hybrid sleep follow the setting of
mem_sleep_currentwhich will respectmem_sleep_defaultkernel command line and policy decisions made by the presence of the FADT low power idle bit.Quoted 6 lines
Reported-and-tested-by kolAflash <[email protected]>Signed-off-by Mario Limonciello <[email protected]>--- kernel/power/hibernate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 4 lines
Hi Rafael,
This got sent near the merge window a few weeks ago. It's a trivial fix so I just want to make sure it didn't get misplaced.
It wasn't lost.
I've just applied it for -rc3 (and added a Fixes: tag that was missing to it).
Thanks!
Quoted 15 lines
Quoted 14 lines
kernel/power/hibernate.c +1
-1@@ -641,7 +641,7 @@ static void power_down(void)int error;if (hibernation_mode ==HIBERNATION_SUSPEND ) { - error =suspend_devices_and_enter (PM_SUSPEND_MEM ); + error =suspend_devices_and_enter (mem_sleep_current);if (error) { hibernation_mode = hibernation_ops ? HIBERNATION_PLATFORM :