[PATCH 0/1] HID: asus: Add ROG laptop HID code filtering and fan control

Ionut Nechita (Sunlight Linux) posted 1 patch 1 month ago
drivers/hid/hid-asus.c                     | 48 +++++++++++++++++++++-
include/linux/platform_data/x86/asus-wmi.h |  2 +
2 files changed, 49 insertions(+), 1 deletion(-)
[PATCH 0/1] HID: asus: Add ROG laptop HID code filtering and fan control
Posted by Ionut Nechita (Sunlight Linux) 1 month ago
From: Ionut Nechita <ionut_n2001@yahoo.com>

Hi,

This patch addresses two issues with Asus ROG G14/G15 laptops:

1. Kernel log spam from unmapped HID vendor codes
2. Non-functional Fn+F5 fan control key

Problem:
--------
Asus ROG G14 and G15 laptops send several HID vendor usage codes (0xea,
0xec, 0x02, 0x8a, 0x9e) during normal keypresses with no clear purpose.
This generates continuous "Unmapped Asus vendor usagepage code" warnings
in dmesg, cluttering the kernel log.

Additionally, the Fn+F5 key (code 0xae) which should cycle through fan
modes is not handled, preventing users from controlling fan behavior
through the keyboard shortcut.

Solution:
---------
- Filter out the spurious HID codes for ROG N-Key keyboards to eliminate
  log spam
- Add asus_wmi_send_event() function to enable communication between
  hid-asus and asus-wmi drivers
- Implement Fn+F5 (0xae) handler that triggers WMI events to toggle fan
  modes
- Replace magic number with HID_UP_ASUSVENDOR constant for clarity

Testing:
--------
Tested on Asus ROG G14 (2021) and G15 (2022) models:
- Kernel log no longer shows unmapped vendor code warnings
- Fn+F5 key now cycles through fan modes (silent/balanced/performance)
- No regressions observed with other keyboard functionality

Impact:
-------
Affects Asus ROG laptop users who experience:
- Cluttered kernel logs from HID warnings
- Non-functional fan control hotkey

Ionut Nechita (1):
  HID: asus: Filter HID vendor codes and add WMI fan control support
    for ROG laptops

 drivers/hid/hid-asus.c                     | 48 +++++++++++++++++++++-
 include/linux/platform_data/x86/asus-wmi.h |  2 +
 2 files changed, 49 insertions(+), 1 deletion(-)

--
2.52.0