Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#176 1 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@ReenigneArcher 已经在做这个了。

开始于 2026年10月3日。

  • #180 来自 @ReenigneArcher —— 未关闭

评估

难度
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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

LizardByte/libvirtualhid 的其他 Issue

查看 LizardByte/libvirtualhid 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。