Windows: driver host process crashes ~1s after DualSense virtual gamepad creation; all libvirtualhid devices become invalid until reboot
维护者通常 1 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 43/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- cpp
调研方向
Start by examining the attached sunshine.log.5 and sunshine.log.4, especially the Windows virtual HID input report failures and the later unavailable or unlicensed driver message. Trace the DualSense device creation, state submission, and removal paths in the Windows implementation; the issue does not name source files or tests. Done means reproducing or isolating the driver host termination and confirming devices recover without a reboot.
由索引模型根据 Issue 内容生成。
描述
Describe the Bug
Environment
- OS: Windows 10 Pro 22H2 (build 19045.6466)
- Sunshine: 2026.914.233613 (commit 63d35f702ee9e362e43263742981836ec0710384)
- libvirtualhid Windows driver: 2026.914.1218.10 (active license)
- GPU: NVIDIA GeForce RTX 5060
- gamepad_driver:
all(first occurrence), thenvirtualhid - Virtual gamepad: DualSense, auto-selected by client-reported type
- Client: Moonlight for Windows 6.2.0
- Physical controller: Sony DualSense (CFI-ZCT1W)
Description
About 1 second after Sunshine creates the virtual DualSense gamepad, the device driver host process terminates. From that moment every libvirtualhid device (gamepad, mouse, keyboard) fails with "invalid handle", the virtual controller disconnects from the session and Sunshine becomes unstable / crashes. It also happens when the controller is disconnected on the client side.
Log excerpt (Italian Windows, translated):
[16:44:21.951] Info: Gamepad 0 will be Sunshine (libvirtualhid) PS5 Controller
[16:44:22.861] Warning: submit libvirtualhid gamepad state: submit Windows input report: The process hosting the driver for this device has been terminated.
[16:44:22.861] Warning: submit libvirtualhid gamepad gyroscope: submit Windows input report: Invalid handle.
[16:44:22.861] Warning: submit libvirtualhid gamepad acceleration: submit Windows input report: Invalid handle.
(~48,000 similar warnings in 6 minutes, mostly gyroscope/acceleration, then mouse/keyboard/scroll)
[16:48:54.166] Warning: create libvirtualhid gamepad: create Windows virtual HID device: Invalid handle.
[16:48:54.167] Info: Gamepad 0 will be DualShock 4 controller (fallback to ViGEmBus)
After restarting Sunshine with gamepad_driver = virtualhid, the driver is reported as "Virtual HID Driver is selected but is unavailable or unlicensed" and all gamepad types are disabled, even though the license is active. Only a reboot restores the driver. The following Sunshine start reports "nvprefs: Opened undo file from previous improper termination".
Steps to reproduce
- Windows host with libvirtualhid 2026.914.1218.10, gamepad_driver = all or virtualhid
- Connect from Moonlight (Windows 6.2.0) with a DualSense, so the DualSense type is auto-selected
- Use the controller, or disconnect it during the session
- The driver host process terminates shortly after
Attachments
sunshine.log.5 (crash at 16:44), sunshine.log.4 (driver unavailable after restart)
Expected Behavior
The virtual gamepad is created and removed without crashing the driver host. If the host does crash, the driver recovers without a reboot and is not reported as unlicensed.
Additional Context
No response
- 主要语言
- C++
- 星标
- 93
- 派生
- 25
- 平均合并
- 15 小时 16 分钟
- 30 天内合并 PR
- 30
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
LizardByte/libvirtualhid 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
LizardByte/libvirtualhid#204 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
LizardByte/libvirtualhid#206 ·
维护者通常 1 天内回复
-
Experiencing Complete Control Loss After Close/DC of Moonlight And Reconnect with DualSense可能已有人在做 @ReenigneArcher 于 4 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
LizardByte/libvirtualhid#196 · 4 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 12/100
LizardByte/libvirtualhid#194 · 3 条评论 ·
维护者通常 1 天内回复
-
Impulse trigger vibration not functioning on Moonlight 6.2.0可能已有人在做 @ReenigneArcher 于 10 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 18/100
LizardByte/libvirtualhid#193 · 1 条评论 ·
维护者通常 1 天内回复
查看 LizardByte/libvirtualhid 的全部 Issue
相似的 Issue
-
bug IO
难度 2/5 1-3 小时 新手友好度 65/100
MrNeRF/LichtFeld-Studio#3824 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
-
bug code-review testing tooling
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
aristocratos/btop#1945 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 79/100
boykopovar/AnyPS5#11291 ·
维护者通常 1 天内回复