Skip to content

HID: asus: Add ROG laptop HID code filtering and fan control

Ionut Nechita (Sunlight Linux) linux-input lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 1 patch 0 repliesNew

Patches in v1 No applies recorded yet

The patch the cover letter announces is not in this archive.

Reviews trailers per patch

PatchDenis BenatoMario Limonciello (AMD)
SeriesR-b R-b R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

From: Ionut Nechita <[email protected]>

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