All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Limonciello <superm1@kernel.org>
To: Mika Westerberg <mika.westerberg@linux.intel.com>,
	Bartu Alev <bartualev@gmail.com>
Cc: Linus Walleij <linusw@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mika Westerberg <westeri@kernel.org>,
	Hans de Goede <hdegoede@redhat.com>,
	linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpiolib: acpi: Ignore AC adapter wakeup on ASUS FA507
Date: Mon, 28 Sep 2026 08:05:53 -0500	[thread overview]
Message-ID: <a7099b6b-bd80-4fdd-8d03-ba95107a65e1@kernel.org> (raw)
In-Reply-To: <20260928094156.GG106095@black.igk.intel.com>

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.

  parent reply	other threads:[~2026-09-28 13:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2026-09-28  9:54 ` Andy Shevchenko

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=a7099b6b-bd80-4fdd-8d03-ba95107a65e1@kernel.org \
    --to=superm1@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bartualev@gmail.com \
    --cc=brgl@kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=linusw@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=westeri@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.