Skip to content

fix(steam): stop re-sending the 0x79 connect edge while the endpoint is busy - #26

Merged
ripps818 merged 1 commit into
mainfrom
fix/steam-conn-spam
Oct 23, 2026
Merged

ripps818 merged 1 commit into
mainfrom
fix/steam-conn-spam

Conversation

@ripps818

Copy link
Copy Markdown
Owner

Summary

Steam's controller.txt logged SetLocalControllerConnectionState ... wireless_established about 700 times a second while a controller was connected.

Cause: SteamPuckController::task() cleared each slot's usbConn edge state whenever hid[s].ready() was false. ready() is also false while an IN report is in flight, which happens constantly while input streams. The next pass then saw a "new" connect edge and re-sent 0x79=02, which also re-anchored connEdgeMs so the resend-until-acked window never closed.

Fix: clear the edge state only on un-bond (!g_slot[s].used) or USB unmount (!USBDevice.mounted()).

Ported from upstream safijari#316 (fixes upstream safijari#304), with the comment rewritten to explain why ready() is the wrong test.

Testing

  • make check and make build pass.
  • Flashed test-connspam-d19b90d on Linux (kernel 7.3): the connect line appears once per connect and no longer floods controller.txt.
  • The hid-steam ... steam_get_conn_status failed with error -22 line in dmesg is from the wake boot-mouse interface (1.1, no feature reports) and predates this change.

🤖 Generated with Claude Code

…is busy

The per-slot edge state was cleared whenever hid.ready() was false, which
is also the case while an IN report is in flight. The next pass then saw a
fresh connect edge and re-sent 0x79=02, flooding Steam's controller.txt
with "wireless_established" ~700x/s. Clear it only on un-bond or USB
unmount.

Ported from upstream safijari#316 (fixes upstream safijari#304).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ripps818
ripps818 merged commit b10c62e into main Oct 23, 2026
3 checks passed
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.

1 participant