Linux ACPI
 help / color / mirror / Atom feed
* [PATCH] gpiolib: acpi: Add ignore_wake quirk for Gigabyte B650 GAMING X AX
@ 2026-11-19  8:38 silverducks
  2026-11-19 11:45 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: silverducks @ 2026-11-19  8:38 UTC (permalink / raw)
  To: linux-gpio
  Cc: Mika Westerberg, Andy Shevchenko, Linus Walleij,
	Bartosz Golaszewski, linux-acpi, stable, silverducks

From: silverducks <silverducks@altlinux.org>

The firmware's _AEI table on the Gigabyte B650 GAMING X AX declares AMD
GPIO pin 3 as GpioInt(Edge, ActiveLow, ExclusiveAndWake). gpiolib-acpi
requests it as "ACPI:Event" and amd_gpio_irq_set_wake() arms the hardware
S3 wake bit for that pin. The firmware then sends the signal a few seconds
after entering S3, so the machine resumes on it's own six to ten seconds
after suspend.

Pin 3 is the only wake signal the OS can see for the whole GPP7 PCIe
domain, and GPP7 has no _PRW, so ignoring this wake flag is the only way to
keep S3 reliable on this board. Wake from USB keyboards/mouse and
Wake-on-LAN through that domain is lost as a consequence, but I figure S3
not working at all is worse. The power button still wakes the machine as
normal

Quirk tested on upstream kernel v7.4-rc2.  Also tested on stable kernel
6.12, which is the version where the issue was originally diagnosed.

Signed-off-by: silverducks <silverducks@altlinux.org>
---
 drivers/gpio/gpiolib-acpi-quirks.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/gpio/gpiolib-acpi-quirks.c b/drivers/gpio/gpiolib-acpi-quirks.c
index 3f89a87601c1..5455784e67c2 100644
--- a/drivers/gpio/gpiolib-acpi-quirks.c
+++ b/drivers/gpio/gpiolib-acpi-quirks.c
@@ -465,6 +465,23 @@ static const struct dmi_system_id gpiolib_acpi_quirks[] __initconst = {
 			.ignore_wake = "GTCH7503:00@10",
 		},
 	},
+	{
+		/*
+		 * Spurious wake from S3: the firmware _AEI table declares AMD GPIO
+		 * pin 3 (GPP7 group) as Edge/ActiveLow ExclusiveAndWake, so gpiolib-acpi
+		 * requests it as ACPI:Event and amd_gpio_irq_set_wake() arms the
+		 * hardware S0i3/S3 wake bit. The firmware asserts this signal during
+		 * S3 entry regardless of the PCI wake sources configured by the OS,
+		 * waking the machine a few seconds after suspend.
+		 */
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Gigabyte Technology Co., Ltd."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "B650 GAMING X AX"),
+		},
+		.driver_data = &(struct acpi_gpiolib_dmi_quirk) {
+			.ignore_wake = "AMDI0030:00@3",
+		},
+	},
 	{} /* Terminating entry */
 };
 
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-19 11:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19  8:38 [PATCH] gpiolib: acpi: Add ignore_wake quirk for Gigabyte B650 GAMING X AX silverducks
2026-11-19 11:45 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox