Linux Switch Pro UHID device repeatedly dropped by Steam due to "hid_read failure"
维护者通常 1 天内回复
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 活跃
- 技术栈
- cpp, linux
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- C++
- 星标
- 66
- 派生
- 18
- 平均合并
- 14 小时 20 分钟
- 30 天内合并 PR
- 40
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
LizardByte/libvirtualhid 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 40/100
LizardByte/libvirtualhid#155 · 5 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 68/100
LizardByte/libvirtualhid#150 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 78/100
LizardByte/libvirtualhid#134 · 1 条评论 ·
维护者通常 1 天内回复
-
Windows: Xbox Series Share button is unavailable through Steam's VHF/XInput path可能重新可做 @LizardByte-bot 于 39 天前认领,目前没有进行中的 PR。 未关闭
LizardByte/libvirtualhid#106 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Linux: Chromium misremaps Xbox Series axes and triggers for virtual 045e:0b13 device可能重新可做 @LizardByte-bot 于 50 天前认领,目前没有进行中的 PR。 未关闭
LizardByte/libvirtualhid#84 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 LizardByte/libvirtualhid 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
MerginMaps/mobile#4741 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
ros-perception/image_pipeline#1198 ·
-
难度 2/5 1-3 小时 新手友好度 67/100
-
难度 2/5 1-3 小时 新手友好度 85/100
Icinga/icinga2#11077 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
pocoproject/poco#5515 ·
维护者通常 2 天内回复