-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rumble lasts too long with some games #487
Comments
This is probably caused by the aliasing effects occurring between the update frequency we have to use to prevent the firmware from crashing, and the update frequency we get pushed from ff-memless. I'm planing to bypass ff-memless with one of the next versions. Currently, we have 20ms as the shortest interval before the firmware crashes, and we get 1-50ms intervals (with a strong tendency towards 50ms) from ff-memless. In the worst case, we get the last update at 50ms while the previous has been at 40ms. This means, we are allowed to update the rumble at the 60ms mark earliest but we will see the next update from ff-memless only at 100ms mark - this is 50ms late in the worst case. This is probably what you are seeing. If you compile from source, you can tweak this define:
It has been set to 50ms because users have reported crashing firmware with lower values. The previous default has been 20ms. The original XB1S firmware allowed 10ms without crashing. This also depends on your Bluetooth adapter. The firmware uses 100hz internally (thus 10ms is the shortest interval allowed). This also matches the resolution of the rumble haptics parameters. I'm pretty sure we can go back to 20ms or faster when we remove ff-memless and do rumble directly. |
BTW: This queuing should not occur at all. It cannot be caused by xpadneo because we especially designed the rumble throttling to never ever queue any rumble effects. We only delay them until the next interval, and if anything comes in before that event, we will update our pre-queued event and discard the current one - except it is meant to stop a rumble, in which case we ensure that a rumble stop is always queued last. This looks a lot like what we were seeing with the 5.x firmwares before rumble throttling was established in xpadneo: Rumble effects queued up in Bluetooth because the firmware couldn't accept it fast enough, and then it would either crash the firmware, or 2-3 rumble effects were playing late. So your issue may also well be that rumble doesn't run through xpadneo at all and uses SDL hidraw access instead. OTOH, SDL uses the same rumble throttling technique we suggested. Please try disabling Steam Input for this game (disable controller input) and try again. If this is a game ported from Playstation, it may very well not work at all with a controller if Steam Input is disabled. In this case ensure that xpadneo's hidraw device cannot be read or written by anyone. See |
Changing the delay to 20ms worked great!
|
Thanks for confirming. I'm queuing this to review before v0.11. |
I happen to reproduce this issue with my system.
I guess it has something to do with either kernel, bluez, or my bluetooth receiver... |
Yeah, there may be an issue with the linux-firmware package lately which shipped an update for some Bluetooth chipsets. Can you try reverting that to a previous version? |
I bought my Xbox Series controller last week and I had this 2 times, one without xpadneo in Prodeus and the second time with xpadneo in Prey (2017). So, I would say it's unrelated to xpadneo and it happens randomly. Disconnect and reconnect the controller or rebooting the computer solves the issue. Sounds like a problem with the Bluetooth driver.
EDIT: it's not fixed |
Yeah this happens due to overloading the firmware with rumble commands in some situations. It's very common with Bluetooth but can also happen with the Xbox radio dongle (non-bluetooth), and very rarely with USB. The latter two connection modes do not run through xpadneo. And we found that the original Windows drivers put at least 10ms between each rumble command. Both xpadneo and xone mimic that behavior and it fixed a lot of issues. With Bluetooth, we needed to go to at least 20ms, for some chipsets even 50ms. SDL mimics the 20/50ms intervals to solve it if it bypasses xpadneo via hidraw. xpadneo currently using ff-memless is more likely triggering this hardware behavior due to timing aliasing, and I will remove ff-memless from future releases which could improve the situation. xone already doesn't use ff-memless. |
Version of xpadneo
73be2eb
Controller Model
Connection mode
Installed Software
Protocol Information
Please help us identify at which layer the problem can be found if you want
to report mapping errors or if the controller fails to be detected:
evtest
is showing issues (describe the issues below)BTN_NORTH
andBTN_WEST
are intentionally swappedjstest
is showing issues (describe the issues below)gamepad-tool
is showing issues (post console output below)Please describe how it is failing below in the next sections.
Severity / Impact
Describe the Bug
When playing Ghost of Tsushima, the game will rumble the controller. However, these effects last much longer than they should, and are queued up—often, the controller will rumble at one speed, stop, rumble at another for a second, stop, and then repeat this process several times. Entering the pause menu where no more vibrations should be queued causes this pattern to repeat ~15 times for ~20 seconds. This does not happen over USB.
Steps to Reproduce
Expected Behavior
Individual vibrations should be much shorter, and they should stop once entering the pause menu.
Screenshots / GIFs / Videos
IMG_5069.mp4
System Information
Controller and Bluetooth Information
xpadneo-btmon.txt
xpadneo-dmesg.txt
xpadneo-lsusb.txt
Additional Context
The text was updated successfully, but these errors were encountered: