Skip to content

Commit d0f61e8

Browse files
superm1rafaeljw
authored andcommitted
ACPI: x86: s2idle: Add a quirk for ASUS TUF Gaming A17 FA707RE
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: [email protected] Reviewed-by: Philipp Zabel <[email protected]> Tested-by: Philipp Zabel <[email protected]> # GA402RJ Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent a0bc002 commit d0f61e8

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

drivers/acpi/x86/s2idle.c

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
#include <linux/acpi.h>
1919
#include <linux/device.h>
20+
#include <linux/dmi.h>
2021
#include <linux/suspend.h>
2122

2223
#include "../sleep.h"
@@ -400,6 +401,28 @@ static const struct acpi_device_id amd_hid_ids[] = {
400401
{}
401402
};
402403

404+
static int lps0_prefer_microsoft(const struct dmi_system_id *id)
405+
{
406+
pr_debug("Preferring Microsoft GUID.\n");
407+
prefer_microsoft_dsm_guid = true;
408+
return 0;
409+
}
410+
411+
static const struct dmi_system_id s2idle_dmi_table[] __initconst = {
412+
{
413+
/*
414+
* ASUS TUF Gaming A17 FA707RE
415+
* https://bugzilla.kernel.org/show_bug.cgi?id=216101
416+
*/
417+
.callback = lps0_prefer_microsoft,
418+
.matches = {
419+
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
420+
DMI_MATCH(DMI_PRODUCT_NAME, "ASUS TUF Gaming A17"),
421+
},
422+
},
423+
{}
424+
};
425+
403426
static int lps0_device_attach(struct acpi_device *adev,
404427
const struct acpi_device_id *not_used)
405428
{
@@ -566,8 +589,9 @@ static const struct platform_s2idle_ops acpi_s2idle_ops_lps0 = {
566589
.end = acpi_s2idle_end,
567590
};
568591

569-
void acpi_s2idle_setup(void)
592+
void __init acpi_s2idle_setup(void)
570593
{
594+
dmi_check_system(s2idle_dmi_table);
571595
acpi_scan_add_handler(&lps0_handler);
572596
s2idle_set_ops(&acpi_s2idle_ops_lps0);
573597
}

0 commit comments

Comments
 (0)