* [PATCH v2] ACPI: button: Only send `KEY_POWER` for `ACPI_BUTTON_NOTIFY_STATUS`
@ 2025-04-04 14:50 Mario Limonciello
2025-04-07 2:13 ` Ian Laurie
0 siblings, 1 reply; 3+ messages in thread
From: Mario Limonciello @ 2025-04-04 14:50 UTC (permalink / raw)
To: mario.limonciello, rafael
Cc: Ian Laurie, Yijun Shen, Richard Gong, rafael.j.wysocki,
linux-acpi
From: Mario Limonciello <mario.limonciello@amd.com>
commit a7e23ec17feec ("ACPI: button: Install notifier for system events
as well") modified the ACPI button behavior to send
`ACPI_BUTTON_NOTIFY_WAKE` events. This caused a regression on a
"Dell Optiplex 3040" sending `KEY_POWER` randomly at runtime.
Adjust logic so that the event `ACPI_BUTTON_NOTIFY_WAKE` will never
send `KEY_POWER`.
Fixes: a7e23ec17feec ("ACPI: button: Install notifier for system events as well")
Reported-by: Ian Laurie <nixuser@mail.com>
Closes: https://lore.kernel.org/linux-acpi/CAJZ5v0hbA6bqxHupTh4NZR-GVSb9M5RL7JSb2yQgvYYJg+z2aQ@mail.gmail.com/T/#md8071e480212201f23e4929607386750d3b6bc13
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2357044
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
Cc: Yijun Shen <yijun_shen@dell.com>
Cc: Richard Gong <richard.gong@amd.com>
v2:
* Handle logic change for avoiding KEY_POWER all the time
---
drivers/acpi/button.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 90b09840536dd..0a70260401882 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -458,7 +458,7 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data)
acpi_pm_wakeup_event(&device->dev);
button = acpi_driver_data(device);
- if (button->suspended)
+ if (button->suspended || event == ACPI_BUTTON_NOTIFY_WAKE)
return;
input = button->input;
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] ACPI: button: Only send `KEY_POWER` for `ACPI_BUTTON_NOTIFY_STATUS`
2025-04-04 14:50 [PATCH v2] ACPI: button: Only send `KEY_POWER` for `ACPI_BUTTON_NOTIFY_STATUS` Mario Limonciello
@ 2025-04-07 2:13 ` Ian Laurie
2025-04-07 17:55 ` Rafael J. Wysocki
0 siblings, 1 reply; 3+ messages in thread
From: Ian Laurie @ 2025-04-07 2:13 UTC (permalink / raw)
To: Mario Limonciello, mario.limonciello, rafael
Cc: Yijun Shen, Richard Gong, rafael.j.wysocki, linux-acpi
Downloaded the build Justin did on Koji, looks good after 24 hours, no
bugus events.
Tested-by: Ian Laurie <nixuser@mail.com>
--
Ian Laurie
FAS: nixuser | IRC: nixuser
TZ: Australia/Sydney
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ACPI: button: Only send `KEY_POWER` for `ACPI_BUTTON_NOTIFY_STATUS`
2025-04-07 2:13 ` Ian Laurie
@ 2025-04-07 17:55 ` Rafael J. Wysocki
0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2025-04-07 17:55 UTC (permalink / raw)
To: Ian Laurie, Mario Limonciello
Cc: mario.limonciello, rafael, Yijun Shen, Richard Gong,
rafael.j.wysocki, linux-acpi
On Mon, Apr 7, 2025 at 4:13 AM Ian Laurie <nixuser@mail.com> wrote:
>
> Downloaded the build Justin did on Koji, looks good after 24 hours, no
> bugus events.
>
> Tested-by: Ian Laurie <nixuser@mail.com>
Applied as 6.15-rc material, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-07 17:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-04 14:50 [PATCH v2] ACPI: button: Only send `KEY_POWER` for `ACPI_BUTTON_NOTIFY_STATUS` Mario Limonciello
2025-04-07 2:13 ` Ian Laurie
2025-04-07 17:55 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox