mirror of
https://github.com/games-on-whales/wolf.git
synced 2026-10-15 13:02:03 +00:00
[GH-ISSUE #267] Controller reconnected with wrong mappings (Steam hot-plugging) #186
Labels
No labels
🧠 1 - 🤖 999
AMD
bug
bug
cannot reproduce
documentation
duplicate
easy
enhancement
enhancement
enhancement
fixed?
fixed?
good first issue
hard
help wanted
Intel
invalid
LXC
medium
moonlight-protocol
Multi GPU
nixos
not a bug
nvidia
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/wolf#186
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ironoa on GitHub (Oct 12, 2025).
Original GitHub issue: https://github.com/games-on-whales/wolf/issues/267
Originally posted by @ABeltramo in #264
it happened to me a couple of times only (just tested and I couldn't replicate). When the PS5 controller is passed from Moonlight (detected as
DualSense Wireless Controllerby the Steam Controller settings), if the controller loses connection and then it gets reconnected, it is then detected asPS5 Controller(different name), and all the buttons mappings are flipped/broken/unusable. In that case, one needs to restart Steam.Issue opened as a reminder, probably @ABeltramo knows already what's going on ;)
@ABeltramo commented on GitHub (Oct 12, 2025):
Most likely related to https://github.com/games-on-whales/inputtino/pull/31
@piotrminkina commented on GitHub (Aug 28, 2026):
Ran into this and traced it end to end on
stable(7f416ec). Two independent things have to change, and I think the first one is why the backport @ABeltramo mentioned never landed in practice.1. The inputtino fix is merged, but Wolf pins a commit that predates it.
src/core/CMakeLists.txt:52-55pins:fd136cfis from 2025-03-24; games-on-whales/inputtino#31 ("Fix DualSense MAC address") merged 2025-08-16. At the pinned commit,PS5Joypad::createreads:so
DeviceDefinition::device_uniqis accepted, but it only ever reaches the sysfsuniqstring — the MAC actually used in the HID reports is unconditionally random. Passing adevice_uniqat this pin would produce a device whoseuniqand whose HID MAC disagree.On inputtino
stablethe same function is the fixed version:2. Wolf never populates
device_uniq.src/moonlight-server/control/input_handler.cpp:125:device_physanddevice_uniqstay at their""defaults, so even after bumping the pin the MAC would still be random on everycreate_new_joypad()call — which is every controller-arrival packet, not just every session.What it looks like in a log. Five different identities for one physical pad inside 50 seconds, each one a fresh
Creating PS joypad for controller 0:uniq→/sys/.../uniq→ udev →ID_SERIAL, which is what Steam keys its per-controller config on, so each of those is a brand-new unconfigured DualSense as far as Steam is concerned.Possible derivation for a stable value. Wolf already indexes per-client controller settings by slot (
client_settings->controllers_override[controller_number]), so a MAC derived deterministically from (paired client id, controller number) would give "same client, same slot ⇒ same identity" without introducing any new persistent state.Xbox pads are a separate, larger gap. The uinput path (
input_handler.cpp:109→joypad_xbox.cpp) does not setuniqat all — the udev events Wolf emits for an Xbox pad carry noUNIQ=and reportID_SERIAL=noserial. So a stable identity there needs uinput-side support first, if that is in scope for this issue or should be split off.Happy to open a PR for the pin bump plus the
device_uniqplumbing if that direction sounds right.@piotrminkina commented on GitHub (Aug 28, 2026):
Cross-reference, since it changes what "backport the inputtino fix" means in practice: games-on-whales/inputtino#43 (
[2/5]of the roadmap in games-on-whales/inputtino#44) is open and reworking PS5 MAC handling — currently a monotonic counter with anis_active_on_systemcollision check.That is orthogonal to this issue rather than a fix for it: a counter still hands out a different address on every
create, and it resets with the process, so Steam still sees a new controller. The part that would close this one is a caller-supplied stable address —DeviceDefinition::device_uniq, already available since games-on-whales/inputtino#31 — which Wolf would populate from something like (paired client id, controller slot).Two things worth deciding here rather than upstream:
BUS_USBis preferable to plumbing a stable MAC at all. Steam keys DualSense config by address only for pads presenting as Bluetooth — a single profile here holds bothconfigset_DS<mac>.vdfandconfigset_54c-ce6-<hash>.vdffor the same pad — so a bus flip would sidestep the address question entirely.PS5Joypad::createhardcodesuse_bluetooth = truewith an unreachableBUS_USBbranch.