mirror of
https://github.com/games-on-whales/inputtino.git
synced 2026-10-16 05:12:03 +00:00
[GH-ISSUE #14] Rumble event listening effectively caps framerate #5
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/inputtino#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @maxdirocco on GitHub (Aug 16, 2024).
Original GitHub issue: https://github.com/games-on-whales/inputtino/issues/14
Hello! First of all, thank you for your hard work on this project.
I am using Sunshine on Fedora Linux 40.
GPU: RX 6900 XT
CPU: i7 14700K
Since this library has been adopted into Sunshine as of:
https://github.com/LizardByte/Sunshine/pull/2606
I have noticed that when my controller is rumbling continuously, the framerate is effectively capped at 50FPS. I believe I have narrowed down this issue to:
github.com/games-on-whales/inputtino@25e75254d1/src/uinput/joypad_utils.hpp (L169)When modifying this line and recompiling Sunshine, the "capped" framerate changes to the inverse of the specified delay (provided the GPU / CPU can keep up, of course), e.g.
I am not sure what the proper fix for this is, but I've gone as low as 3ms without noticing any issues.
Please let me know if more information is required.
Thanks and have a great day.
@ABeltramo commented on GitHub (Aug 17, 2024):
Thanks for the very detailed report, I'm in the middle of other stuff, but I'll check it out properly in the next few days.
Can you just confirm that this issue wasn't present in Sunshine before inputtino?
@maxdirocco commented on GitHub (Aug 17, 2024):
Hi, thanks for getting back to me!
When compiling Sunshine with the cmake flag
SUNSHINE_USE_LEGACY_INPUT(https://github.com/LizardByte/Sunshine/pull/2606/commits/a11b69c38e64b5210e0fd4577dfb3f7592f99e6c), this issue is not present. This, plus the above experiment with changing the sleep duration suggests to me that the issue is tied to inputtino.I'm not too familiar with the code here, but I'll conduct some additional experiments on my end.
Beyond that, if more information is required (logs, a video demonstration of the issue, etc.), I will do my best to produce that ASAP.
@ABeltramo commented on GitHub (Aug 17, 2024):
Thanks for confirming, that should narrow it down then. Just one last question: is this happening on any game or is it specific to some games? It seems odd that that part is causing a slowdown since it's running on a different thread but maybe the game (or the kernel itself) is accumulating those rumble events until we process them? 🤔
@maxdirocco commented on GitHub (Aug 17, 2024):
Yeah I also found that strange.
I've been able to reproduce this on the following games:
Both running on the latest version of Proton Experimental. I have yet to find a native Linux game in my library with a lot of rumble events.
I also tried Helldivers II, and I couldn't seem to reproduce the issue.
I will test more games / Proton configurations later today and will report back here.
@maxdirocco commented on GitHub (Aug 18, 2024):
A little bit more information:
I tested another game, Dying Light (2015), and observed this issue in both the native Linux port and when running the game through proton.
Disabling "Vibration" in the in-game settings menu alleviates the issue.
@ABeltramo commented on GitHub (Aug 19, 2024):
I've just pushed a potential fix, when you've got a chance could you give it a go on your setup? This should completely remove the busy loop and potentially be even better than the old Sunshine implementation.
@maxdirocco commented on GitHub (Aug 19, 2024):
Seems like the fix works! I'm no longer experiencing frame drops in the above games.
Please let me know if there's anything else you need from me.
Thank you so much for the work you put into this project!
@ABeltramo commented on GitHub (Aug 19, 2024):
Thank you for the incredibly detailed issue, it was a very easy fix thanks to all the info that you've provided!