Skip to content

Linux: expose Switch Pro motion through UHID #112

Description

@ReenigneArcher

Summary

The Linux backend does not expose motion sensors for the Nintendo Switch Pro
Controller profile. Steam therefore does not display gyro input for the virtual
controller.

Tested path

  • Client: Moonlight Qt
  • Host application: Sunshine
  • Host OS: CachyOS Linux
  • Backend: libvirtualhid uinput/evdev
  • Virtual profile: Nintendo Switch Pro Controller
  • Test application: Steam controller tester

Standard controller input works, but Steam does not expose gyro at all.

Current implementation

uses_uinput_gamepad_profile() routes the Switch Pro profile through uinput.
UinputGamepad::submit() emits ordinary evdev buttons and axes and ignores the
profile's packed native HID report. This route cannot expose the descriptor-
driven Switch motion reports even though the public profile declares motion
support.

The older Sunshine request LizardByte/Sunshine#3838 identified the same uinput
limitation and proposed a UHID-backed Switch profile. It was closed as stale
before the current libvirtualhid backend existed, so this issue tracks the work
at the backend that now owns the virtual device.

Expected behavior

The Linux backend should create a descriptor-driven Switch Pro device that can
accept GamepadStateAdapter::set_motion() updates and expose them to HID
consumers such as Steam.

Acceptance criteria

  • The Switch Pro profile uses a Linux backend capable of delivering its native
    HID motion reports, most likely UHID.
  • Steam exposes the Switch Pro gyro and reports changing values on Linux.
  • Standard buttons, sticks, digital triggers, Capture, battery, and rumble do
    not regress.
  • Effective backend capabilities accurately report whether motion is available.
  • Linux backend and lifecycle tests cover the descriptor-driven route.

Related issue

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions