Auto-switch FFB (Force Feedback) profiles based on running game detection — native Linux, written in Rust.
- Watches
/procfor game processes (native + Wine/Proton.exe) - When a known game starts → applies the matching FFB profile via
sysfs - When no game runs → reverts to default profile
- Zero dependencies on external tools (no oversteer, no Python)
- Thrustmaster wheels (T500RS, T300RS) using
hid-tmff2kernel driver - Linux sim racing (AMS2, Dirt Rally 2, Forza via Proton/Wine)
- Solo dev, single machine — runs as a lightweight daemon
cargo build --release
sudo cp target/release/ffb-switcher /usr/local/bin/# Generate default config
ffb-switcher init
# List profiles
ffb-switcher list
# Check current FFB device status
ffb-switcher status
# See running game processes
ffb-switcher ps
# Start watching (foreground)
ffb-switcher watch
# Apply a specific profile manually
ffb-switcher apply "AMS2 - Touring"Default location: ~/.config/ffb-switcher/config.toml
device = "/sys/bus/hid/drivers/hid-tmff2"
poll_interval_ms = 2000
[[profiles]]
name = "AMS2 - Touring"
game_processes = ["AMS2.exe", "AMS2_AVX.exe"]
[profiles.ffb]
gain = 85
autocenter = 20
spring = 40
damper = 30
friction = 15
[[profiles]]
name = "Dirt Rally 2"
game_processes = ["DirtRally2.exe"]
[profiles.ffb]
gain = 90
autocenter = 30
spring = 50
damper = 40
friction = 25
[[profiles]]
name = "Default"
game_processes = []
[profiles.ffb]
gain = 75
autocenter = 50
spring = 35
damper = 25
friction = 15- Process detection: reads
/proc/*/command/proc/*/exesymlinks every 2s - Wine/Proton support: follows
.exesymlinks which Wine exposes - Profile matching: maps process names to profiles from config
- FFB control: writes directly to
sysfsparameters under the hid-tmff2 driver path - Auto-revert: falls back to default profile when no game is running
# /etc/systemd/user/ffb-switcher.service
[Unit]
Description=FFB Profile Auto-Switcher
After=multi-user.target
[Service]
ExecStart=/usr/local/bin/ffb-switcher watch
Restart=on-failure
[Install]
WantedBy=default.targetsystemctl --user enable --now ffb-switcher- Linux kernel with
hid-tmff2module loaded - Read/write access to
/sys/bus/hid/drivers/hid-tmff2/*/(may need sudo or udev rules) - Rust 1.70+ (build only)
MIT