Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Driver to support FANATEC input devices, in particular ForceFeedback of various wheel-bases

License

NotificationsYou must be signed in to change notification settings

gotzl/hid-fanatecff

Repository files navigation

Known devices

The Wheel Base should be set to 'PC mode' for the driver to be selected (CSL Elite and CSL DD: red LED)

  • 0EB7:0E03 FANATEC CSL Elite Wheel Base
  • 0EB7:0005 FANATEC CSL Elite Wheel Base PS4
  • 0EB7:0020 FANATEC CSL DD / DD Pro / ClubSport DD Wheel Base
  • 0EB7:6204 FANATEC CSL Elite Pedals
  • (experimental: 0EB7:6205 FANATEC CSL Pedals Loadcell)
  • (experimental: 0EB7:6206 FANATEC CSL Pedals LC V2 Loadcell)
  • (experimental: 0EB7:0001 FANATEC ClubSport Wheel Base V2)
  • (experimental: 0EB7:0004 FANATEC ClubSport Wheel Base V2.5)
  • (experimental: 0EB7:183b FANATEC ClubSport Pedals V3)
  • (experimental: 0EB7:0006 Podium Wheel Base DD1)
  • (experimental: 0EB7:0007 Podium Wheel Base DD2)
  • (experimental: 0EB7:0011 CSR Elite/Forza Motorsport Wheel Base)

Installation

Dependencies

This is aout-of-tree kernel module. Building it depends on

  • compiler (gcc)
  • make
  • kernel-headers

Examples of installing kernel-headers for some distros:
Ubuntu:sudo apt install linux-headers-generic orsudo apt install linux-headers-$(uname -r)
Fedora:sudo dnf install kernel-devel
Arch:pacman -S linux-headers

Compile and install the driver

make# or `make LLVM=1` in case clang was used to compile the kernel (like in CachyOS)sudo make install

Reload the new udev rules, depending on the Linux distribution, without rebooting:

sudo udevadm control --reload-rules&& sudo udevadm trigger

This installs the kernel modulehid-fanatec.ko in thehid dir of the running kernel and putsfanatec.rules into/etc/udev/rules.d. These rules allows access to the device forgames group and sets deadzone/fuzz to 0 so that any wheel input is detected immediately.The driver should get loaded automatically when the wheel is plugged.

Packaging

If you don't want to compile and install manually, following is a list of known packaged distributions.

SystemPackage
AURhid-fanatecff-dkms

Implementation

Integration with Linux Kernel Subsystems

This driver implements aLinux force-feedback (FF) driver, allowing force-feedback effects to be uploaded via the standard Linux libinput API. These effects are translated into a custom HID protocol and sent to the device asynchronously, using a timer that defaults to 2ms.

Supported are a bunch of effects, the code is largely copy-pasted/adapted fromnew-lg4ff.
Currently, FF_FRICTION and FF_INERTIA effects have experimental support in this driver.

Additionally, the driver integrates with theLinux LED interface, enabling control of the RPM and other LEDs found on most Fanatec wheel rims. This is achieved by writing to the appropriatesysfs files. Further details on these and othersysfs files exposed by the driver can be found in theDevice-Specific Section.

Integration with Wine/Proton

Wine/Proton provides multiple methods for accessing HID devices. Typically, it interfaces with the Linux libinput subsystem either directly or through SDL, using this information to create a corresponding Windows input device. While this allows games to utilize HID and force-feedback functionality, it does not support LEDs or other advanced features.

Notably, the Fanatec SDK—used by certain games—often encounters issues when interacting with the Windows input device created in this manner.

As an alternative, Wine/Proton can useHIDRAW to create Windows input devices directly from a device’s HID descriptor. This approach allows Wine/Proton to communicate with the device as if running in a native Windows environment, enabling proper interaction with the Fanatec SDK for LED and display control.

For force feedback to function correctly in Wine/Proton using HIDRAW, the HID descriptor must exposeHID PID functionality. To achieve this, the driver extends the device's HID descriptor with the necessary HID PID components and exposes them through the HIDRAW interface. HID PID commands from Wine/Proton are intercepted, translated into the custom HID protocol, and sent to the device. All other communication is directly passed through.

Enabling/Switching between libinput/SDL and HIDRAW

wine-vanilla

By default, HIDRAW is not enabled in wine. To enable it, see theEnableHidraw registry key.

wine-proton

The Proton wine fork maintains a hardcoded list of devices for which HIDRAW is enabled. However, there is no official Proton version with HIDRAW enabled yet, see alsothis PR.
In the meantime you can useproton-ge-custom which includes the required patches starting withGE-Proton9-26, where HIDRAW is enabled for Fanatec wheel bases by default (prior versions of Proton will fall back to the Linux libinput/SDL method).To force using libinput/SDL setPROTON_ENABLE_HIDRAW=0 %command% as launch-option.

List of compatible games

Games that are expected to work (tested by me and others more or less regularly):

Gamecompat-layerlibinput-FFBhidraw-FFBhidraw-FanatecSDKNotes
ACprotonyesyesno
ACCprotonyes(*)yesyes
ACEprotonno, crash on startupyesyes
Automobilista 2protonno, crash on startupyesnoincludes FanatecSDK but doesn't drive LEDs/display
BeamNG.drivenativeyes--
BeamNG.driveprotonyesyesno
DiRT 4protonyes??
DiRT Rally 2(**)protonno, crash on stage-loadyesno
WRC(**)protonno, crash on startupyesyescan't be played anymore due to anti-cheat
F1 2020/2021protonyesyesnoFFB is weak and some effects seem to be missing, see (#22)
F1 2Xprotonno, crash on startupyesyesFFB is weak and some effects seem to be missing
rFactor2protonyesyesyesneed to set negative FFB strength
Rennsportwine/protonno, crash on startupyesyes
RRREprotonyesyesyes
Wreckfestprotnoyes??

Thelibinput-FFB denotes if the game/FFB works when using Windows input device derived from libinput/SDL.
Thehidraw-FFB column denotes if the game/FFB works when using Windows input device derived from hidraw device.In case of the latter, thehidraw-FanatecSDK column denotes if the FanatecSDK is able to drive LEDs/display.

(* input devices can get mixed-up; best have only the wheel-base connected and always use the same USB-slot)
(** uses experimental FF_FRICTION effect)
(*** unsure if all effects are present)

Device specific

Advanced functions of wheels/bases are available via sysfs. Generally, these files should be writable by users in thegames group. Base sysfs path:

/sys/module/hid_fanatec/drivers/hid:fanatec/0003:0EB7:<PID>.*/

Common

  • Set/get range: echo number in degrees torange
  • Get id of mounted wheel:wheel_id
  • Tuning menu (experimental):tuning_menu/*
    • Get/set 'standard'/'advanced' mode:andvanced_mode
    • Get/set tuning menu slot: echo number intoSLOT
    • Values get/set:BLI DPR DRI FEI FF FOR SEN SHO SPR ... (files depend on wheel-base)
    • Reset all tuning sets by echoing anything intoRESET

CSL Elite Base

  • RPM LEDs:leds/0003:0EB7:0005.*::RPMx/brightness (x from 1 to 9)

ClubSport Forumla1 wheel

  • RPM LEDs (combined with base)
  • Display:display (negative value turns display off)

CSL Elite pedals

  • Loadcell adjustment:load (no readback yet)

ClubSport Pedals V3

  • pedal vibration:rumble
    • 0xFFFF00 -> both pedals should rumble
    • 0xFF0000 -> throttle pedal rumble
    • 0xFF00 -> break pedal rumble
    • 0 -> stop rumble

Controlling advanced functions

To access advanced functions from user space please see thehid-fanatecff-tools project which also aims to support LED/Display access from games.Note that some games natively support LEDs/display by using the FanatecSDK and HIDRAW, see thecompatible games list.

Planned

  • Support more effects
  • Support more devices / advances functions of devices
  • Support different wheels-rims and their quirks
  • Packaging for more distros

Troubleshooting

No FFB, nothing on LEDs/display

Check permissionsls -l /dev/hidrawXX, if it is not0666, then check withudevadm test /dev/hidrawXX if there are any additional rules overwriting the mode set by thefanatec.rules file.Check correct driver module version is loaded:modinfo hid-fanatec | grep hidraw.Check game logPROTON_LOG=1 WINEDEBUG=+hid,+input,+dinput %command%, ensure that there is a line calledfound 3 TLCs. If it is not there, then a proton/wine version is used that doesn't support multi TLCs (yet).

Game hangs/crashes at startup

  • Clear enumerated HID devices:protontricks -c "wine reg delete 'HKLM\System\CurrentControlSet\Enum\HID' /f" <appid>
  • If using separated pedals, 'pump' a pedal (to generate input) during game startup (seen in F1 23, AMS2, ??)

Large deadzone or chunky input

Check the deadzone/flatness/fuzz settings:

evdev-joystick -s /dev/input/by-id/usb-Fanatec*-event-joystick

This should output s.t. like... flatness: 0 (=0.00%), fuzz: 0) for all axis.If this is not the case then check that the udev rule works. Execute

udevadm test /dev/input/by-id/usb-Fanatec*-event-joystick

and see if/etc/udev/rules.d/99-fanatec.rules gets called.

Dirt Rally 2: no FFB with CSL DD / ClubSport DD

Editinput/devices/device_defines.xml and add a line like this

<device name="ftec_csl_dd_pc" priority="100" type="wheel" />

Adjust the00200EB7 to your PID (first 4 chars).

ACC: wrong controller mapping (ie pedals show up as wheel input and vice-versa)

Try to deleteMy Documents/Assetto Corsa Competizione/Config/controls.json
Note: You'll have to re-map all your Buttons afterwards!

ACE: wrong controller mapping (ie pedals show up as wheel input and vice-versa)

Try to deleteMy Documents/ACE/input_devices.inputdeviceconfiguration
Note: You'll have to re-map all your Buttons afterwards!

Contact

If you have an issue, feature request or a general question, feel free to open a ticket on GitHub or reach out onpitcrew.gg.

Disclaimer

I am not associated with Endor AG/Fanatec.I take absolutelyno responsibility for any malfunction of this driver and their consequences. If your device breaks or your hands get ripped off I'm sorry, though. ;)

About

Driver to support FANATEC input devices, in particular ForceFeedback of various wheel-bases

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp