Skip to content

Virtual controller rig: drive N players via uhid for automated multi-player testing #136

Description

@aradanmn

Idea (Scott, HW-2 2026-07-22): create virtual DS4-like gamepads via uinput so the test rig can drive up to 4 players itself — no humans juggling controllers. Enables automated cross-input/isolation tests, hotplug stress, and scripted benchmark inputs.

Feasibility recon (on-Deck 2026-07-22)

  • /dev/uinput present and writable by deck (crw-rw----+, ACL grants it); uinput module loaded.
  • evsieve built at ~/.local/share/PolyMC/bin/evsieve.
  • Missing: injection tooling — no evemu-device/-play, no python evdev/uinput. Add python-evdev (or evemu), or drive via evsieve.

Design notes

  • Virtual pad must present gamepad caps (buttons/axes) so Controlify/GLFW sees a controller AND so raw-binding (_list_raw_external_pads) enumerates it as external (has a real jsN, not the 28de:11ff built-in virtual).
  • Mimic a DS4: Bus=0005 Vendor=054c Product=05c4, Name "Wireless Controller", event+js handlers.
  • Create the pad → controller_monitor hotplugs it as a slot → inject scripted events into the uinput device (they flow through the bwrap-bound jsN into the game).
  • Shares the evdev/uinput path with Seamless controller reconnect via a per-slot stable virtual device (input proxy) #38 (input proxy) — could reuse tooling.

Use cases: I4.3 cross-input automation, burst-spawn (#71) repro (create 4 pads pre-launch), benchmark input automation (M4/BENCH-AB).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions