Skip to content

fix: Various Rumble and Gamepad Issues - #729

Merged
pastaq merged 7 commits into
mainfrom
pastaq/rumble_haptics
Oct 10, 2026
Merged

pastaq merged 7 commits into
mainfrom
pastaq/rumble_haptics

Conversation

@pastaq

@pastaq pastaq commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Adds newer TriggerHapticPulse used by SteamInput, fixing deck-uhid taret rumble events.
Ensures all sources report and support output capabilities sent by different target devices.
While at it, fix issues with udev rules and gamepads found while testing.

Closes #224

AI Disclosure:
I used an LLM to research some of the concepts used here, and to break the code up into individual commits once the concept was flushed out. I also used it to do an initial review.

pastaq added 4 commits October 9, 2026 20:33
write_event already handled SteamDeckHaptics/SteamDeckRumble/GenericRumble
but never declared OutputCapability entries, so the composite device never
routed any rumble or haptic events to it.

Adds missing OutputCapability entries
Sets enable_improved_rumble_emulation to match modern firmware's default
rumble curve.
GenericRumble, DualSense, and SteamDeckHaptics/SteamDeckRumble
OutputCapability were all silent no-ops in the source, and the target's
declared OUTPUT_CAPABILITIES only listed a generic ForceFeedback, so the
composite device never routed any of these events to it.

Also pushes an initial state report on UHID Start/Open so SDL's one-shot
capability probe succeeds immediately instead of depending on the
idle-poll cycle.
write_event already declared ForceFeedback output support and handled it
for evdev-originated force feedback, but no-op'd DualSense, SteamDeckRumble,
and GenericRumble events despite the driver already having a working
rumble() method, so rumble commands using those paths were silently
dropped.
@pastaq
pastaq force-pushed the pastaq/rumble_haptics branch from c47638b to 314d03c Compare October 10, 2026 03:35
pastaq added 3 commits October 9, 2026 21:17
Adds OutputEvent::SteamDeckHapticPulse to carry TriggerHapticPulse (0x8F)
reports through to sources, alongside the existing SteamDeckHaptics/
SteamDeckRumble variants. The deck-uhid target only parses and forwards
the report; each source decides how to act on it:

- Real Steam Deck hardware: passthrough, writing the raw packed report so
  its own firmware times the pulse.
- Generic evdev gamepads: converted to a kernel FF effect using the
  kernel's own replay length/count, so the kernel handles timing.
- Legion Go S, MSI Claw, Ultimate 2, AYANEO Haptics, DualSense, XPad UHID:
  these drive a plain on/off motor, so they derive a magnitude from the
  report's dB gain and self-schedule a stop on their next poll.

Also fixes PackedHapticPulseReport itself: its own doc comment already
described duration_us/interval_us/repeat_count/gain (dB, -24 to +6), but
the struct fields were named/typed as amplitude/period/count and never
included the gain byte at all.
…descriptor

Fixes the target's dpad state machine: DPadDirection::None's bitflag was
0x0f instead of 0x00, so accumulating any direction against the initial
None state was always a no-op and the dpad could never leave centered.

Replaces the report descriptor with one captured from hardware in enhanced
mode, so udev can tag the device as a joystick and SDL's dedicated parser
can read it.
…label

Previously the early rule ran through to its own end label. Since later
rules can tag the device with uaccess before the late rule ever runs, GOTO
straight from the early rule into the late rule's label instead.

Also renames the 8BitDo Ultimate 2 uaccess rule from 50- to 55- so it no
longer collides in priority with InputPlumber's own dynamic
50-inputplumber-hide-*-early rules.
@pastaq
pastaq force-pushed the pastaq/rumble_haptics branch from 314d03c to b5f7b17 Compare October 10, 2026 04:17
@pastaq
pastaq merged commit 106bc52 into main Oct 10, 2026
6 checks passed
@pastaq
pastaq deleted the pastaq/rumble_haptics branch October 10, 2026 04:38
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.82.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Rumble translation for DS5 controller doesn't work as expected

1 participant