[PATCH 0/1][SRU][Bionic][Artful] Suspend to idle: Open lid didn't resume

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

[PATCH 0/1][SRU][Bionic][Artful] Suspend to idle: Open lid didn't resume

woodrow.shen
From: Woodrow Shen <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1771542

[Impact]
Some platforms are set suspend-to-idle (s2idle) as default suspend mode, and then they can't resume the system from opening the lid.

[Test Case]
1. echo s2idle | sudo tee /sys/power/mem_sleep
2. Close the lid
3. Open the lid

[Fix]
According a patch sent to 4.17-rc1, which was not be included before 4.15 EOL, so we cherry pick the patch to Ubuntu 4.15 kernel.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=147a7d9d25ca2551aab15071cb1f048ecd9b7953

[Regression Potential]
Per commit, this change also allows Dells XPS13 9360 blacklisted by commit 71630b7a832f to use the power button for waking up from suspend-to-idle, no regression could be happened

Rafael J. Wysocki (1):
  ACPI / PM: Do not reconfigure GPEs for suspend-to-idle

 drivers/acpi/sleep.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

--
2.7.4


--
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][SRU][Bionic][Artful] ACPI / PM: Do not reconfigure GPEs for suspend-to-idle

woodrow.shen
From: "Rafael J. Wysocki" <[hidden email]>

BugLink: http://bugs.launchpad.net/bugs/1771542

It is reported that commit 235d81a630ca (ACPI / PM: Clean up device
wakeup enable/disable code) broke wakeup from suspend-to-idle on
some platforms.  That is due to the acpi_enable_all_wakeup_gpes() in
acpi_s2idle_prepare() which needs acpi_enable_wakeup_devices() to be
called before it as the latter sets up the GPE masks used by the
former and commit 235d81a630ca removed acpi_enable_wakeup_devices()
invocation from the suspend-to-idle path.

However, acpi_enable_wakeup_devices() does more than just setting
the GPE masks and the remaining part of it is not necessary for
suspend-to-idle.  Moreover, non-wakeup GPEs are disabled on suspend-
to-idle entry to avoid spurious wakeups, but that should not be
strictly necessary any more after commit 33e4f80ee69b (ACPI / PM:
Ignore spurious SCI wakeups from suspend-to-idle) which prevents
spurious GPE wakeups from resuming the system.  The only consequence
of leaving non-wakeup GPEs enabled may be more interrupt-related
activity while suspended, which is not ideal (more energy is used
if that happens), but it is not critical too.

For this reason, drop the GPE reconfiguration from the suspend-to-idle
path entirely.

This change also allows Dells XPS13 9360 blacklisted by commit
71630b7a832f (ACPI / PM: Blacklist Low Power S0 Idle _DSM for Dell
XPS13 9360) to use the power button for waking up from suspend-
to-idle and it helps at least one other older Dell system (the
wakeup button GPE on that one is not listed in _PRW for any
devices, so it is not regarded as a wakeup one and gets disabled
on suspend-to-idle entry today).

Fixes: 235d81a630ca (ACPI / PM: Clean up device wakeup enable/disable code)
Reported-by: Du Wenkai <[hidden email]>
Tested-by: Du Wenkai <[hidden email]>
Signed-off-by: Rafael J. Wysocki <[hidden email]>
(cherry picked from commit 147a7d9d25ca2551aab15071cb1f048ecd9b7953)
Signed-off-by: Woodrow Shen <[hidden email]>
---
 drivers/acpi/sleep.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 8082871..bd15cdf 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -941,15 +941,8 @@ static int acpi_s2idle_prepare(void)
  if (lps0_device_handle) {
  acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF);
  acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY);
- } else {
- /*
- * The configuration of GPEs is changed here to avoid spurious
- * wakeups, but that should not be necessary if this is a
- * "low-power S0" platform and the low-power S0 _DSM is present.
- */
- acpi_enable_all_wakeup_gpes();
- acpi_os_wait_events_complete();
  }
+
  if (acpi_sci_irq_valid())
  enable_irq_wake(acpi_sci_irq);
 
@@ -995,8 +988,6 @@ static void acpi_s2idle_restore(void)
  if (lps0_device_handle) {
  acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT);
  acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON);
- } else {
- acpi_enable_all_runtime_gpes();
  }
 }
 
--
2.7.4


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

ACK: [PATCH 0/1][SRU][Bionic][Artful] Suspend to idle: Open lid didn't resume

AceLan Kao
In reply to this post by woodrow.shen
Acked-By: AceLan Kao <[hidden email]>

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

ACK: [PATCH 0/1][SRU][Bionic][Artful] Suspend to idle: Open lid didn't resume

Kleber Souza
In reply to this post by woodrow.shen
On 05/17/18 06:19, [hidden email] wrote:

> From: Woodrow Shen <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1771542
>
> [Impact]
> Some platforms are set suspend-to-idle (s2idle) as default suspend mode, and then they can't resume the system from opening the lid.
>
> [Test Case]
> 1. echo s2idle | sudo tee /sys/power/mem_sleep
> 2. Close the lid
> 3. Open the lid
>
> [Fix]
> According a patch sent to 4.17-rc1, which was not be included before 4.15 EOL, so we cherry pick the patch to Ubuntu 4.15 kernel.
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=147a7d9d25ca2551aab15071cb1f048ecd9b7953
>
> [Regression Potential]
> Per commit, this change also allows Dells XPS13 9360 blacklisted by commit 71630b7a832f to use the power button for waking up from suspend-to-idle, no regression could be happened
>
> Rafael J. Wysocki (1):
>   ACPI / PM: Do not reconfigure GPEs for suspend-to-idle
>
>  drivers/acpi/sleep.c | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
>

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

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

APPLIED: [PATCH 0/1][SRU][Bionic][Artful] Suspend to idle: Open lid didn't resume

Kleber Souza
In reply to this post by woodrow.shen
On 05/17/18 06:19, [hidden email] wrote:

> From: Woodrow Shen <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1771542
>
> [Impact]
> Some platforms are set suspend-to-idle (s2idle) as default suspend mode, and then they can't resume the system from opening the lid.
>
> [Test Case]
> 1. echo s2idle | sudo tee /sys/power/mem_sleep
> 2. Close the lid
> 3. Open the lid
>
> [Fix]
> According a patch sent to 4.17-rc1, which was not be included before 4.15 EOL, so we cherry pick the patch to Ubuntu 4.15 kernel.
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=147a7d9d25ca2551aab15071cb1f048ecd9b7953
>
> [Regression Potential]
> Per commit, this change also allows Dells XPS13 9360 blacklisted by commit 71630b7a832f to use the power button for waking up from suspend-to-idle, no regression could be happened
>
> Rafael J. Wysocki (1):
>   ACPI / PM: Do not reconfigure GPEs for suspend-to-idle
>
>  drivers/acpi/sleep.c | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
>

Applied to artful/master-next and bionic/master-next branch.

Thanks,
Kleber

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