[F/G/Unstable/OEM-5.6] [PATCH 0/1] Use ACPI S5 for reboot

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[F/G/Unstable/OEM-5.6] [PATCH 0/1] Use ACPI S5 for reboot

Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1904225

[Impact]
On some HP laptops, BIOS hotkeys don't work right after reboot, becuase
OS doesn't call _PTS to indicate ACPI it's rebooting.

[Fix]
Follow Windows and use S5 for reboot.

[Test case]
Reboot and see if hotkeys like F10/F11 can trigger BIOS functions.
Hotkeys work great with the patch applied.

[Where problems could occur]
If there are platforms don't expect S5 for reboot then there could be
unexpected result.
However Windows uses S5 so that's rather unlikely.

Kai-Heng Feng (1):
  PM: ACPI: reboot: Use S5 for reboot

 kernel/reboot.c | 2 ++
 1 file changed, 2 insertions(+)

--
2.28.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

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

Kai-Heng Feng
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 <[hidden email]>
[ rjw: Subject edit ]
Signed-off-by: Rafael J. Wysocki <[hidden email]>
(cherry picked from commit d60cd06331a3566d3305b3c7b566e79edf4e2095 linux-next)
Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 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)
--
2.28.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

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

Stefan Bader-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 <[hidden email]>
> [ rjw: Subject edit ]
> Signed-off-by: Rafael J. Wysocki <[hidden email]>
> (cherry picked from commit d60cd06331a3566d3305b3c7b566e79edf4e2095 linux-next)
> Signed-off-by: Kai-Heng Feng <[hidden email]>
Acked-by: Stefan Bader <[hidden email]>

> ---
>  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)
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Kleber Souza
In reply to this post by Kai-Heng Feng
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 <[hidden email]>
> [ rjw: Subject edit ]
> Signed-off-by: Rafael J. Wysocki <[hidden email]>
> (cherry picked from commit d60cd06331a3566d3305b3c7b566e79edf4e2095 linux-next)
> Signed-off-by: Kai-Heng Feng <[hidden email]>

Acked-by: Kleber Sacilotto de Souza <[hidden email]>

> ---
>   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)
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED: [F/G] [PATCH 0/1] Use ACPI S5 for reboot

William Breathitt Gray
In reply to this post by Kai-Heng Feng
On Sat, Nov 14, 2020 at 01:01:58AM +0800, Kai-Heng Feng wrote:

> BugLink: https://bugs.launchpad.net/bugs/1904225
>
> [Impact]
> On some HP laptops, BIOS hotkeys don't work right after reboot, becuase
> OS doesn't call _PTS to indicate ACPI it's rebooting.
>
> [Fix]
> Follow Windows and use S5 for reboot.
>
> [Test case]
> Reboot and see if hotkeys like F10/F11 can trigger BIOS functions.
> Hotkeys work great with the patch applied.
>
> [Where problems could occur]
> If there are platforms don't expect S5 for reboot then there could be
> unexpected result.
> However Windows uses S5 so that's rather unlikely.
>
> Kai-Heng Feng (1):
>   PM: ACPI: reboot: Use S5 for reboot
>
>  kernel/reboot.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> --
> 2.28.0
Applied to Focal:linux and Groovy:linux.

William Breathitt Gray

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (849 bytes) Download Attachment