Skip to content

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

Closed
Ghoul4500 wants to merge 1 commit into
ogc-7.0.yfrom
asus-armoury-fix-mini-led
Closed

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

Conversation

@Ghoul4500

@Ghoul4500 Ghoul4500 commented May 17, 2026

Copy link
Copy Markdown
Member

platform/x86: asus-armoury: fix mini-LED mode get/set on MODE2 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.

Link: https://patch.msgid.link/20260517182957.11069-1-yaseen@ghoul.dev

Cherry-picked from commit d2d2e7c

Fixes: f99eb09 ("platform/x86: asus-armoury: move existing tunings to asus-armoury module")
Signed-off-by: Ahmed Yaseen yaseen@ghoul.dev

@KyleGospo

Copy link
Copy Markdown
Member

Needs a rebase on the ogc7.y branch

@Ghoul4500 Ghoul4500 changed the base branch from master to ogc-7.0.y May 19, 2026 09:51
@Ghoul4500 Ghoul4500 force-pushed the asus-armoury-fix-mini-led branch from ceba7cc to c2f2d9b Compare May 19, 2026 09:53
@Ghoul4500 Ghoul4500 self-assigned this May 19, 2026
Comment thread drivers/platform/x86/asus-armoury.c
… on MODE2 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>
@Ghoul4500 Ghoul4500 changed the title [FROM-ML] platform/x86: asus-armoury: fix mini-LED mode get/set on MO… [FROM-UPSTREAM] platform/x86: asus-armoury: fix mini-LED mode get/set on MO… Jun 8, 2026
@Ghoul4500 Ghoul4500 force-pushed the asus-armoury-fix-mini-led branch from c2f2d9b to 6bd42f9 Compare June 8, 2026 14:29
@Ghoul4500

Copy link
Copy Markdown
Member Author

Updated patch title and description (transition from FROM-ML to FOR-UPSTREAM and include cherry-picked commit SHA from upstream and link)

@pastaq

pastaq commented Jun 10, 2026

Copy link
Copy Markdown
Member

What is going on, how are patches being included without being merged? Is someone bypassing the .y branch and cherry picking to manually created versions?

@Ghoul4500

Copy link
Copy Markdown
Member Author

What is going on, how are patches being included without being merged? Is someone bypassing the .y branch and cherry picking to manually created versions?

This specific patch was not cherry-picked into the 7.0.12 branch @hphilm was working on. This was merged upstream and is now available in mainline linux stable 7.0.11. #52 appears to have been cherry-picked though. BUt IDK what's going on either

@pastaq pastaq closed this Jun 10, 2026
@Ghoul4500 Ghoul4500 deleted the asus-armoury-fix-mini-led branch June 10, 2026 07:18
@hphilm

hphilm commented Jun 10, 2026

Copy link
Copy Markdown

I renamed both ogc-7.0.12 and ogc-7.0.11 to hphilm/ogc/7.0/12-prep and hphilm/ogc/7.0/11-prep to avoid further confusion. Both were meant for @KyleGospo to ease his work on rebasing ogc-7.0.y as needed. No rules or workflows got bypassed in this process ...

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.

4 participants