* [PATCH] gpiolib: acpi: Ignore AC adapter wakeup on ASUS FA507
@ 2026-09-27 1:42 Bartu Alev
2026-09-28 9:41 ` Mika Westerberg
2026-09-28 9:54 ` Andy Shevchenko
0 siblings, 2 replies; 5+ messages in thread
From: Bartu Alev @ 2026-09-27 1:42 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Andy Shevchenko, Mika Westerberg
Cc: Mario Limonciello, Hans de Goede, linux-gpio, linux-acpi,
linux-kernel, Bartu Alev
The ASUS TUF Gaming A15 FA507 wakes from s2idle whenever the AC
adapter is plugged in or unplugged.
In the CPMGPIO0 SSDT, GPIO pin 23 (0x0017) is declared in the
\_SB.GPIO._AEI resource template as:
GpioInt (Edge, ActiveBoth, ExclusiveAndWake, PullNone, 0x0000,
"\\_SB.GPIO", 0x00, ResourceConsumer, ,)
{ 0x0017 }
and the corresponding \_SB.GPIO._EVT handler issues a device wake
notification for the AC adapter on pin 23 events:
Case (0x17)
{
Notify (\_SB.ACAD, 0x02) // Device Wake
Sleep (0x05)
Notify (\_SB.ACAD, 0x80) // Status Change
}
Both AC plug and unplug transitions therefore trigger a spurious
wakeup from s2idle. Add an ignore_wake quirk for this pin.
Signed-off-by: Bartu Alev <bartualev@gmail.com>
---
Hi,
I tested this quirk on my FA507NV and it completely resolves the
s2idle wake issue.
FA507 ACPI disassembly:
https://gitlab.com/voidvore/reverse-engineering/-/blob/fa507/fa507/FA507NV_FA507NV.318/disassembly/ssdt26-cpmgpio0.dsl#L263-269
FA506 (same pin 23 handler):
https://gitlab.com/asus-linux/reverse-engineering/-/blob/master/FA506NCR_FA506NCR.304/disassembly/ssdt8.dsl#L263-268
GA403UI (same pin 23 handler):
https://gitlab.com/asus-linux/reverse-engineering/-/blob/master/uncategorized/GA403UI/ssdt18.dsl#L267-273
I have one question: this issue is probably present across the whole
TUF series. If I acpidump more TUF models in the future and they all map
to the same GPIO pin, should the quirk list the board names one by
one (FA507, FA506, FA707, ...) or match on the product family ('ASUS TUF
Gaming A15', 'ASUS TUF Gaming A16' or 'ASUS TUF Gaming')?
The DMI outputs on my FA507NV laptop are as follows:
board_name: FA507NV
board_vendor: ASUSTeK COMPUTER INC.
product_family: ASUS TUF Gaming A15
product_name: ASUS TUF Gaming A15 FA507NV_FA507NV
Thanks,
Bartu
drivers/gpio/gpiolib-acpi-quirks.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpio/gpiolib-acpi-quirks.c b/drivers/gpio/gpiolib-acpi-quirks.c
index a0116f004975..6d56ea0d0581 100644
--- a/drivers/gpio/gpiolib-acpi-quirks.c
+++ b/drivers/gpio/gpiolib-acpi-quirks.c
@@ -392,6 +392,15 @@ static const struct dmi_system_id gpiolib_acpi_quirks[] __initconst = {
.ignore_wake = "VEN_0488:00@355",
},
},
+ {
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "FA507"),
+ },
+ .driver_data = &(struct acpi_gpiolib_dmi_quirk) {
+ .ignore_wake = "AMDI0030:00@23",
+ },
+ },
{} /* Terminating entry */
};
--
2.55.0
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] gpiolib: acpi: Ignore AC adapter wakeup on ASUS FA507
2026-09-27 1:42 [PATCH] gpiolib: acpi: Ignore AC adapter wakeup on ASUS FA507 Bartu Alev
@ 2026-09-28 9:41 ` Mika Westerberg
2026-09-28 10:05 ` Andy Shevchenko
2026-09-28 13:05 ` Mario Limonciello
2026-09-28 9:54 ` Andy Shevchenko
1 sibling, 2 replies; 5+ messages in thread
From: Mika Westerberg @ 2026-09-28 9:41 UTC (permalink / raw)
To: Bartu Alev
Cc: Linus Walleij, Bartosz Golaszewski, Andy Shevchenko,
Mika Westerberg, Mario Limonciello, Hans de Goede, linux-gpio,
linux-acpi, linux-kernel
Hi,
On Sun, Sep 27, 2026 at 04:42:12AM +0300, Bartu Alev wrote:
> The ASUS TUF Gaming A15 FA507 wakes from s2idle whenever the AC
> adapter is plugged in or unplugged.
>
> In the CPMGPIO0 SSDT, GPIO pin 23 (0x0017) is declared in the
> \_SB.GPIO._AEI resource template as:
>
> GpioInt (Edge, ActiveBoth, ExclusiveAndWake, PullNone, 0x0000,
> "\\_SB.GPIO", 0x00, ResourceConsumer, ,)
> { 0x0017 }
>
> and the corresponding \_SB.GPIO._EVT handler issues a device wake
> notification for the AC adapter on pin 23 events:
>
> Case (0x17)
> {
> Notify (\_SB.ACAD, 0x02) // Device Wake
> Sleep (0x05)
> Notify (\_SB.ACAD, 0x80) // Status Change
> }
>
> Both AC plug and unplug transitions therefore trigger a spurious
> wakeup from s2idle. Add an ignore_wake quirk for this pin.
I would think this is by design like that.
What is the issue? You unplug the device from AC with lid closed and it
wakes up? Userspace should put it back to sleep in these cases. In Windows
and ChromeOS there is something called "dark resume" that deals with this
but I'm not sure if generic distros have that yet.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] gpiolib: acpi: Ignore AC adapter wakeup on ASUS FA507
2026-09-28 9:41 ` Mika Westerberg
@ 2026-09-28 10:05 ` Andy Shevchenko
2026-09-28 13:05 ` Mario Limonciello
1 sibling, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2026-09-28 10:05 UTC (permalink / raw)
To: Mika Westerberg
Cc: Bartu Alev, Linus Walleij, Bartosz Golaszewski, Mika Westerberg,
Mario Limonciello, Hans de Goede, linux-gpio, linux-acpi,
linux-kernel
On Mon, Sep 28, 2026 at 11:41:56AM +0200, Mika Westerberg wrote:
> On Sun, Sep 27, 2026 at 04:42:12AM +0300, Bartu Alev wrote:
> > The ASUS TUF Gaming A15 FA507 wakes from s2idle whenever the AC
> > adapter is plugged in or unplugged.
> >
> > In the CPMGPIO0 SSDT, GPIO pin 23 (0x0017) is declared in the
> > \_SB.GPIO._AEI resource template as:
> >
> > GpioInt (Edge, ActiveBoth, ExclusiveAndWake, PullNone, 0x0000,
> > "\\_SB.GPIO", 0x00, ResourceConsumer, ,)
> > { 0x0017 }
> >
> > and the corresponding \_SB.GPIO._EVT handler issues a device wake
> > notification for the AC adapter on pin 23 events:
> >
> > Case (0x17)
> > {
> > Notify (\_SB.ACAD, 0x02) // Device Wake
> > Sleep (0x05)
> > Notify (\_SB.ACAD, 0x80) // Status Change
> > }
> >
> > Both AC plug and unplug transitions therefore trigger a spurious
> > wakeup from s2idle. Add an ignore_wake quirk for this pin.
>
> I would think this is by design like that.
Yep, we don't have quirks for AC adapter events, touch pad and USB are
the majority of misbehaving cases.
With that being said, I defer this patch (you can discuss more and if
the conclusion is to include, it may be done in the next release).
> What is the issue? You unplug the device from AC with lid closed and it
> wakes up? Userspace should put it back to sleep in these cases. In Windows
> and ChromeOS there is something called "dark resume" that deals with this
> but I'm not sure if generic distros have that yet.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] gpiolib: acpi: Ignore AC adapter wakeup on ASUS FA507
2026-09-28 9:41 ` Mika Westerberg
2026-09-28 10:05 ` Andy Shevchenko
@ 2026-09-28 13:05 ` Mario Limonciello
1 sibling, 0 replies; 5+ messages in thread
From: Mario Limonciello @ 2026-09-28 13:05 UTC (permalink / raw)
To: Mika Westerberg, Bartu Alev
Cc: Linus Walleij, Bartosz Golaszewski, Andy Shevchenko,
Mika Westerberg, Hans de Goede, linux-gpio, linux-acpi,
linux-kernel
On 9/28/26 04:41, Mika Westerberg wrote:
> Hi,
>
> On Sun, Sep 27, 2026 at 04:42:12AM +0300, Bartu Alev wrote:
>> The ASUS TUF Gaming A15 FA507 wakes from s2idle whenever the AC
>> adapter is plugged in or unplugged.
>>
>> In the CPMGPIO0 SSDT, GPIO pin 23 (0x0017) is declared in the
>> \_SB.GPIO._AEI resource template as:
>>
>> GpioInt (Edge, ActiveBoth, ExclusiveAndWake, PullNone, 0x0000,
>> "\\_SB.GPIO", 0x00, ResourceConsumer, ,)
>> { 0x0017 }
>>
>> and the corresponding \_SB.GPIO._EVT handler issues a device wake
>> notification for the AC adapter on pin 23 events:
>>
>> Case (0x17)
>> {
>> Notify (\_SB.ACAD, 0x02) // Device Wake
>> Sleep (0x05)
>> Notify (\_SB.ACAD, 0x80) // Status Change
>> }
>>
>> Both AC plug and unplug transitions therefore trigger a spurious
>> wakeup from s2idle. Add an ignore_wake quirk for this pin.
>
> I would think this is by design like that.
>
> What is the issue? You unplug the device from AC with lid closed and it
> wakes up? Userspace should put it back to sleep in these cases. In Windows
> and ChromeOS there is something called "dark resume" that deals with this
> but I'm not sure if generic distros have that yet.
I tend to agree with Mika. If there is dedicated GPIO being triggered
on AC adapter events with a Notify(0x02) it was OEM intended to wake the
system.
FWIW I did have a design proposal to systemd for generic distros to add
some behavior around dark resume.
https://github.com/systemd/systemd/issues/27077
I also had started a PR but didn't really garner interest:
https://github.com/systemd/systemd/pull/37142
As you have a system this can strongly benefit, feel free to take the
torch on trying to develop a userland solution.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gpiolib: acpi: Ignore AC adapter wakeup on ASUS FA507
2026-09-27 1:42 [PATCH] gpiolib: acpi: Ignore AC adapter wakeup on ASUS FA507 Bartu Alev
2026-09-28 9:41 ` Mika Westerberg
@ 2026-09-28 9:54 ` Andy Shevchenko
1 sibling, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2026-09-28 9:54 UTC (permalink / raw)
To: Bartu Alev
Cc: Linus Walleij, Bartosz Golaszewski, Mika Westerberg,
Mario Limonciello, Hans de Goede, linux-gpio, linux-acpi,
linux-kernel
On Sun, Sep 27, 2026 at 04:42:12AM +0300, Bartu Alev wrote:
> The ASUS TUF Gaming A15 FA507 wakes from s2idle whenever the AC
> adapter is plugged in or unplugged.
>
> In the CPMGPIO0 SSDT, GPIO pin 23 (0x0017) is declared in the
> \_SB.GPIO._AEI resource template as:
>
> GpioInt (Edge, ActiveBoth, ExclusiveAndWake, PullNone, 0x0000,
> "\\_SB.GPIO", 0x00, ResourceConsumer, ,)
> { 0x0017 }
>
> and the corresponding \_SB.GPIO._EVT handler issues a device wake
> notification for the AC adapter on pin 23 events:
>
> Case (0x17)
> {
> Notify (\_SB.ACAD, 0x02) // Device Wake
> Sleep (0x05)
> Notify (\_SB.ACAD, 0x80) // Status Change
> }
>
> Both AC plug and unplug transitions therefore trigger a spurious
> wakeup from s2idle. Add an ignore_wake quirk for this pin.
...
> I have one question: this issue is probably present across the whole
> TUF series. If I acpidump more TUF models in the future and they all map
> to the same GPIO pin, should the quirk list the board names one by
> one (FA507, FA506, FA707, ...) or match on the product family ('ASUS TUF
> Gaming A15', 'ASUS TUF Gaming A16' or 'ASUS TUF Gaming')?
>
> The DMI outputs on my FA507NV laptop are as follows:
>
> board_name: FA507NV
> board_vendor: ASUSTeK COMPUTER INC.
> product_family: ASUS TUF Gaming A15
> product_name: ASUS TUF Gaming A15 FA507NV_FA507NV
I can't guarantee that, so the safest approach is to go with the one-by-one
quirk(s). If you get a confirmation from the vendor (ASUSTeK) in writing
supporting your idea, the patch will be welcome, of course!
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-28 13:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-27 1:42 [PATCH] gpiolib: acpi: Ignore AC adapter wakeup on ASUS FA507 Bartu Alev
2026-09-28 9:41 ` Mika Westerberg
2026-09-28 10:05 ` Andy Shevchenko
2026-09-28 13:05 ` Mario Limonciello
2026-09-28 9:54 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®