Improvements to Linux kernel support for Logitech Flight System G940
This device has partial Linux support since 2010, but with bugs including some axes conflated/missing.
I have made both some relatively uncontroversial improvements, submitted upstream (fix axis/button mappings, support LEDs, remove hard autocenter) and some more experimental changes which are only here, to support additional force feedback effects by including ff-memless-next from Michal Malý, a sort of emulation layer for periodic and rumble effects which was submitted upstream circa 2014, never merged, but it still works great for this.
The repository contains a replacement for the hid_logitech module called hid_logitech_next and a support module called ff_memless_next.
Module is tested with kernel version 5.4.0
. Other kernels might work, but this is not tested. In any case, use of this module is at your own risk.
Module may be installed manually or by creating a DKMS package (for Ubuntu, Debian etc.).
This installation procedure must be run whenever the kernel has been upgraded.
Preconditions: The repository has been cloned from GitHub, and current directory is the top level source directory.
- Kernel headers for running kernel must be present in
/lib/modules/(VERSION)/
- Compile and install module:
cd drivers/ && ./local_make.sh modules && sudo ./local_make.sh modules_install
- Blacklist the old hid_logitech module:
sudo echo "blacklist hid_logitech" > /etc/modprobe.d/blacklist-hid-logitech.conf
- Unload old module if loaded:
sudo rmmod hid_logitech
The DKMS package will ensure that a new module is automatically built whenever the kernel is upgraded.
Preconditions: The repository has been cloned from GitHub, and current directory is the top level source directory.
- Install kernel headers package (
linux-headers-(VERSION)
) - Install dependencies:
sudo apt install dkms debhelper dpkg-dev
- Build package:
dpkg-buildpackage
- Install package:
sudo dpkg -i ../g940-dkms*.deb
NOTE : Other packages might be required for building, install those who are missing if step 3 fails.
- (re)connect device
- Run and verify that hid_logitech_next exists, but not hid_logitech:
lsmod | grep hid
- If the old module is still loaded, perform a restart.