Repository navigation
fix(steam): stop re-sending the 0x79 connect edge while the endpoint is busy - #26
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Steam's
controller.txtloggedSetLocalControllerConnectionState ... wireless_establishedabout 700 times a second while a controller was connected.Cause:
SteamPuckController::task()cleared each slot'susbConnedge state wheneverhid[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-sent0x79=02, which also re-anchoredconnEdgeMsso 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 checkandmake buildpass.test-connspam-d19b90don Linux (kernel 7.3): the connect line appears once per connect and no longer floodscontroller.txt.hid-steam ... steam_get_conn_status failed with error -22line in dmesg is from the wake boot-mouse interface (1.1, no feature reports) and predates this change.🤖 Generated with Claude Code