From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDD04ECDE5F for ; Thu, 19 Jul 2018 10:55:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B49752084E for ; Thu, 19 Jul 2018 10:55:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B49752084E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731692AbeGSLi2 (ORCPT ); Thu, 19 Jul 2018 07:38:28 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:55192 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731656AbeGSLi1 (ORCPT ); Thu, 19 Jul 2018 07:38:27 -0400 Received: from 79.184.255.17.ipv4.supernova.orange.pl (79.184.255.17) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83) id 2e8dde5ba2417363; Thu, 19 Jul 2018 12:55:49 +0200 From: "Rafael J. Wysocki" To: Willy Tarreau Cc: Lan Tianyu , "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-acpi@vger.kernel.org Subject: Re: [PATCH] ACPI: save NVS memory for ASUS 1025C laptop Date: Thu, 19 Jul 2018 12:54:09 +0200 Message-ID: <4593492.JrdWhbroZC@aspire.rjw.lan> In-Reply-To: <1531137835-21581-1-git-send-email-w@1wt.eu> References: <1531137835-21581-1-git-send-email-w@1wt.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: > Cc: # 3.17+: requires cbc00c13 > Signed-off-by: Willy Tarreau > --- > 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!