Optional addon: make gamepads visible to Steam/Proton and in-desktop browsers#274
Conversation
Re-sync browser pads after WebRTC reconnect and recover missing server associations so js events are not dropped. Add optional SELKIES_ENABLE_UINPUT_BRIDGE (off by default) for Steam/Proton and in-desktop browsers that need a real kernel controller, without changing the default LD_PRELOAD interposer path. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
|
I prefer making Steam / Proton / browsers work in the current architecture, rather. I did find an issue where a refresh of Selkies makes the gamepad disappear (works on html5gamepad.com the first time Selkies is accessed), so let me fix that, first. |
Keep SELKIES_ENABLE_UINPUT_BRIDGE as the supported path and note that legacy socket-only deployments without the flag are out of scope. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Can we check this if the uinput requirement is now not needed? The gamepad now works consistently in html5gamepad.com. |
|
I addressed |
|
AI Summary:
If you're hitting a specific app the interposer genuinely can't reach — Proton's pressure-vessel sandbox is the usual suspect, since it can stop both the preload and the socket from crossing the namespace — I'd love to dig into that with you and fix it at the interposer/preload layer. That keeps it working in the unprivileged case, which a uinput path can't. On the reconnect fix: good catch, and the diagnosis is exactly right — but that one's already handled on |
Summary
/dev/inputdevice. This PR adds an optionaladdons/uinput-bridgepath (SELKIES_ENABLE_UINPUT_BRIDGE, off by default) that mirrors pads to a kernel Xbox-like controller when/dev/uinputis available.jsN is not connected). Client re-sync + server recreate/associate recover that without enabling uinput.Addresses #168. Keeps uinput optional per #95 (LD_PRELOAD remains default).
Test plan
SELKIES_ENABLE_UINPUT_BRIDGE: connect over HTTPS, verify gamepad works for LD_PRELOAD apps; refresh/reconnect and confirm buttons still work (nojs0 is not connectedspam).SELKIES_ENABLE_UINPUT_BRIDGE=true,python-evdev, and/dev/uinputaccess: confirm a kernel device appears; restart Steam and verify controller detection; check html5gamepad.com inside the remote desktop./dev/uinput.