-
Notifications
You must be signed in to change notification settings - Fork 5
logi ffb
logi-ffb is a userspace DirectInput force-feedback proxy for the
direct-drive wheels, built from the ffb-proxy crate in the
userspace/logi-dd workspace. It presents a virtual force-feedback wheel
that mirrors the real one and forwards effects onto the real wheel's kernel
evdev FF interface. User-facing instructions are in
Force Feedback in Games; this page is the design.
It is a generic DirectInput FFB proxy (constant force, springs, damper, friction, rumble, periodic waveforms), not the TrueForce texture system; TrueForce rides its own path (TrueForce Protocol) and is unaffected.
The real wheel's HID report descriptor has no PID collection (the USB
"Physical Interface Device" force-feedback usage pages). That is fine for
the native path: the kernel driver builds a complete evdev FF interface
regardless, and games going through Wine's SDL/evdev backend
(PROTON_ENABLE_HIDRAW=0, the default) get full force feedback.
The trouble is the other path. Some DirectInput games under Wine/Proton
need PROTON_ENABLE_HIDRAW=1 for reasons unrelated to force feedback (to
see the full button/axis set, for example). In that mode Wine reads the HID
descriptor directly, finds no PID collection, and never sends any FFB. The
game runs; the wheel never pushes back.
-
A virtual uhid device.
logi-ffbcreates a device on/dev/uhidwith an authored HID descriptor that DOES include a PID collection, enumerating as "logi-ffb Virtual Wheel" (046d:c2dd). -
Input mirroring. The real wheel's inputs (steering, pedals on
ABS_RX/ABS_RY/ABS_RZ, buttons) are mirrored onto the virtual device, so the game reads a complete wheel from it. - Effect decoding and forwarding. Whatever FFB effects the game sends to the virtual device are decoded and re-issued on the real wheel's kernel evdev FF interface. Both the native path and the proxied hidraw path end up driving the exact same kernel FF code on the same wheel, so fidelity is identical either way; no effect type exists on one path and not the other.
-
Enumeration steering. While wrapping a game,
logi-ffbsteers the game away from seeing the real wheel a second time, so it does not enumerate two look-alike devices and bind the force-less one.
The virtual wheel deliberately uses its own name and product ID rather than cloning the real wheel's. An earlier design cloned the real VID/PID, and the enumeration steering then hid the real wheel from the game entirely, including its steering axis. The cost of the distinct identity: games that auto-detect wheels by name or PID may treat the virtual device as a generic joystick and need a one-time manual binding.
Wrap the game command (this is what Steam launch options do):
logi-ffb %command%
The proxy brings the virtual wheel up, runs the game command to completion, and tears the virtual wheel down when the game exits.
Standalone mode for testing or non-game setups:
logi-ffb --daemon # up until SIGINT/SIGTERM- The
hid-logitech-dddriver loaded and bound to the wheel. - Access to
/dev/uhid: the packaged udev rule grants it to theinputgroup; otherwise run as root.
cd userspace/logi-dd
cargo build --release -p ffb-proxy
# binary: target/release/logi-ffbHardware-validated (effects forwarded end to end, pedals verified across all three axes), and confirmed working in Le Mans Ultimate by a contributor. More in-game reports from DirectInput sims are welcome; see Building and Contributing.