All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luke Jones <luke@ljones.dev>
To: Mario Limonciello <mario.limonciello@amd.com>,
	rafael@kernel.org, linux-kernel@vger.kernel.org
Cc: catalin@antebit.com, Shyam-sundar.S-k@amd.com,
	Len Brown <lenb@kernel.org>,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH 4/4] acpi/x86: s2idle: Add a quirk for ASUS TUF Gaming A17 FA707RE
Date: Sat, 17 Sep 2022 19:35:27 +1200	[thread overview]
Message-ID: <a5f1976a3b8e905a09ebb08f3baad0996101c5bb.camel@ljones.dev> (raw)
In-Reply-To: <20220909180509.638-5-mario.limonciello@amd.com>

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.  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.
> 
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=216101
> Reported-and-tested-by: catalin@antebit.com
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
>  drivers/acpi/x86/s2idle.c | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> 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 @@
>  
>  #include <linux/acpi.h>
>  #include <linux/device.h>
> +#include <linux/dmi.h>
>  #include <linux/suspend.h>
>  
>  #include "../sleep.h"
> @@ -400,6 +401,28 @@ static const struct acpi_device_id amd_hid_ids[]
> = {
>         {}
>  };
>  
> +static int lps0_prefer_microsoft(const struct dmi_system_id *id)
> +{
> +       pr_debug("Preferring Microsoft GUID.\n");
> +       prefer_microsoft_guid = true;
> +       return 0;
> +}
> +
> +static const struct dmi_system_id s2idle_dmi_table[] __initconst = {
> +       {
> +               /*
> +                * ASUS TUF Gaming A17 FA707RE
> +                * https://bugzilla.kernel.org/show_bug.cgi?id=216101
> +                */
> +               .callback = lps0_prefer_microsoft,
> +               .matches = {
> +                       DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER
> INC."),
> +                       DMI_MATCH(DMI_PRODUCT_NAME, "ASUS TUF Gaming
> A17"),
> +               },
> +       },
> +       {}
> +};
> +
>  static int lps0_device_attach(struct acpi_device *adev,
>                               const struct acpi_device_id *not_used)
>  {
> @@ -568,6 +591,7 @@ static const struct platform_s2idle_ops
> acpi_s2idle_ops_lps0 = {
>  
>  void acpi_s2idle_setup(void)
>  {
> +       dmi_check_system(s2idle_dmi_table);
>         acpi_scan_add_handler(&lps0_handler);
>         s2idle_set_ops(&acpi_s2idle_ops_lps0);
>  }

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 = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "ASUS TUF Gaming
A17"),
 		},
 	},
+	{
+		/*
+		 * ASUS ROG Zephyrus G14 GA402R<variant> series
+		 * These laptops have a similar issue to the FA707RE
+		 */
+		.callback = lps0_prefer_microsoft,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER
INC."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "ROG Zephyrus G14
GA402R"),
+		},
+	},
 	{}
 };
 
-- 
2.37.3


  parent reply	other threads:[~2022-09-17  7:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09 18:05 [PATCH 0/4] Fixups for s2idle on ASUS Rembrandt laptop Mario Limonciello
2022-09-09 18:05 ` [PATCH 1/4] acpi/x86: s2idle: Move _HID handling for AMD systems into structures Mario Limonciello
2022-09-09 18:05 ` [PATCH 2/4] acpi/x86: s2idle: If a new AMD _HID is missing assume Rembrandt Mario Limonciello
2022-09-09 18:05 ` [PATCH 3/4] acpi/x86: s2idle: Add module parameter to prefer Microsoft GUID Mario Limonciello
2022-09-09 18:05 ` [PATCH 4/4] acpi/x86: s2idle: Add a quirk for ASUS TUF Gaming A17 FA707RE Mario Limonciello
2022-09-12 14:59   ` Philipp Zabel
2022-09-17  7:35   ` Luke Jones [this message]
2022-09-17 13:26     ` Mario Limonciello
2022-09-12 14:56 ` [PATCH 0/4] Fixups for s2idle on ASUS Rembrandt laptop Philipp Zabel
2022-09-12 14:58   ` Limonciello, Mario
2022-09-12 15:06     ` Philipp Zabel
2022-09-12 15:11       ` Limonciello, Mario
2022-09-18  8:37       ` Luke Jones
2022-09-18 19:46         ` Mario Limonciello
2022-09-18 22:17           ` Luke Jones
2022-09-19 13:00             ` Mario Limonciello

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a5f1976a3b8e905a09ebb08f3baad0996101c5bb.camel@ljones.dev \
    --to=luke@ljones.dev \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=catalin@antebit.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=rafael@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.