Skip to content

Draft: HID: asus: Ally X SteamOS LED multicolor + FF/haptics support - #1

Open
kndclark wants to merge 16 commits into
NeroReflex:allyfrom
kndclark:ally-x-steamos-led-ff
Open

Draft: HID: asus: Ally X SteamOS LED multicolor + FF/haptics support#1
kndclark wants to merge 16 commits into
NeroReflex:allyfrom
kndclark:ally-x-steamos-led-ff

Conversation

@kndclark

Copy link
Copy Markdown

Add SteamOS-oriented features for the ROG Ally X handheld:

LED subsystem:

  • Multicolor LED class driver for the joystick ring LEDs
  • Hardware brightness level control (4 discrete levels)
  • RGB effect modes: static, breathing, color cycle, rainbow
  • Effect speed control and per-zone color support
  • Proper suspend/resume with deferred LED restoration
  • Force-feedback motor shutoff on suspend/teardown

Force feedback / haptics:

  • Port FF_RUMBLE support from stock hid-asus-ally driver
  • Magnitude scaling (evdev 0-65535 to wire 0-100)
  • Work-queue based async packet delivery via intf_mutex
  • Vibration intensity sysfs controls (left/right independent)

Input handling fixes:

  • Fix vendor button (AC/QAM) routing: handle 0x5A reports only on the correct cfg interface, remove duplicate handler from gamepad interface
  • Fix QAM long-press release ghosting: rewrite non-standard 0xA8 release byte to 0x00 before HID parser dispatch
  • Force-release all vendor keys on resume to prevent stuck keys after Ally X USB re-probe during suspend/resume
  • Ctrl+Alt+Del sequence detection on keyboard interface

@kndclark
kndclark force-pushed the ally-x-steamos-led-ff branch 7 times, most recently from c71e84f to 83de6c5 Compare July 19, 2026 15:14
@kndclark
kndclark force-pushed the ally-x-steamos-led-ff branch from 83de6c5 to 7725498 Compare July 19, 2026 16:08
@NeroReflex
NeroReflex force-pushed the ally branch 2 times, most recently from 0c4e546 to 4606846 Compare July 19, 2026 17:57
The ROG ally needs to have the EC string sent back after resuming from
s2idle since the USB device can be turned completely off by the firmware
when mcu_powersave firmware-attribute is set to 1.

This may also be true for other laptops and certain features might stop
working after the device exit from sleep.

Signed-off-by: Denis Benato <denis.benato@linux.dev>
Implement the core functionality for ASUS handhelds:
- extend functionality of hid-asus if driver is enabled
- initialise the device to a "ready" state
- implement Ally X input mapping
- emit a single proper event for AC button long press

Signed-off-by: Khamunetri Clark <khamunetriclark@gmail.com>
Signed-off-by: Denis Benato <denis.benato@linux.dev>
Signed-off-by: Matthew Schwartz <matthew.schwartz@linux.dev>
Signed-off-by: Luke Jones <luke@ljones.dev>
Add the base configuration structures for the gamepad configuration,
detect capabilities and initialize the device in a known state.

Signed-off-by: Denis Benato <denis.benato@linux.dev>
Signed-off-by: Luke Jones <luke@ljones.dev>
ASUS ROG Ally handhelds support the vibration strength to be configured:
add sysfs attributes to allow userspace configure motors vibration
intensity.

Signed-off-by: Denis Benato <denis.benato@linux.dev>
Signed-off-by: Luke Jones <luke@ljones.dev>
ROG Ally devices supports configuring joysticks inner and outer range:
add sysfs attributes to allow userspace modifying the sensitivity
of those controllers.

Signed-off-by: Denis Benato <denis.benato@linux.dev>
Signed-off-by: Luke Jones <luke@ljones.dev>
ROG Ally devices allows configuring inner and outer ranges for triggers
buttons on the back: allow userspace to configure the sesitivity by
exposing sysfs attributes.

Signed-off-by: Denis Benato <denis.benato@linux.dev>
Signed-off-by: Luke Jones <luke@ljones.dev>
ROG Ally devices allow configuring the anti-deadzone parameter for
the resistive joysticks devices as over time those develops drift,
therefore allow userspace to configure the anti-deadzone by exposing
relevant sysfs attributes.

Signed-off-by: Denis Benato <denis.benato@linux.dev>
Signed-off-by: Luke Jones <luke@ljones.dev>
ROG ally devices allows configuring the response curve of both joysticks,
therefore add the ability of userspace to modify the response curve by
exposing relevant sysfs attributes.

Signed-off-by: Denis Benato <denis.benato@linux.dev>
Signed-off-by: Luke Jones <luke@ljones.dev>
ROG ally devices supports a feature called turbo buttons that allows
the user to quickly toggle button state by keeping a button pressed,
therefore allow userspace to configure the feature by exposing
relevant sysfs attributes.

Signed-off-by: Denis Benato <denis.benato@linux.dev>
Signed-off-by: Khamunetri Clark <khamunetriclark@gmail.com>
Signed-off-by: Luke Jones <luke@ljones.dev>
Add support for buttons remapping: the ability to assign different
button events to each one of the physical button on the device.

Signed-off-by: Luke Jones <luke@ljones.dev>
Signed-off-by: Denis Benato <denis.benato@linux.dev>
ROG Ally devices can emulate either a mouse+keyboard (desktop mode)
or an gamepad device (xbox360 controller in ROG ally and a custom
DInput device on newer models): add support for switching the current
controller mode.

Signed-off-by: Luke Jones <luke@ljones.dev>
Signed-off-by: Denis Benato <denis.benato@linux.dev>
Unlike ROG ally the X version and following ones uses DInput protocol
and the force feedback needs to be implemented as its protocol is
vendor-specific, therefore add support for FF_RUMBLE with magnitude
scaling on a work-queue based approach to avoid using possibly
sleeping calls in atomic context.

Signed-off-by: Denis Benato <denis.benato@linux.dev>
Signed-off-by: Khamunetri Clark <khamunetriclark@gmail.com>
Signed-off-by: Luke Jones <luke@ljones.dev>
@kndclark
kndclark force-pushed the ally-x-steamos-led-ff branch 2 times, most recently from 2d1d440 to 5ff6e40 Compare July 19, 2026 21:22
kndclark added 4 commits July 19, 2026 15:33
Add multicolor LED class support for the ROG Ally X joystick ring LEDs:

- Multicolor LED class device for the joystick ring LEDs
- RGB effect modes: static, breathing, color cycle, rainbow
- Effect speed control and hardware brightness levels
- Proper suspend/resume with deferred LED restoration
- Persist LED config to MCU non-volatile storage once per suspend
  (avoids flash wear from committing on every brightness change)

Signed-off-by: Khamunetri Clark <khamunetriclark@gmail.com>
The Ally MCU supports a strobe (rapid on/off) lighting effect on the
joystick ring LEDs, selected via hardware effect byte 0x0a on the B3
config report. Expose it as a new value in the RGB effect enum and add
a wire-byte mapping table so the compact sysfs effect index stays
decoupled from the non-sequential hardware values.

Signed-off-by: Khamunetri Clark <khamunetriclark@gmail.com>
The Ally MCU can smoothly crossfade the joystick ring LEDs between a
primary and a background color when running the breathing effect, by
supplying background RGB values in offsets 10-12 of the B3 config
report. Add a "color2" sysfs attribute to configure the background
color and feed it into the effect packet when breathing is active.

Signed-off-by: Khamunetri Clark <khamunetriclark@gmail.com>
Dynamic effects (color cycle/chroma, rainbow) can run in either direction on
the Ally joystick rings. Replace the hardcoded forward direction byte
with a configurable value exposed through a "direction" sysfs attribute
(reverse/forward), defaulting to forward.

Signed-off-by: Khamunetri Clark <khamunetriclark@gmail.com>
@kndclark
kndclark force-pushed the ally-x-steamos-led-ff branch from 5ff6e40 to acde563 Compare July 19, 2026 21:33
@kndclark kndclark changed the title HID: asus: Ally X SteamOS LED multicolor + FF/haptics support Draft: HID: asus: Ally X SteamOS LED multicolor + FF/haptics support Jul 24, 2026
@NeroReflex
NeroReflex force-pushed the ally branch 4 times, most recently from f759008 to bbd3c71 Compare July 26, 2026 01:49
@NeroReflex
NeroReflex force-pushed the ally branch 2 times, most recently from 7c00659 to 9bc9553 Compare July 26, 2026 16:51
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.

2 participants