Skip to content

[FROM-ML] platform/x86: asus-armoury: fix mini-LED mode get/set on MO…#56

Open
Ghoul4500 wants to merge 1 commit into
masterfrom
asus-armoury-fix-mini-led
Open

[FROM-ML] platform/x86: asus-armoury: fix mini-LED mode get/set on MO…#56
Ghoul4500 wants to merge 1 commit into
masterfrom
asus-armoury-fix-mini-led

Conversation

@Ghoul4500
Copy link
Copy Markdown
Member

@Ghoul4500 Ghoul4500 commented May 17, 2026

…DE2 devices

The mini-LED current_value attribute does not work on devices that use
ASUS_WMI_DEVID_MINI_LED_MODE2 (2024 and newer models).

Reading is broken: mini_led_mode_current_value_show() fetches the mode
from the device but then decodes a literal 0 instead of the value it
just read:

    mode = FIELD_GET(ASUS_MINI_LED_MODE_MASK, 0);

So mode is always 0, and the attribute always reports the same thing
regardless of the real hardware state.

Writing is broken too. The number a user writes is an index; the value
the firmware actually wants is looked up from that index in
mini_led_mode_map[]. mini_led_mode_current_value_store() skips that
lookup and passes the raw index straight to armoury_attr_uint_store().
On 2024 devices the firmware numbers its modes differently from the
index, so some writes are rejected with -EINVAL and the rest send the
wrong mode to the hardware.

Fix both paths: decode the value actually read from the device when
reading, and look up the firmware value before sending it when
writing. Older (MODE1) devices were unaffected because there the index
and the firmware value are the same.

Fixes: f99eb09 ("platform/x86: asus-armoury: move existing tunings
to asus-armoury module")
Signed-off-by: Ahmed Yaseen <yaseen@ghoul.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant