Skip to content

DualSense keeps separate handle haptics with plain players - #986

Closed
minhthongdoan wants to merge 1 commit into
seedds:mainfrom
minhthongdoan:fix/dualsense-stereo-haptics
Closed

minhthongdoan wants to merge 1 commit into
seedds:mainfrom
minhthongdoan:fix/dualsense-stereo-haptics

Conversation

@minhthongdoan

@minhthongdoan minhthongdoan commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Game controllers served by gamecontrollerd on macOS report no advanced players to Core Haptics (NSCocoaErrorDomain 4097). The fallback for controllers without advanced players merges LeftHandle and RightHandle into a single Handles (or Default) engine, because rotating motors on Xbox controllers override each other when driven concurrently.

DualSense voice-coil actuators are physically independent and do not override each other. Merging them forces mono rumble, losing directional spatial cues and muting vibration detail.

When the controller's product category is GCProductCategoryDualSense, mark both handle channels simple directly without configuring the merge fallback. Left and right channels run plain players on their own handles, restoring stereo rumble (docs/reference/services.md).

Checked

  • Tests: t_haptics_apple — verified DualSense routes to separate LeftHandle and RightHandle plain players with independent levels, and that non-DualSense controllers retain the merge fallback.
  • Games run: Super Mario Odyssey (0100000000010000) — verified in-game directional stereo rumble (locating buried Power Moons vibrates left and right handles independently rather than collapsing into mono), plus a 5-step standalone probe (left-only, right-only, asymmetric 0.2/0.8, and zeroing).
  • Devices and OS: MacBook Air (M1, 2020), macOS 26.7.1, with a Sony DualSense Wireless Controller (054c:0ce6) over Bluetooth. iOS/iPadOS were not tested on hardware.

Docs

  • The finding is in its docs/reference/services.md entry, and python3 dm/tools/docs_symptoms.py was run (the symptom index)
  • No game files, keys or data extracted from a game in the change or the attachments

Game controllers served by gamecontrollerd on macOS report no advanced
players to Core Haptics (NSCocoaErrorDomain 4097). The fallback for
controllers without advanced players merges LeftHandle and RightHandle into
a single Handles (or Default) engine, because rotating motors on Xbox
controllers override each other when driven concurrently.

DualSense voice-coil actuators are physically independent and do not
override each other. Merging them forces mono rumble, losing directional
spatial cues and muting vibration detail.

When the controller's product category is GCProductCategoryDualSense,
mark both handle channels simple directly without configuring the merge
fallback. Left and right channels run plain players on their own handles,
restoring stereo rumble.

Checked:
- t_haptics_apple: verified DualSense routes to separate LeftHandle and
  RightHandle plain players with independent levels, and that non-DualSense
  controllers retain the merge fallback.
- Hardware playtest on macOS 26.7.1 (Apple silicon) with a Sony DualSense
  wireless controller over Bluetooth: verified distinct per-channel
  vibrations and in-game stereo rumble in Super Mario Odyssey (0100000000010000).
@github-actions github-actions Bot added host The Horizon host: SVCs, services, threads, memory (dm/host) docs Documentation labels Nov 3, 2026
@seedds

seedds commented Nov 3, 2026

Copy link
Copy Markdown
Owner

The code path is fine and the routing test passes in reading. I'm not landing it yet, because the description only mentions the mocked t_haptics_apple. The merge fallback exists because two plain players on separate engines overrode each other on real pads, and a mock can't show whether a DualSense over gamecontrollerd behaves differently. Could you say what you ran it on (DualSense over Bluetooth or USB, macOS version), and whether you felt left and right independently in a game? With that I'd land it as it is.

@minhthongdoan

Copy link
Copy Markdown
Contributor Author

Thanks for the review!

Here is the hardware test confirmation:

  • Environment: MacBook Air (M1, 2020), macOS 26.7.1.
  • Controller: Sony DualSense Wireless Controller connected via Bluetooth.
  • Testing results:
    1. Standalone probe: Ran an independent 5-step test sequence (left handle only, right handle only, asymmetric levels 0.2/0.8, and zeroing). The controller rendered distinct, isolated vibrations on each side without mutual cancellation or motor lock-up.
    2. In-gameplay (Super Mario Odyssey, 0100000000010000): Tested with the patched host. Stereo directional rumble is clearly distinguishable in game — specifically when locating a Power Moon buried underground, where the left and right handles vibrate independently to indicate direction, rather than collapsing into an identical mono rumble.
  • Scope note: Wired USB connection and iOS/iPadOS were not tested on hardware.

Regarding the CI failure: the single failing job is clang-tidy flagging warnings in dm/gfx/tests/t_geometry_hazards.m, which is outside this PR's diff.

seedds added a commit that referenced this pull request Nov 11, 2026
…ffers no advanced players, instead of one engine for both: a controller with both handle localities whose first advanced player is refused (gamecontrollerd, NSCocoaErrorDomain 4097) is moved to one engine on Handles or Default, because plain players on the Xbox Wireless Controller's two handle engines override each other, so a DualSense rumbled the same on both sides. A DualSense (GCProductCategoryDualSense) now gets no merge (configure, haptics_apple.m): each handle still asks for an advanced player and, when refused, moves to plain players on a new engine of its own locality, the path a one-engine controller already takes, so left and right keep their own levels. PR #986 set plain players at connection for every DualSense, which would also give up advanced players wherever a server offers them; its diagnosis, hardware test and the test's shape are kept. Why the Xbox controller's handle engines override each other is not known (its motors or its driver), so other controllers with both handles stay merged, and the reference entry says so. Checked here: the host tests pass, t_haptics_apple with two new cases (a DualSense without advanced players keeps two channels on LeftHandle and RightHandle at 0.3 and 0.4 and plays one side alone; with advanced players it makes no plain players), and test_docs. The author's runs were with the PR's form (MacBook Air M1, macOS 26.7.1, DualSense over Bluetooth): a five-step probe (left only, right only, 0.2 / 0.8, silence) and Super Mario Odyssey's buried Power Moons, each side felt apart. Not run: any DualSense with this form, so the right handle's refusal and new engine are unchecked on hardware (the left handle's is what main already met); USB, iOS, a DualSense Edge; lint_c.py; regress.py (the reach is one controller model's haptics route) (PR #986)

Co-authored-by: minhthongdoan <28199243+minhthongdoan@users.noreply.github.com>
@seedds

seedds commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Thanks for the hardware test, that was what this needed. It is on main as 477b4f8, with you as co-author, in a slightly different form:

  • A DualSense is no longer given the merge, but it is not set to plain players at connection either. Each handle still asks for an advanced player first; when the server refuses it, that handle moves to plain players on a new engine of its own locality (the path a one-engine controller already takes). The result on your setup should be the same as with your branch, and a DualSense keeps advanced players wherever a server does offer them (USB, iOS and other macOS versions are untested).
  • The reference entry says what was observed and with which form. Why the Xbox controller's handle engines override each other is not known (its motors or its driver), so the entry does not give voice coils as the cause, and other controllers with both handles stay merged.

One step differs from what you ran: the right handle's advanced player is now also refused once before its plain players start (on main only the left handle's was). I have no DualSense here, so that is covered by t_haptics_apple only. Could you run main with your DualSense over Bluetooth and say whether left and right are still felt apart in Odyssey? The log should show has no advanced players … plain players once for the left handle and once for the right, and no plays both motors on one engine line. If you can, a run over USB would be welcome too.

Closing this as landed; please reply here if main behaves differently from your branch.

@seedds seedds closed this Nov 11, 2026
@minhthongdoan

Copy link
Copy Markdown
Contributor Author

Tested the 477b4f85 haptics_apple.m change (ported onto my existing app's host build so I didn't have to rebuild the shaders) on MacBook Air M1 / macOS 26.7.1 with a DualSense (054c:0ce6) in Super Mario Odyssey (0100000000010000):

  • Bluetooth: has no advanced players (NSCocoaErrorDomain 4097): plain players logged once for left handle and once for right handle, no plays both motors on one engine. Left and right are still felt apart.
  • USB (Core Haptics path): Same behavior — 4097 on both left handle and right handle, plain players once each, no merge line, and the same feel as Bluetooth.

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

Labels

docs Documentation host The Horizon host: SVCs, services, threads, memory (dm/host)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants