Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Linux Switch Pro UHID device repeatedly dropped by Steam due to "hid_read failure"

Aperta
#176 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
cpp, linux

Direzione di ricerca

Start by reproducing the issue on Fedora Linux with Sunshine's Nintendo Switch Pro emulation and compare it with the working Xbox 360 mode. Investigate the libvirtualhid UHID behavior associated with Steam's HIDAPI read failure while evdev continues receiving input. Done means the virtual Pro Controller remains available throughout a Moonlight session without repeated disconnects.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the Bug

When Sunshine emulates a Nintendo Switch Pro Controller via libvirtualhid on Fedora Linux, Steam and KDE repeatedly lose and rediscover the controller after a few seconds.

The virtual input device itself does not disappear from the kernel, and evdev input continues working.

Steam logs:

Controller using HIDAPI driver, vid=0x057e, pid=0x2009
Nintendo Controller subtype 3
Controller device closed after hid_read failure
Controller PollState Changed from 2 to 0

"/proc/bus/input/devices" remains unchanged during the disconnect:

N: Name="Sunshine (libvirtualhid) Nintendo Pro Controller"
P: Phys=libvirtualhid/uhid/057e:2009/7
H: Handlers=event28 js1

N: Name="Sunshine (libvirtualhid) Nintendo Pro Controller (IMU)"
P: Phys=libvirtualhid/uhid/057e:2009/7
H: Handlers=event27

"udevadm monitor --kernel --subsystem-match=input" and:

udevadm monitor --kernel --subsystem-match=hidraw

produce no add/remove events while Steam/KDE report the controller disconnecting.

Expected Behavior

The virtual Nintendo Switch Pro Controller should remain continuously available to Steam/KDE for the duration of the Moonlight session, without HIDAPI read failures or repeated disconnect/reconnect cycles.

Additional Context

"evtest /dev/input/event28" continues receiving input immediately even while Steam and KDE consider the controller disconnected.

Example:

Event: type 3 (EV_ABS), code 0 (ABS_X), value 1104
Event: type 3 (EV_ABS), code 1 (ABS_Y), value 4321
-------------- SYN_REPORT ------------

Sunshine logs creation normally:

Gamepad will be Nintendo Switch Pro controller (auto-selected by client-reported type)
Gamepad 0 will be Sunshine (libvirtualhid) Nintendo Pro Controller

Switching Sunshine's emulated controller type from Nintendo Switch Pro to Xbox 360 completely fixes the issue. Steam remains connected and input works normally.

Lingua principale
C++
Stelle
66
Fork
18
Merge medio
14h 20m
PR unite (30g)
40

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di LizardByte/libvirtualhid

Tutte le issue di LizardByte/libvirtualhid

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.