diff mbox series

[1/1] PM: ACPI: reboot: Use S5 for reboot

Message ID 20201113170159.1044893-2-kai.heng.feng@canonical.com
State New
Headers show
Series Use ACPI S5 for reboot | expand

Commit Message

Kai-Heng Feng Nov. 13, 2020, 5:01 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1904225

After reboot, it's not possible to use hotkeys to enter BIOS setup
and boot menu on some HP laptops.

BIOS folks identified the root cause is the missing _PTS call, and
BIOS is expecting _PTS to do proper reset.

Using S5 for reboot is default behavior under Windows, "A full
shutdown (S5) occurs when a system restart is requested" [1], so
let's do the same here.

[1] https://docs.microsoft.com/en-us/windows/win32/power/system-power-states

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
[ rjw: Subject edit ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit d60cd06331a3566d3305b3c7b566e79edf4e2095 linux-next)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 kernel/reboot.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Stefan Bader Nov. 18, 2020, 8:41 a.m. UTC | #1
On 13.11.20 18:01, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1904225
> 
> After reboot, it's not possible to use hotkeys to enter BIOS setup
> and boot menu on some HP laptops.
> 
> BIOS folks identified the root cause is the missing _PTS call, and
> BIOS is expecting _PTS to do proper reset.
> 
> Using S5 for reboot is default behavior under Windows, "A full
> shutdown (S5) occurs when a system restart is requested" [1], so
> let's do the same here.
> 
> [1] https://docs.microsoft.com/en-us/windows/win32/power/system-power-states
> 
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> [ rjw: Subject edit ]
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> (cherry picked from commit d60cd06331a3566d3305b3c7b566e79edf4e2095 linux-next)
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
> ---
>  kernel/reboot.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/reboot.c b/kernel/reboot.c
> index e7b78d5ae1ab..7e5aa1f78693 100644
> --- a/kernel/reboot.c
> +++ b/kernel/reboot.c
> @@ -244,6 +244,8 @@ void migrate_to_reboot_cpu(void)
>  void kernel_restart(char *cmd)
>  {
>  	kernel_restart_prepare(cmd);
> +	if (pm_power_off_prepare)
> +		pm_power_off_prepare();
>  	migrate_to_reboot_cpu();
>  	syscore_shutdown();
>  	if (!cmd)
>
Kleber Souza Nov. 20, 2020, 10:33 a.m. UTC | #2
On 13.11.20 18:01, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1904225
> 
> After reboot, it's not possible to use hotkeys to enter BIOS setup
> and boot menu on some HP laptops.
> 
> BIOS folks identified the root cause is the missing _PTS call, and
> BIOS is expecting _PTS to do proper reset.
> 
> Using S5 for reboot is default behavior under Windows, "A full
> shutdown (S5) occurs when a system restart is requested" [1], so
> let's do the same here.
> 
> [1] https://docs.microsoft.com/en-us/windows/win32/power/system-power-states
> 
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> [ rjw: Subject edit ]
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> (cherry picked from commit d60cd06331a3566d3305b3c7b566e79edf4e2095 linux-next)
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>

Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>

> ---
>   kernel/reboot.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/reboot.c b/kernel/reboot.c
> index e7b78d5ae1ab..7e5aa1f78693 100644
> --- a/kernel/reboot.c
> +++ b/kernel/reboot.c
> @@ -244,6 +244,8 @@ void migrate_to_reboot_cpu(void)
>   void kernel_restart(char *cmd)
>   {
>   	kernel_restart_prepare(cmd);
> +	if (pm_power_off_prepare)
> +		pm_power_off_prepare();
>   	migrate_to_reboot_cpu();
>   	syscore_shutdown();
>   	if (!cmd)
>
diff mbox series

Patch

diff --git a/kernel/reboot.c b/kernel/reboot.c
index e7b78d5ae1ab..7e5aa1f78693 100644
--- a/kernel/reboot.c
+++ b/kernel/reboot.c
@@ -244,6 +244,8 @@  void migrate_to_reboot_cpu(void)
 void kernel_restart(char *cmd)
 {
 	kernel_restart_prepare(cmd);
+	if (pm_power_off_prepare)
+		pm_power_off_prepare();
 	migrate_to_reboot_cpu();
 	syscore_shutdown();
 	if (!cmd)