You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Convert and set rumble duration from incoming Output Report when in DS4W mode #356
Regarding rumble, the DS4's standard output report includes both the strength as well as the duration.
Currently we set the strength, but not the duration, which can lead to rumble not responding correctly.
Necessary to check if the maximum, non-infinite, DS4 rumble duration (0xFE) matches the maximum duration of the DS3, though there is not much that can be done if DS4's maximum is greater than the DS3's
changed the title [-]Set rumble duration accordingly to incoming Output Report when in DS4W mode[/-][+]Convert and set rumble duration from incoming Output Report when in DS4W mode[/+]on Apr 26, 2024
Investigated this: the DS4 output report (report ID 0x05) does not actually carry a rumble duration field. Its layout is valid flags (bytes 1-3), weak/right motor strength (byte 4), strong/left motor strength (byte 5), lightbar RGB (bytes 6-8), and lightbar flash on/off duration (bytes 9-10) - confirmed against Linux hid-playstation.c, RPCS3's ds4_pad_handler.cpp, and psdevwiki. The 0xFE referenced in the original report is DS3 motor-duration semantics, not anything present in the incoming DS4W output report.
The symptom (rumble behaving inconsistently / cutting out) is real, but the cause is on the DS3 side: no rumble path in the driver (DS4W emulation, PID force feedback, or XInput HID) ever wrote the DS3 output report's own motor duration bytes, so they were left at whatever residue happened to be in the shared buffer - an accidental 0xFF (infinite) on USB, and an accidental, never-restored 0xFE on Bluetooth after the wireless startup sequence set it and forgot to reset it.
Fixed on branch fix/356-rumble-duration by writing an explicit, finite duration (0x96, matching what the real PS3 console itself sends) on every rumble strength update, backed by a new keep-alive timer that re-sends the report every 200 ms while a motor is active so held rumble never times out. This also closes a related gap where a crashed application could leave a motor running forever with no way for the controller to stop it on its own.
Activity
[-]Set rumble duration accordingly to incoming Output Report when in DS4W mode[/-][+]Convert and set rumble duration from incoming Output Report when in DS4W mode[/+]nefarius commentedon Sep 6, 2026
Investigated this: the DS4 output report (report ID
0x05) does not actually carry a rumble duration field. Its layout is valid flags (bytes 1-3), weak/right motor strength (byte 4), strong/left motor strength (byte 5), lightbar RGB (bytes 6-8), and lightbar flash on/off duration (bytes 9-10) - confirmed against Linuxhid-playstation.c, RPCS3'sds4_pad_handler.cpp, and psdevwiki. The0xFEreferenced in the original report is DS3 motor-duration semantics, not anything present in the incoming DS4W output report.The symptom (rumble behaving inconsistently / cutting out) is real, but the cause is on the DS3 side: no rumble path in the driver (DS4W emulation, PID force feedback, or XInput HID) ever wrote the DS3 output report's own motor duration bytes, so they were left at whatever residue happened to be in the shared buffer - an accidental
0xFF(infinite) on USB, and an accidental, never-restored0xFEon Bluetooth after the wireless startup sequence set it and forgot to reset it.Fixed on branch
fix/356-rumble-durationby writing an explicit, finite duration (0x96, matching what the real PS3 console itself sends) on every rumble strength update, backed by a new keep-alive timer that re-sends the report every 200 ms while a motor is active so held rumble never times out. This also closes a related gap where a crashed application could leave a motor running forever with no way for the controller to stop it on its own.Fix rumble keep-alive timer races flagged in review (issue #356)
Merge pull request #482 from nefarius/fix/356-rumble-duration
Fix rumble duration handling (issue nefarius#356)