Repository navigation
Windows: Progressive FPS degradation in Persona 5 Royal with virtual Xbox Series controller; disconnecting controller restores performance #194
Description
Describe the Bug
While streaming Persona 5 Royal through Sunshine to Moonlight on an Xbox Series X, the game's actual rendering FPS gradually deteriorates when using a controller through libvirtualhid.
Disconnecting the controller immediately restores approximately 120 FPS. Performance remains restored after reconnecting it, without restarting the game or Sunshine. I reproduced this behavior more than once.
This affects the Steam FPS counter and the game on the physical PC monitor, so it is a host-side rendering slowdown rather than only dropped streaming frames.
Environment
- OS: Windows 10 Pro, build 19045
- libvirtualhid Windows driver: 2026.914.1218.10
- Sunshine: 2026.914.233613
- Sunshine gamepad driver setting:
virtualhid - Virtual gamepad: Xbox Series, automatically selected
- CPU: AMD Ryzen 5 3600
- GPU: NVIDIA RTX 3070 Ti, 8 GB VRAM
- NVIDIA driver: 581.29
- RAM: 32 GB
- Client: Moonlight UWP on Xbox Series X
- Game: Persona 5 Royal, Steam version
- Streaming encoder: H.264 NVENC, P1, approximately 60 FPS
Steps to reproduce
- Start Sunshine with the Virtual HID backend and Xbox Series gamepad emulation.
- Connect from Moonlight on an Xbox Series X.
- Launch Persona 5 Royal and play using the Xbox controller.
- Continue playing for approximately 30–60 minutes.
- Observe progressively declining FPS in Steam's FPS counter and on the PC monitor.
- Disconnect the controller while leaving the game, Sunshine, and Moonlight running.
- Reconnect the controller.
Actual behavior
- Playing locally without Sunshine gives stable performance around 120 FPS.
- Streaming sessions initially run around 80–100 FPS, then gradually deteriorate.
- One session reached approximately 27 FPS after around 30 minutes.
- Another reached approximately 16 FPS after around an hour.
- More intensive controller use, particularly holding buttons, appears to accelerate the degradation. This is an observation rather than a measured input-rate comparison.
- Disconnecting the controller immediately restores approximately 120 FPS.
- FPS remains restored after reconnecting the controller.
- Sunshine logs show the virtual Xbox Series controller being created again around the recovery. The game process remains the same.
Diagnostics during the slowdown
- Persona's main thread was almost fully occupying one logical CPU, with most of that time spent in kernel mode.
- GPU utilization was only approximately 14–17%.
- GPU temperature was approximately 45°C, with no thermal throttling reported.
- GPU memory usage was approximately 2.2–2.3 GB out of 8 GB.
- Approximately 20 GB of system RAM remained available.
- After controller reconnection, the game's kernel CPU usage fell substantially and GPU utilization increased to approximately 54%, alongside the FPS recovery.
Other tests
- Disabling Sunshine's "Present OpenGL/Vulkan on top of DXGI" option did not resolve the issue.
- Stopping the Nahimic audio service while the slowdown was occurring did not restore performance.
- In an earlier occurrence, disconnecting the Moonlight client alone did not restore FPS, but fully exiting Sunshine did.
The controller disconnect/reconnect test is currently the most reliable way to clear the slowdown. I suspect an issue in the virtual controller/input path, but have not yet isolated whether the cause is libvirtualhid itself or its interaction with Windows, Steam Input, or the game.
Expected Behavior
Controller input, including sustained button presses, should not cause progressively increasing host-side CPU overhead or declining game FPS.
Performance should remain stable throughout long streaming sessions, without requiring the controller to be disconnected and reconnected to restore normal FPS.
Additional Context
When using vigembus driver all works fine and FPS is not dropping, so it's libvirtualhid driver issue in my honest opinion.
Activity
ReenigneArcher commentedon Oct 15, 2026
Investigation so far: pending input reports are capped at 32, and duplicate Xbox states are suppressed. Three short, accelerated stress runs of 100,000 updates exercised XInput polling, rumble, and Raw Input without progressive latency or client memory/handle growth. These tests used Windows 11 and driver
2026.1013.1243.17; they do not rule out the reported Windows 10 / Persona 5 Royal interaction. No root cause or fix is confirmed yet.Please capture CPU stacks with Windows Performance Recorder:
While the slowdown is already present, open PowerShell as Administrator and run the following. Return to the game during the 20-second recording and continue the same activity.
Disconnect/reconnect the controller using the method that restores FPS, keeping the game, Sunshine, and Moonlight running. Once performance recovers, repeat:
ZIP both ETL files and attach them or provide a download link. Include the FPS during each capture and whether Steam Input is enabled for this game. Comparing the sampled CPU stacks should help identify where the game's kernel CPU time is spent before and after recovery.
Investigation and comment prepared with Codex.
AtHisF1nest commentedon Oct 15, 2026
I cannot upload it here as every time it says that the upload fails, not sure why (it's 80MB). I uploaded it to my google drive and created a share link, please let me know if you want me to upload somewhere else:
https://drive.google.com/file/d/1LXF2wsoXPfGm1mkhTkA8uGbQkizXiBKF/view?usp=sharing
Thanks for investigating. I completed both 20-second CPU.Verbose captures. The ZIP includes the ETL files, capture notes, and recorder log.
Persona 5 Royal, Sunshine, and Moonlight remained running throughout; the game and Sunshine process IDs were unchanged.
Additional reproduction observations:
This time I reproduced the progressive drop from 120 FPS to approximately 27 FPS in only four minutes. The most effective activity was repeatedly pressing LT/RT, running with the left stick, and looking around with the right stick, with brief releases.
Face buttons might also contribute, but their effect was much less obvious. Triggers and/or sticks seem more strongly associated with the slowdown, although I have not tested each input separately enough to identify which one causes it.
With ViGEmBus, the same game continues to run at a stable 120 FPS, without this degradation.
These captures used Windows 10 Pro, build 19045, Sunshine 2026.914.233613, and libvirtualhid driver 2026.914.1218.10, with the virtual Xbox Series controller (gamepad = xseries).
My codex also did brief analysis and it's the review:
libvirtualhid-194-cpu-analysis.md
ReenigneArcher commentedon Oct 21, 2026
Thanks for the captures. I independently checked both ETLs and confirmed the main-thread bottleneck: approximately 87% of sampled CPU time was inside
XInputGetStateduring the slowdown, versus 22% after reconnection. The dominant slow-state path goes through XInput device enumeration,CloseHandle, and Windows'xinputhid.sys/WDF cleanup. This identifies where the CPU time goes, but not why its cost grows.Please test this Sunshine configuration:
Restart Sunshine and reconnect Moonlight so the controller is recreated, then repeat the same stick/trigger activity for at least 10 minutes. Keep Steam Input and other settings unchanged, and report whether FPS remains stable or progressively drops.
This exercises libvirtualhid's separate Xbox 360 transport and should help isolate the Xbox Series/
xinputhidpath.Investigation and comment prepared with Codex.
AtHisF1nest commentedon Oct 29, 2026
When changed to x360, everything started to work smoothly. What is the reason? My controller is from xbox series X
Thanks you though
ReenigneArcher commentedon Oct 30, 2026
Thanks for confirming that
x360works. Please try one more test to check whether the Windows GameInput interaction triggers the slowdown:Open PowerShell as Administrator and temporarily stop the service:
Stop-Service GameInputSvcSet Sunshine to:
Restart Sunshine and reconnect Moonlight, then repeat the same stick/trigger activity for 10 minutes. Keep other settings unchanged.
Check the service status, then restore it afterward, including if the test fails:
Please report whether FPS stayed stable or progressively dropped, and whether
GameInputSvcwas still stopped at the end.Investigation and comment prepared with Codex.
AtHisF1nest commentedon Oct 30, 2026
Thank you for this.
changed to "xseries" gamepad and tested with GameInputSvc running and without it running. When it's stopped, I cannot replicate the issue, when it's running, then it's the same problem all again. I hope this helps.
I found this:
https://github.com/nefarius/GameInput-Fault-RE/blob/master/docs/windows10-queue-identity.md
Looks like it's because of the driver on windows 10, that's why you could not replicate that on windows 11..
ReenigneArcher commentedon Oct 30, 2026
Yes, nothing we can really do it about this on Windows 10. I highly doubt Microsoft will be fixing it either since Win 10 is EOL. I'm documenting the limitation, but that's about all I can do.
AtHisF1nest commentedon Oct 30, 2026
yeah I know, thank you though buddy, I know what is going on now! :)