* [PATCH] ACPI: save NVS memory for ASUS 1025C laptop
@ 2018-07-08 14:20 Willy Tarreau
2018-07-09 9:46 ` Rafael J. Wysocki
0 siblings, 1 reply; 5+ messages in thread
From: Willy Tarreau @ 2018-07-08 14:20 UTC (permalink / raw)
To: Lan Tianyu, Rafael J . Wysocki; +Cc: linux-kernel, stable, Willy Tarreau
Every time I tried to upgrade my laptop from 3.10.x to 4.x I faced an
issue by which the fan would run at full speed upon resume. Bisecting
it showed me the issue was introduced in 3.17 by commit 821d6f0359b0
(ACPI / sleep: Do not save NVS for new machines to accelerate S3). This
code only affects machines built starting as of 2012, but this Asus
1025C laptop was made in 2012 and apparently needs the NVS data to be
saved, otherwise the CPU's thermal state is not properly reported on
resume and the fan runs at full speed upon resume.
Here's a very simple way to check if such a machine is affected :
# cat /sys/class/thermal/thermal_zone0/temp
55000
( now suspend, wait one second and resume )
# cat /sys/class/thermal/thermal_zone0/temp
0
(and after ~15 seconds the fan starts to spin)
Let's apply the same quirk as commit cbc00c13 (ACPI: save NVS memory
for Lenovo G50-45) and reuse the function it provides. Note that this
commit was already backported to 4.9.x but not 4.4.x.
Cc: <stable@vger.kernel.org> # 3.17+: requires cbc00c13
Signed-off-by: Willy Tarreau <w@1wt.eu>
---
drivers/acpi/sleep.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 974e584..af54d7b 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -338,6 +338,14 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
DMI_MATCH(DMI_PRODUCT_NAME, "K54HR"),
},
},
+ {
+ .callback = init_nvs_save_s3,
+ .ident = "Asus 1025C",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "1025C"),
+ },
+ },
/*
* https://bugzilla.kernel.org/show_bug.cgi?id=189431
* Lenovo G50-45 is a platform later than 2012, but needs nvs memory
--
2.8.0.rc2.1.gbe9624a
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ACPI: save NVS memory for ASUS 1025C laptop
2018-07-08 14:20 [PATCH] ACPI: save NVS memory for ASUS 1025C laptop Willy Tarreau
@ 2018-07-09 9:46 ` Rafael J. Wysocki
2018-07-09 9:51 ` Willy Tarreau
0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2018-07-09 9:46 UTC (permalink / raw)
To: Willy Tarreau; +Cc: linux-kernel
On Sunday, July 8, 2018 4:20:17 PM CEST Willy Tarreau wrote:
> Every time I tried to upgrade my laptop from 3.10.x to 4.x I faced an
> issue by which the fan would run at full speed upon resume. Bisecting
> it showed me the issue was introduced in 3.17 by commit 821d6f0359b0
> (ACPI / sleep: Do not save NVS for new machines to accelerate S3). This
> code only affects machines built starting as of 2012, but this Asus
> 1025C laptop was made in 2012 and apparently needs the NVS data to be
> saved, otherwise the CPU's thermal state is not properly reported on
> resume and the fan runs at full speed upon resume.
>
> Here's a very simple way to check if such a machine is affected :
>
> # cat /sys/class/thermal/thermal_zone0/temp
> 55000
>
> ( now suspend, wait one second and resume )
>
> # cat /sys/class/thermal/thermal_zone0/temp
> 0
>
> (and after ~15 seconds the fan starts to spin)
>
> Let's apply the same quirk as commit cbc00c13 (ACPI: save NVS memory
> for Lenovo G50-45) and reuse the function it provides. Note that this
> commit was already backported to 4.9.x but not 4.4.x.
>
> Cc: <stable@vger.kernel.org> # 3.17+: requires cbc00c13
> Signed-off-by: Willy Tarreau <w@1wt.eu>
Please resend this one with a CC to linux-acpi@vger.kernel.org
> ---
> drivers/acpi/sleep.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
> index 974e584..af54d7b 100644
> --- a/drivers/acpi/sleep.c
> +++ b/drivers/acpi/sleep.c
> @@ -338,6 +338,14 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
> DMI_MATCH(DMI_PRODUCT_NAME, "K54HR"),
> },
> },
> + {
> + .callback = init_nvs_save_s3,
> + .ident = "Asus 1025C",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
> + DMI_MATCH(DMI_PRODUCT_NAME, "1025C"),
> + },
> + },
> /*
> * https://bugzilla.kernel.org/show_bug.cgi?id=189431
> * Lenovo G50-45 is a platform later than 2012, but needs nvs memory
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ACPI: save NVS memory for ASUS 1025C laptop
2018-07-09 9:46 ` Rafael J. Wysocki
@ 2018-07-09 9:51 ` Willy Tarreau
0 siblings, 0 replies; 5+ messages in thread
From: Willy Tarreau @ 2018-07-09 9:51 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: linux-kernel
On Mon, Jul 09, 2018 at 11:46:23AM +0200, Rafael J. Wysocki wrote:
> Please resend this one with a CC to linux-acpi@vger.kernel.org
Will do, thank you Rafael.
Willy
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ACPI: save NVS memory for ASUS 1025C laptop
@ 2018-07-09 12:03 Willy Tarreau
2018-07-19 10:54 ` Rafael J. Wysocki
0 siblings, 1 reply; 5+ messages in thread
From: Willy Tarreau @ 2018-07-09 12:03 UTC (permalink / raw)
To: Lan Tianyu, Rafael J . Wysocki
Cc: linux-kernel, stable, linux-acpi, Willy Tarreau
Every time I tried to upgrade my laptop from 3.10.x to 4.x I faced an
issue by which the fan would run at full speed upon resume. Bisecting
it showed me the issue was introduced in 3.17 by commit 821d6f0359b0
(ACPI / sleep: Do not save NVS for new machines to accelerate S3). This
code only affects machines built starting as of 2012, but this Asus
1025C laptop was made in 2012 and apparently needs the NVS data to be
saved, otherwise the CPU's thermal state is not properly reported on
resume and the fan runs at full speed upon resume.
Here's a very simple way to check if such a machine is affected :
# cat /sys/class/thermal/thermal_zone0/temp
55000
( now suspend, wait one second and resume )
# cat /sys/class/thermal/thermal_zone0/temp
0
(and after ~15 seconds the fan starts to spin)
Let's apply the same quirk as commit cbc00c13 (ACPI: save NVS memory
for Lenovo G50-45) and reuse the function it provides. Note that this
commit was already backported to 4.9.x but not 4.4.x.
Cc: <linux-acpi@vger.kernel.org>
Cc: <stable@vger.kernel.org> # 3.17+: requires cbc00c13
Signed-off-by: Willy Tarreau <w@1wt.eu>
---
drivers/acpi/sleep.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 974e584..af54d7b 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -338,6 +338,14 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
DMI_MATCH(DMI_PRODUCT_NAME, "K54HR"),
},
},
+ {
+ .callback = init_nvs_save_s3,
+ .ident = "Asus 1025C",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "1025C"),
+ },
+ },
/*
* https://bugzilla.kernel.org/show_bug.cgi?id=189431
* Lenovo G50-45 is a platform later than 2012, but needs nvs memory
--
2.8.0.rc2.1.gbe9624a
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ACPI: save NVS memory for ASUS 1025C laptop
2018-07-09 12:03 Willy Tarreau
@ 2018-07-19 10:54 ` Rafael J. Wysocki
0 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2018-07-19 10:54 UTC (permalink / raw)
To: Willy Tarreau
Cc: Lan Tianyu, Rafael J . Wysocki, linux-kernel, stable, linux-acpi
On Monday, July 9, 2018 2:03:55 PM CEST Willy Tarreau wrote:
> Every time I tried to upgrade my laptop from 3.10.x to 4.x I faced an
> issue by which the fan would run at full speed upon resume. Bisecting
> it showed me the issue was introduced in 3.17 by commit 821d6f0359b0
> (ACPI / sleep: Do not save NVS for new machines to accelerate S3). This
> code only affects machines built starting as of 2012, but this Asus
> 1025C laptop was made in 2012 and apparently needs the NVS data to be
> saved, otherwise the CPU's thermal state is not properly reported on
> resume and the fan runs at full speed upon resume.
>
> Here's a very simple way to check if such a machine is affected :
>
> # cat /sys/class/thermal/thermal_zone0/temp
> 55000
>
> ( now suspend, wait one second and resume )
>
> # cat /sys/class/thermal/thermal_zone0/temp
> 0
>
> (and after ~15 seconds the fan starts to spin)
>
> Let's apply the same quirk as commit cbc00c13 (ACPI: save NVS memory
> for Lenovo G50-45) and reuse the function it provides. Note that this
> commit was already backported to 4.9.x but not 4.4.x.
>
> Cc: <linux-acpi@vger.kernel.org>
> Cc: <stable@vger.kernel.org> # 3.17+: requires cbc00c13
> Signed-off-by: Willy Tarreau <w@1wt.eu>
> ---
> drivers/acpi/sleep.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
> index 974e584..af54d7b 100644
> --- a/drivers/acpi/sleep.c
> +++ b/drivers/acpi/sleep.c
> @@ -338,6 +338,14 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
> DMI_MATCH(DMI_PRODUCT_NAME, "K54HR"),
> },
> },
> + {
> + .callback = init_nvs_save_s3,
> + .ident = "Asus 1025C",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
> + DMI_MATCH(DMI_PRODUCT_NAME, "1025C"),
> + },
> + },
> /*
> * https://bugzilla.kernel.org/show_bug.cgi?id=189431
> * Lenovo G50-45 is a platform later than 2012, but needs nvs memory
>
Applied, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-07-19 10:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-08 14:20 [PATCH] ACPI: save NVS memory for ASUS 1025C laptop Willy Tarreau
2018-07-09 9:46 ` Rafael J. Wysocki
2018-07-09 9:51 ` Willy Tarreau
-- strict thread matches above, loose matches on Subject: below --
2018-07-09 12:03 Willy Tarreau
2018-07-19 10:54 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).