From: Armin Wolf W_Armin@gmx.de
[ Upstream commit 444a9256f8d106e08a6bc2dc8ef28a8699e4b3ba ]
On the Acer Nitro AN515-58, the event 4 - 0 is send by the ACPI firmware when the backlight up/down keys are pressed. Ignore this event to avoid spamming the kernel log with error messages, as the acpi-video driver already handles brightness up/down events.
Reported-by: Bugaddr Bugaddr@protonmail.com Closes: https://bugaddr.tech/posts/2025-11-16-debugging-the-acer-nitro-5-an515-58-fn... Tested-by: Bugaddr Bugaddr@protonmail.com Signed-off-by: Armin Wolf W_Armin@gmx.de Link: https://patch.msgid.link/20251117155938.3030-1-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen ilpo.jarvinen@linux.intel.com Signed-off-by: Sasha Levin sashal@kernel.org ---
LLM Generated explanations, may be completely bogus:
1. COMMIT MESSAGE ANALYSIS - **Problem:** On the Acer Nitro AN515-58, pressing brightness keys triggers WMI event `0x4`. The driver does not recognize this event, causing it to fall through to the default handler which spams the kernel log with "Unknown function number" errors. - **Fix:** The commit adds `WMID_BACKLIGHT_EVENT` (0x4) to the event enum and adds a specific case in `acer_wmi_notify` to ignore it. - **Reasoning:** The commit explains that the `acpi-video` driver already handles the actual backlight changes, making this WMI event redundant. Ignoring it explicitly silences the false-positive warnings. - **Tags:** Contains `Reported-by`, `Closes`, `Tested-by`, and `Reviewed-by`. While it lacks a `Cc: stable` tag, the fix addresses a regression in usability for supported hardware.
2. DEEP CODE RESEARCH - **Context:** The driver `drivers/platform/x86/acer-wmi.c` has a switch statement to handle WMI events. Unknown events trigger a `pr_warn`, creating log noise. - **History:** Support for the Acer Nitro AN515-58 was added in commit `549fcf58cf58`. Once that commit landed, the driver began binding to this hardware, exposing this unhandled event issue. - **Mechanism:** The patch is a trivial suppression. It defines the event ID and creates a no-op path for it. ```c case WMID_BACKLIGHT_EVENT: /* Already handled by acpi-video */ break; ``` - **Precedent:** This driver has a history of similar fixes (e.g., ignoring AC events that are handled elsewhere) which have been backported to stable to keep logs clean.
3. STABLE KERNEL CRITERIA ASSESSMENT - **Fixes a real bug?** Yes. While not a crash, excessive log spam is a valid bug; it fills disk space, masks legitimate kernel warnings, and degrades the user experience. - **Fits stable rules?** Yes. This falls under the **Hardware Quirks and Workarounds** exception. It adapts the driver to specific hardware behavior (firmware sending redundant events). - **Small and Contained?** Yes. The change is extremely small (adding an enum and a case statement) and localized to one file. - **No New Features?** Yes. It strictly suppresses an error; it adds no new user-visible functionality. - **Regression Risk?** Extremely Low. The change only affects event `0x4`. Previously, this event triggered a warning and did nothing else. Now, it triggers no warning and does nothing else. Functional behavior remains identical.
4. CONCLUSION This commit is a textbook candidate for a stable backport under the "Quirks and Workarounds" category. It fixes a tangible annoyance (log spam) for users of supported hardware without introducing any risk or complexity. It should be backported to all stable trees that contain the initial support for the Acer Nitro AN515-58.
**YES**
drivers/platform/x86/acer-wmi.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 13eb22b35aa8f..d848afc91f87d 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -102,6 +102,7 @@ MODULE_ALIAS("wmi:676AA15E-6A47-4D9F-A2CC-1E6D18D14026");
enum acer_wmi_event_ids { WMID_HOTKEY_EVENT = 0x1, + WMID_BACKLIGHT_EVENT = 0x4, WMID_ACCEL_OR_KBD_DOCK_EVENT = 0x5, WMID_GAMING_TURBO_KEY_EVENT = 0x7, WMID_AC_EVENT = 0x8, @@ -2369,6 +2370,9 @@ static void acer_wmi_notify(union acpi_object *obj, void *context) sparse_keymap_report_event(acer_wmi_input_dev, scancode, 1, true); } break; + case WMID_BACKLIGHT_EVENT: + /* Already handled by acpi-video */ + break; case WMID_ACCEL_OR_KBD_DOCK_EVENT: acer_gsensor_event(); acer_kbd_dock_event(&return_value);