From: Ting-Han Hou <ue081723@gmail.com>
To: stable@vger.kernel.org
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Frederic MARIE-JOSEPH <fredericmariejoseph@protonmail.com>,
Wolfgang Walter <linux@stwm.de>,
Bob Anderson <kernel@ametros.net>,
Domenico Suppa <domenicosuppa@gmail.com>,
Thorsten Leemhuis <regressions@leemhuis.info>,
Sasha Levin <sashal@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-acpi@vger.kernel.org, regressions@lists.linux.dev
Subject: [PATCH 6.18.y 0/3] ACPI: scan: fix the fixed event power button since 6.18.57
Date: Sat, 24 Oct 2026 18:57:07 +0800 [thread overview]
Message-ID: <20261024105710.593-1-ue081723@gmail.com> (raw)
In-Reply-To: <2026102308-twisting-bazooka-12b5@gregkh>
Since 6.18.57, the ACPI power button is not bound to any driver when it
is a fixed event device (LNXPWRBN), so ACPI power-off requests are
ignored. This was reported for QEMU guests by Wolfgang Walter [1] and
Frederic MARIE-JOSEPH [2], and for Dell servers (power button and iDRAC
graceful shutdown) by Bob Anderson [1]. The ASRock H310CM-HDV report on
linux-acpi [3] (ff_pwr_btn "STS invalid") may be the same problem.
6.18.57 got 52d864019636 ("ACPI: button: Convert the driver to a
platform one") as a dependency of fe80251152fe ("ACPI: button: Fix ACPI
GPE handler leak during removal"), but not ab06eb920401 ("ACPI: scan:
Register platform devices for fixed event buttons"), so fixed event
buttons have no platform device to bind to. Bob found that
ab06eb920401 fixes it, Wolfgang confirmed that, and Sasha queued it for
6.18 [1]. 6.18.59-rc1 also converts the tiny power button driver to a
platform one, so with CONFIG_ACPI_TINY_POWER_BUTTON=y the fixed event
power button stops working in 6.18.59-rc1 as well (it still works in
6.18.58).
ab06eb920401 was then dropped from the 6.18 queue together with its two
upstream follow-up fixes (stable-queue c4d7fb7346 "drop acpi patches"),
with a FAILED report for f234fdaae1ca. With the three patches as they
were queued, drivers/acpi/acpi_platform.c does not build on 6.18.y:
drivers/acpi/acpi_platform.c:92:21: error: implicit declaration of function '__resource_contains_unbound' [-Wimplicit-function-declaration]
__resource_contains_unbound() comes from edfaa81d5da5 ("resource: Add
__resource_contains_unbound() for internal contains checks"), which is
not in 6.18.y, so patch 3 uses resource_contains() instead; the note in
that patch explains why this is equivalent here. Patches 1 and 2 are
clean cherry-picks. aef7792cddca, which also has
"Fixes: ab06eb920401", only rewords a debug message and is not
included.
The series applies to both v6.18.58 and the current 6.18 queue
(6.18.59-rc1).
Testing: x86_64, QEMU q35 with KVM, an initramfs whose init waits for
the power button and then powers off, and QMP system_powerdown sent
after boot:
without series with series
6.18.58, CONFIG_ACPI_BUTTON=y ignored KEY_POWER, off in 0.5s
6.18.59-rc1, CONFIG_ACPI_BUTTON=y ignored KEY_POWER, off in 0.5s
6.18.59-rc1, ACPI_TINY_POWER_BUTTON ignored signal 38 to init, off in 0.5s
6.18.58, ACPI_TINY_POWER_BUTTON works (still an ACPI driver there)
"ignored" means there is no "Power Button" input device, LNXPWRBN:00
has no physical node, and nothing happens until init gives up after 40
seconds. With the series, LNXPWRBN:00 gets a platform device bound to
acpi-button (or acpi-tiny-power-button), and the only new kernel
messages during boot are "input: Power Button as
/devices/platform/LNXPWRBN:00/input/input0" and "ACPI: button: Power
Button [PWRF]". A KASAN + PROVE_LOCKING + DEBUG_ATOMIC_SLEEP +
DEBUG_LIST build of 6.18.59-rc1 with the series boots and powers off
without splats, and there are no new W=1 or sparse warnings in
drivers/acpi/acpi_platform.c and drivers/acpi/scan.c.
Not tested: real hardware, and machines whose _CRS has overlapping
resources (the case patches 2 and 3 are about).
Tool use: most of this work was done with an LLM coding assistant
(Claude Code with Claude Opus 5.5). It found the regression reports and
the dropped queue patches while going through recent stable FAILED
mails, rebuilt 6.18.59-rc1 from stable-queue (its tree matches
linux-stable-rc), made the resource_contains() change in patch 3 and
wrote the notes in patches 1 and 3, wrote the test initramfs and
scripts, ran the builds and QEMU tests listed above, and drafted this
cover letter. Patches 1 and 2 are unmodified upstream code. I reviewed
the series and the test results before sending.
[1] https://lore.kernel.org/all/5fe757e7aa54c38df3525d313598db99@stwm.de/
[2] https://lore.kernel.org/all/20261022162655.231431-1-fredericmariejoseph@protonmail.com/
[3] https://lore.kernel.org/all/CADP5X9+xCTkxXZO1dcTodrwsfW=piV41c5f_zaOq6KsrxD0Hhw@mail.gmail.com/
Rafael J. Wysocki (3):
ACPI: scan: Register platform devices for fixed event buttons
ACPI: scan: Avoid registering platform devices with resource overlaps
ACPI: scan: Do not combine resources that overlap completely
drivers/acpi/acpi_platform.c | 79 ++++++++++++++++++++++++++++--------
drivers/acpi/scan.c | 4 ++
2 files changed, 66 insertions(+), 17 deletions(-)
base-commit: 2926d88bb7fc4608fd942453d929c39e4e5ec006
--
2.53.0
next parent reply other threads:[~2026-10-24 10:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2026102308-twisting-bazooka-12b5@gregkh>
2026-10-24 10:57 ` Ting-Han Hou [this message]
2026-10-24 10:57 ` [PATCH 6.18.y 1/3] ACPI: scan: Register platform devices for fixed event buttons Ting-Han Hou
2026-10-24 10:57 ` [PATCH 6.18.y 2/3] ACPI: scan: Avoid registering platform devices with resource overlaps Ting-Han Hou
2026-10-24 20:11 ` Sasha Levin
2026-10-24 10:57 ` [PATCH 6.18.y 3/3] ACPI: scan: Do not combine resources that overlap completely Ting-Han Hou
2026-10-24 22:43 [PATCH 6.18.y 0/3] ACPI: scan: fix the fixed event power button since 6.18.57 Domenico Suppa
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=20261024105710.593-1-ue081723@gmail.com \
--to=ue081723@gmail.com \
--cc=domenicosuppa@gmail.com \
--cc=fredericmariejoseph@protonmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel@ametros.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux@stwm.de \
--cc=rafael@kernel.org \
--cc=regressions@leemhuis.info \
--cc=regressions@lists.linux.dev \
--cc=sashal@kernel.org \
--cc=stable@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