From: Baorui.Liu <baorliu@amd.com>
To: <rafael@kernel.org>
Cc: <lenb@kernel.org>, <robert.moore@intel.com>,
<linux-acpi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<acpica-devel@lists.linuxfoundation.org>,
Baorui.Liu <baorliu@amd.com>
Subject: [PATCH v2 0/1] ACPI: button: Report wakeup key only for power button wakeups
Date: Wed, 19 Aug 2026 16:55:27 +0800 [thread overview]
Message-ID: <20260819085528.575-1-baorliu@amd.com> (raw)
In-Reply-To: <20260806122732.533-1-baorliu@amd.com>
This v2 addresses the review feedback on v1 by documenting the
practical impact and by avoiding KEY_WAKEUP reporting from generic ACPI
sleep resume paths.
Problem reproduced on an AMD Android 15 Xen guest.
Input device mapping:
event0: LNXPWRBN Power Button, KEY_POWER + KEY_WAKEUP
event1: LNXSLPBN Sleep Button, KEY_SLEEP
Runtime trigger mapping:
xl trigger android power -> event0 KEY_POWER
xl trigger android sleep -> event1 KEY_SLEEP
without-fix kernel:
6.6.118-android15-14-maybe-dirty-gc3c82a22502d
echo mem > /sys/power/state
xl trigger android s3resume
/dev/input/event0 reports KEY_WAKEUP DOWN/UP.
with-fix v2 kernel:
6.6.118-android15-14-maybe-dirty-g5b231ece911d
The same non-power-button S3 resume path no longer reports KEY_WAKEUP
from /dev/input/event0. This was verified twice; both event0 logs are
empty.
The dmesg log confirms that the test path is S3 suspend/resume:
PM: suspend entry (deep)
ACPI: PM: Preparing to enter system sleep state S3
ACPI: PM: Waking up from system sleep state S3
Resume cause unknown
PM: suspend exit
A positive-control power-button S3 wake was attempted in the Xen guest:
echo mem > /sys/power/state
xl trigger android power
The guest remained suspended/offline and was recovered with:
xl trigger android s3resume
Therefore, xl trigger android power is not a reliable S3 wake source in
this Xen setup. That run is not used as positive-control power-button
wake evidence; it only confirms runtime input-device mapping.
Changes in v2:
- Add test evidence showing the practical impact.
- Track pending wakeup reporting in the ACPI button driver.
- Report KEY_WAKEUP only if a power-button event/notify is observed
while the ACPI button device is suspended.
- Stop synthesizing Power Button KEY_WAKEUP events from generic ACPI
sleep resume paths.
ACPI: button: Report wakeup key only for power button wakeups
drivers/acpi/button.c | 38 ++++++++++++++++-------------
drivers/acpi/sleep.c | 56 +++----------------------------------------
include/acpi/button.h | 5 ----
3 files changed, 24 insertions(+), 75 deletions(-)
--
2.34.1
next prev parent reply other threads:[~2026-08-19 8:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 12:27 [PATCH] ACPI: button: Report wakeup key only for power button wakeups Baorui Liu
2026-08-07 14:12 ` Rafael J. Wysocki (Intel)
2026-08-19 8:55 ` Baorui.Liu [this message]
2026-08-19 8:55 ` [PATCH v2 1/1] " Baorui.Liu
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=20260819085528.575-1-baorliu@amd.com \
--to=baorliu@amd.com \
--cc=acpica-devel@lists.linuxfoundation.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=robert.moore@intel.com \
/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.