From: Mario Limonciello <superm1@kernel.org>
To: aprilgrimoire <aprilgrimoire@proton.me>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: Re: [BUG] MECHREVO Yilong15Pro GM5HG7A: lid switch causing unwanted s2idle wakeups
Date: Thu, 4 Sep 2025 10:08:50 -0500 [thread overview]
Message-ID: <5369f2b5-dba1-4b25-a093-7aa79c578975@kernel.org> (raw)
In-Reply-To: <El5fBf0AkhefzH0LWKyMF3vOCNsHYBCEwxtvXD-tJfLGAFCeJ5ZVbgZE6ibf-KfMxtlkTwr3g1-feqSgfcafGzVGjulc-8QggWHHoJlRDNY=@proton.me>
On 9/4/25 2:38 AM, aprilgrimoire wrote:
>> Got it - so it sounds like that IRQ1 quirk is probably enabled as well.
>> Feel free to send a patch for that and CC me (as you already proved it
>> helps remove IRQ1 from spurious wakeups for your system).
>>
>> Make sure you base it off this branch because I know this was touched
>> recently for another system too.
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=fixes
>
> Hi, Mario!
> Sorry for bothering you again.
>
> I didn't do enough testing, and it turned out that this laptop does need the quirk to stop lid from waking up. The unwanted wakes aren't triggered every time.
>
> However, this quirk comes with a significant side effect: now I'm completely unable to wake it up with components builtin on the laptop. Maybe usb events can still wake it up though, but I don't have any around me. Shall I still submit a patch for this?
The Linux kernel will break from the s2dile loop when a device asserts
to wake the system.
If IRQ1 triggers when the keyboard isn't pressed that is absolutely a
firmware bug. We can work around it with a quirk entry for
pmc-quirks.c. The obvious trade off is that the keyboard can't be used
as a wake source either, but if you don't disable IRQ1 then another even
that normally wouldn't wake the system "will wake the system".
For example if you plug in the power adapter the EC will assert the SCI
and will notify the APU to wake up from hardware sleep. Normally the
kernel will process the EC events and go back to sleep.
But if IRQ1 is spuriously active during this time then it will wake the
system when you plug in the power adapter. So I think it's the lesser
evil to add that quirk. That being said we need to figure out what GPIO
0 is tied to for your system. Because maybe the better solution is to
disable GPIO 0 and just "rely" upon the spurious IRQ1.
With GPIO 0 enabled, can you check when it gets triggered besides the
lid event? Try these:
* Suspend on battery / power adapter plug in
* Suspend on AC / power adapter plug out
* Press power button
* Click touchpad
Ideally GPIO 0 is only used for the lid, but given the ASL notifies the
PWRB device I don't have high hopes.
next prev parent reply other threads:[~2025-09-04 15:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-03 16:23 [BUG] MECHREVO Yilong15Pro GM5HG7A: lid switch causing unwanted s2idle wakeups aprilgrimoire
2025-09-03 16:50 ` Mario Limonciello
2025-09-03 17:13 ` aprilgrimoire
2025-09-03 17:32 ` Mario Limonciello
[not found] ` <vVnKVxELkDdxFLiNbtGhT9X7GA_OV3Wk7q6YB_K4Qz3N8Dfp-MCcZqeobEP8dX-H4kjqKzYqyloahoaxB6ZEp8l9XgkIrD8S27Ertjwq324=@proton.me>
2025-09-04 6:08 ` Fw: " aprilgrimoire
[not found] ` <lyy4riGTLOpvYTPUeUx6krjnYdeE8iYbWRrLOJLOChOKMcys00nhNWJ_JD8V8kkVQk87ktMK8w7BAEosOs3KGipyHlvkvQ0_j6cipUfxYtA=@proton.me>
[not found] ` <0fb5a890-63f0-412b-8d88-79b40e2c564b@kernel.org>
2025-09-04 7:38 ` aprilgrimoire
2025-09-04 15:08 ` Mario Limonciello [this message]
2025-09-04 16:34 ` aprilgrimoire
2025-09-04 17:47 ` Mario Limonciello
2025-09-05 2:51 ` aprilgrimoire
2025-09-05 18:03 ` 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=5369f2b5-dba1-4b25-a093-7aa79c578975@kernel.org \
--to=superm1@kernel.org \
--cc=aprilgrimoire@proton.me \
--cc=linux-pm@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).