Input: rumble for the generic pads Linux can rumble (GreenAsia, DragonRise, Zeroplus, ACRUX and others), read directly or behind x360ce #2835
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!2835
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2835"
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?
@sonokweii on GitHub · 2026-11-29 17:53 UTC · original
sonokweii:generic-rumble→main· +1214 −21 · 5 files · 1 commits · openGeneric HID pads now vibrate with the title, for the pads Linux's small force-feedback drivers know. A pad gets the title's vibration whether
genericreads it or a remapper such as x360ce shows it as an Xbox pad. Only the GreenAsia "2In1 USB Joystick" (0E8F:0003) was tested on hardware; the others follow Linux's drivers byte for byte and are left for owners to confirm.Why. These pads have motors, but they list no force-feedback actuators, so the vibration is lost both ways:
genericreads the pads with no way to run the motors. The README said generic pads do not rumble.Each family takes a plain HID output report, documented by a small Linux driver.
Pads and protocols (in
DEVICES, keyed by vendor and product):0, 0, strong, weak(0..0x7F; 0F30:0111 0..0xFF in Linux's four-field layout)51 00 weak 00 strong 00, thenFA FE 00 00 00 0051 00 weak 00 strong 00 00, thenFA FE 00…; stopF3 00…; weak 0x0A sent as 0x0B00 02 strong weak01 weak strong 00 00 00 0001 weak-on/off strong01 flags FF FF 10 E0 magnitude, then02 01 00…; stop06 00…The SmartJoy ids that Linux marks
HID_QUIRK_SKIP_OUTPUT_REPORTS(6666:8802, 6666:8804, 0925:8866, 0B43:0003) are left out, as is 0079:0011, which hid-dr does not rumble.How.
gameinput/generic_rumble.rs. The title's threads only store the latest speeds. One worker thread, started at the first rumble, sends a pad its frames when they change, so the title never waits on a pad.WriteFilewith the existingWRITE_MSlimit (playstation::write): over the interrupt OUT endpoint when the pad has one, else as SET_REPORT, as Linux's usbhid does.genericgets that slot's vibration. Any other listed pad gets the strongest of the XInput slots', motor by motor, because a remapper hides which pad sits behind which slot.stop_rumble()stops the motors for good at the end: these pads keep their last report after the process is gone, and title threads still running could otherwise start them again. A newly opened pad gets its driver's start frames, which stop the motors.VICTORY_GENERIC_RUMBLE=0leaves every pad's motors alone. README updated.generic.rs:Handle::opentakes open flags, andHandle/Parserare visible to the new module.playstation.rs:writeis visible to it. No new crates or features;Cargo.lockand the shader translator are untouched.Tested.
00 00 00 7F 7Fsent throughWriteFile, as this module writes (and throughHidD_SetOutputReport). All zeros stops it.f4608f0) ran behind x360ce, and the pad vibrated with the title. This branch's two routes are covered by the unit tests.cargo test --release -p victory-hle --lib generic_rumble): every protocol's frames, the layout check, the device table, coalescing, the rescan rule and the stop latch.cargo clippy -p victory-hle --no-deps --all-targets -- -D warningsreports only the three findings already on main:unnecessary_lazy_evaluationstwice ingameinput.rs, anditems_after_test_moduleinlifecycle.rs.Not covered.
pad rumble: <vendor:product> (<family>) foundshows the pad was taken, and a refusal line says why one was left alone.VICTORY_GENERIC_RUMBLE=0turns this module off.playstation::stop_rumblehas the same end-of-game window (title threads can restart the motors after the stop). It is not changed here.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.