Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp86315rwb; Sat, 17 Sep 2022 01:09:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7GbtspLSYiyvTHVaVJRO8eEd9/jMBQHjqMIMukmI6PPDU0DE2axHJwqNjXrtQ2Ev1zVAAb X-Received: by 2002:a65:464a:0:b0:434:883:ea21 with SMTP id k10-20020a65464a000000b004340883ea21mr8135009pgr.152.1663402158577; Sat, 17 Sep 2022 01:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663402158; cv=none; d=google.com; s=arc-20160816; b=EVh66yzIx7/dnGt5xHccOnLkYZGw42GKIvYjUbp/D5tdr9rpr1mI19+0Vyj+ngHdvS dhFHbgcFM1rQGXWPf/nnv2MeH61kgs1VNn+OHjPMEXHVkJx96D6UDZaTMoAM2n6AX58s MX8B3er21I/V7yxF2Xtrz4xig4Z8ea1VVemfCZLRlEVnt6vwFspnxfiD8FaRs4w4duh1 P6oPI+uyAobw2I8SvMJoM23xhY1HToRrczFv1vrXtYYA5WG/3nwxO9uz3p0VoV7UBjZn YSMT+swS0qnyEJPeLmIoVLAGwm5bWe2vJ5QvkZMnn4dfvEKQrCCHr78qzNgxw3tRMvzA NOwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:feedback-id:dkim-signature:dkim-signature; bh=gJqSfk3x4iCLYnv4jz2aPipU4stPswF3s9O1AXaEIk8=; b=H1MIdZXsgmjBceY2u1cYX05EpUg1idVP7Sub77X/Rp3thA7aPzJ9x3Bu8VLyy/h7KM bsXX417Lbzz6+XsV+8D5txojM9bCBYZuBozWn6RjeTI5SaBq69z+/xVUxV+XIuUeY9u8 2GNiLcEvo4uOACZoBC/MBcvhOmLLuA5DiHBJBHhGAIaJ6fHLv3UyrsS/zmn1/MlzPj6/ 3s+qgz7M4NhWFXGHIFP3SLmN3yQPwM21/IgKRHnHMlyNWdXBv4zV82SU5CPJrtIjIfa/ Tmz0VWWhPsoDlAB/oIgwcYvpfLM27p9Vdm9RYJ7WJERfrEBpiqJqv3eyhVT8s0bcBKAy GiUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ljones.dev header.s=fm3 header.b=KyeSiCLF; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=PpJkwH0o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f3-20020a170902ce8300b001733a212ccfsi27157356plg.330.2022.09.17.01.09.06; Sat, 17 Sep 2022 01:09:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ljones.dev header.s=fm3 header.b=KyeSiCLF; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=PpJkwH0o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229484AbiIQHfs (ORCPT + 99 others); Sat, 17 Sep 2022 03:35:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229505AbiIQHfq (ORCPT ); Sat, 17 Sep 2022 03:35:46 -0400 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 689BB2BB29; Sat, 17 Sep 2022 00:35:44 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id C63385C012F; Sat, 17 Sep 2022 03:35:40 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 17 Sep 2022 03:35:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ljones.dev; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1663400140; x= 1663486540; bh=gJqSfk3x4iCLYnv4jz2aPipU4stPswF3s9O1AXaEIk8=; b=K yeSiCLFwNgP7EFHvr5MCLdJEupXTgKLk22HkEww0btUlIV7goZWBaYt4N3jK2AAQ PwlpZJ1a5ZnyBHZnqNi5Hvce5/3iCCGyjrFtzlAJBn9dNKjcsJNHh9HTfBwh0loI LU3g+n5gyBBDehX2J6s+x3SLWL7GI981BdAv7hRAfFTfuQujKJcRIN9CHq11ZWsH E8AA/5DOqT6tPyi07l38yUvIYYLqxWegfJ88tcn1V/eXr0cBXHdl+6HUOoSlEezS A6FLxaZa4kY5oKhZQjN6dCu/ZPlC9VDxYkPx6/8YrPRUL+bkSVZYN7Y1gBc4iAKW ci1ob87whdreFCTlstFYQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1663400140; x= 1663486540; bh=gJqSfk3x4iCLYnv4jz2aPipU4stPswF3s9O1AXaEIk8=; b=P pJkwH0oLvafZS1o1BVtojvUbuXWAUM2x8m+zzfn7TQ8JdRPZy0w/c/yUS7PgRves FbWvf2Q+4Cq5Mpm51hhrdm1TDBfi8w4mxS3tVteKS85uqcFiS0pCMHVXN/UdCMd1 Tb/NW4f05PMaGGyL+F1n3309YaycxvQ3yp9U6K/3qSorhVrd6dpVUPgZFjW8Gt1S /5rtayDR/FgzbIXsyLjYCK3GVW8j7eRjcDX/7a6l0MoXuqisZ/t+ax1wneTT38Kh z9KdPykqjcYjKipAqR2okXSynYJDy6NJPNRZqXqCgHO2P9Xcoiy9xabSF2bOHY0k 2Dcl87+Dy40dUrj6wAt3w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedvuddguddvudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkuffhvfevffgjfhgtgfgfggesthhqredttderjeenucfhrhhomhepnfhu khgvucflohhnvghsuceolhhukhgvsehljhhonhgvshdruggvvheqnecuggftrfgrthhtvg hrnhepteegteefhefhteegleejudfffffghfekleeijeeugfffteeiudefvdetteeuuedv necuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehluhhkvgeslhhjohhnvghsrdguvghv X-ME-Proxy: Feedback-ID: i5ec1447f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 17 Sep 2022 03:35:36 -0400 (EDT) Message-ID: Subject: Re: [PATCH 4/4] acpi/x86: s2idle: Add a quirk for ASUS TUF Gaming A17 FA707RE From: Luke Jones To: Mario Limonciello , rafael@kernel.org, linux-kernel@vger.kernel.org Cc: catalin@antebit.com, Shyam-sundar.S-k@amd.com, Len Brown , linux-acpi@vger.kernel.org Date: Sat, 17 Sep 2022 19:35:27 +1200 In-Reply-To: <20220909180509.638-5-mario.limonciello@amd.com> References: <20220909180509.638-1-mario.limonciello@amd.com> <20220909180509.638-5-mario.limonciello@amd.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.45.3 (by Flathub.org)) MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mario, On Fri, 2022-09-09 at 13:05 -0500, Mario Limonciello wrote: > ASUS TUF Gaming A17 FA707RE has problems with ACPI events after > s2idle resume.=C2=A0 It's from a missing call to an ASL method in AMD > the s2idle calling path. Force the system to use the Microsoft > Modern Standby calling path instead. >=20 > Link: https://bugzilla.kernel.org/show_bug.cgi?id=3D216101 > Reported-and-tested-by: catalin@antebit.com > Signed-off-by: Mario Limonciello > --- > =C2=A0drivers/acpi/x86/s2idle.c | 24 ++++++++++++++++++++++++ > =C2=A01 file changed, 24 insertions(+) >=20 > diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c > index a9b0f2b54a1c..6a2c94fdbeae 100644 > --- a/drivers/acpi/x86/s2idle.c > +++ b/drivers/acpi/x86/s2idle.c > @@ -17,6 +17,7 @@ > =C2=A0 > =C2=A0#include > =C2=A0#include > +#include > =C2=A0#include > =C2=A0 > =C2=A0#include "../sleep.h" > @@ -400,6 +401,28 @@ static const struct acpi_device_id amd_hid_ids[] > =3D { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{} > =C2=A0}; > =C2=A0 > +static int lps0_prefer_microsoft(const struct dmi_system_id *id) > +{ > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0pr_debug("Preferring Microsoft= GUID.\n"); > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0prefer_microsoft_guid =3D true= ; > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return 0; > +} > + > +static const struct dmi_system_id s2idle_dmi_table[] __initconst =3D { > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{ > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0/* > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 * ASUS TUF Gaming A17 FA707RE > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 * https://bugzilla.kernel.org/show_bug.cgi?id=3D216101 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 */ > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0.callback =3D lps0_prefer_microsoft, > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0.matches =3D { > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0DMI_MATCH= (DMI_SYS_VENDOR, "ASUSTeK COMPUTER > INC."), > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0DMI_MATCH= (DMI_PRODUCT_NAME, "ASUS TUF Gaming > A17"), > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0}, > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0}, > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{} > +}; > + > =C2=A0static int lps0_device_attach(struct acpi_device *adev, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 const struct acpi_device_id *not_used) > =C2=A0{ > @@ -568,6 +591,7 @@ static const struct platform_s2idle_ops > acpi_s2idle_ops_lps0 =3D { > =C2=A0 > =C2=A0void acpi_s2idle_setup(void) > =C2=A0{ > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0dmi_check_system(s2idle_dmi_ta= ble); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0acpi_scan_add_handler(&lp= s0_handler); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0s2idle_set_ops(&acpi_s2id= le_ops_lps0); > =C2=A0} I'm confirming that this works for another laptop with the same issue - the GA402R series. The diff as follows (I'm unsure of how best to submit this as it is dependant on your work - I don't need attribution for this): drivers/acpi/x86/s2idle.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index e2b73809ab50..0c8348de5cbc 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -420,6 +420,17 @@ static const struct dmi_system_id s2idle_dmi_table[] __initconst =3D { DMI_MATCH(DMI_PRODUCT_NAME, "ASUS TUF Gaming A17"), }, }, + { + /* + * ASUS ROG Zephyrus G14 GA402R series + * These laptops have a similar issue to the FA707RE + */ + .callback =3D lps0_prefer_microsoft, + .matches =3D { + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), + DMI_MATCH(DMI_PRODUCT_NAME, "ROG Zephyrus G14 GA402R"), + }, + }, {} }; =20 --=20 2.37.3