STEAM CSOPORT
Linux Force Feedback LinuxFF
STEAM CSOPORT
Linux Force Feedback LinuxFF
5
JÁTÉKBAN
30
ONLINE
Alapítva:
2015. december 12.
Nyelv:
Angol
Összes téma > Általános témák > Téma részletei
Driver package for Logitech Wheels
Today I took some time to provide a "least effort" method to build the new and experimental drivers for all Logitech force feedback wheels. Since I personally don't really like distributing Linux kernel modules, I created a source archive that should build with a single command. The advantage of this is that it should work on most Linux distributions. However, if you try it on kernels before 4.2, some changes to the code may be needed. There is also at least one change needed for later kernels, but I'll deal with that if it is needed.

You can download the drivers here:

https://www.dropbox.com/s/n4bmw631d4t1m0t/LogitechFFDrivers.zip?dl=0


Read the README carefully and report any problems you may have.


Update 29 Feb 2016:
Added ff-memless to modules load
Added conditional changes for kernel 4.4 and later

Update 22 Aug 2016:
Changed Makefile to remove the hid-logitech module again after loading usbhid loads the wrong one.
Fixed bug causing the wheel to turn right on Intertia/Friction effects for all wheels except G920.
Legutóbb szerkesztette: Edwin; 2016. aug. 22., 13:31
< >
115/151 megjegyzés mutatása
Hi Edwin,

Thanks for providing this package.

I just attempted to test Logitech G29. After compiling without errors using:

sudo make

and then loading with:

sudo make load_g29

I'm getting the error:
insmod: ERROR: could not insert module hid-logitech/hid-logitech.ko: Unknown symbol in module

rmmod hid-logitech-hidpp hid-logitech klgd-ff-plugin klgd usbhid hid-generic hid rmmod: ERROR: Module hid_logitech_hidpp is not currently loaded rmmod: ERROR: Module hid_logitech is not currently loaded rmmod: ERROR: Module klgd_ff_plugin is not currently loaded rmmod: ERROR: Module klgd is not currently loaded Makefile:22: recipe for target 'load_g29' failed make: [load_g29] Error 1 (ignored) insmod hid/hid.ko modprobe hid-generic modprobe usbhid insmod KLGD/klgd.ko insmod KLGDFF/plugin/klgd_ff_plugin.ko insmod hid-logitech/hid-logitech.ko insmod: ERROR: could not insert module hid-logitech/hid-logitech.ko: Unknown symbol in module Makefile:22: recipe for target 'load_g29' failed make: *** [load_g29] Error 1

I'm using Arch Linux, kernel 4.4.1-2-ARCH.
Legutóbb szerkesztette: Duke; 2016. febr. 27., 20:39
On further inspection it appears to be symbol
input_ff_create_memless
at line 29 in
hid-logitech.mod.c

hid-logitech.mod.c: { 0x24f88f98, __VMLINUX_SYMBOL_STR(input_ff_create_memless) },
Legutóbb szerkesztette: Duke; 2016. febr. 27., 21:55
Is it possible that when
sudo make
is called the resulting
hid-logitech.mod.c
is missing
#include <linux/input.h>
?
You're right about the missing ff_memless. That's a dependency that I missed (it's also loaded by the xbox controller driver). I'll fix that. In the meantime do:
sudo modprobe ff-memless sudo make load_g29

If you're not getting errors from "make" (no sudo needed for building), then the above should be the only problem.
Am I missing something?

Compilation seems to be successful only flagging the two following warnings:

/usr/src/LogitechFFDrivers/hid-logitech-hidpp/hid-logitech-hidpp.c:2379:22: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]

and

/usr/src/LogitechFFDrivers/hid-logitech-hidpp/hid-logitech-hidpp.c:2379:22: note: (near initialization for ‘hidpp_driver.input_configured’)

After what seems like a successful loading of the G29 module with:

sudo modprobe ff-memless sudo make load_g29

the control presets in game provide the following:

KEYBOARD (AERTY)
KEYBOARD
CONTROL PRESET 3

When selecting CONTROL PRESET 3 all keys on the wheel work as expected but the pedals do not register. While there does seem to be force present in the wheel it's as though maximum force is be applied preventing the wheel from being to turned either left or right from centre. This is exactly the same behaviour as when your driver patch has not been loaded.

Should there be a G29 preset showing up in GRID Autosport CONTROL menu or is additional configuration needed to obtain the correct mappings and behaviour?
Legutóbb szerkesztette: Duke; 2016. febr. 28., 15:40
Ah, I see you ran into another thing I forgot to mention. In hid-logitech-hidpp.c, line 1961, you'll find a function with a return type and value commented out. If you put those back (and remove the void), the compile warning should be gone. I'll see if I can make that automatic.

With regard to GRID Autosport, there is no G29 preset yet. You could try to make one though. In the install directory you can find the following file: share/data/forcefeedback/devicesetup.xml. You can duplicate the G27 lines and change the first 8 characters of the name id to "C24F046D". If this doesn't work, you can still switch back to G27 compatibility mode through the method described in another post.

So I had a good day of testing today. Fortunately I have access to a G27, G29 and a G920.

There's just one fix needed in the root Makefile for the G29. -rmmod hid-logitech needs to follow the loading of ff-memless as ff-memless pulls in the hid-logitech version from /lib/modules/ provided in later kernels as a dependency rather than the patch you've provided.

load_g29: -rmmod hid-logitech-hidpp klgd-ff-plugin klgd usbhid hid-generic hid insmod hid/hid.ko modprobe hid-generic modprobe usbhid modprobe ff-memless insmod KLGD/klgd.ko insmod KLGDFF/plugin/klgd_ff_plugin.ko -rmmod hid-logitech insmod hid-logitech/hid-logitech.ko

G29 testing results:

Adding the following to GRID\ Autosport/share/data/forcefeedback/devicesetup.xml didn't work:

<!-- Logitech G29 --> <FFBDevice name="{C24F046D-0000-0000-0000-504944564944}" scaleForce="1.2" scaleFriction="0.3" baseFriction="0.05" maxFriction="100.0" scaleEffects="1.19" delay="0.0"/>

Switching to fallback mode with the following works but kind of defeats the purpose of the work you've put in to the G29 patch:

sudo bash -c 'echo G27 > ./alternate_modes'

Essentially is seems we are now just waiting on Feral to provide a G29 preset patch.

G920 testing results:

sudo make load_g920
seemed to the load the modules needed for G920 but the wheel was not recognised and unfortunately couldn't find any errors that might help out.

Additionally adding the following to GRID\ Autosport/share/data/forcefeedback/devicesetup.xml didn't help GRID recognise the G920 either:

<!-- Logitech G920 --> <FFBDevice name="{C262046D-0000-0000-0000-504944564944}" scaleForce="1.2" scaleFriction="0.3" baseFriction="0.05" maxFriction="100.0" scaleEffects="1.19" delay="0.0"/>
Legutóbb szerkesztette: Duke; 2016. febr. 28., 23:06
I didn't know you had a G920 as well. I forgot something with regard to the G920, which I didn't add yet because nobody mentioned it yet. The G920 needs to be switched to a different mode (device 046d:c262). If you don't do this, it is only visible as 046d:c261. Did you check with lsusb?

Switching is done with 'usb_modeswitch'. Try something like:
sudo usb_modeswitch -v 046d -p c261 -m 01 - M 0f00010142

If it works, the wheel should reset and show up as c262.

You can also put this into a usb_modeswitch config file and use an udev rule to have this done automatically. However, it doesn't appear to work with USB hubs.
lsusb shows:

Bus 001 Device 002: ID 046d:c261 Logitech, Inc.

After executing
sudo usb_modeswitch -v 046d -p c261 -m 01 - M 0f00010142
lsusb show the the same ID 046d:c261. No mention of c262?
Also forgot to mention that it's plugged straight in to the motherboards USB 3.0 port. No USB hubs in use.
The better way is to make a config file named "046d:c261" in the right location. Which could be /etc/modeswitch.d/ or /usr/share/usb_modeswitch. Put this in there:
# Logitech G920 Racing Wheel DefaultVendor=046d DefaultProduct=c261 TargetVendor=046d TargetProduct=c262 MessageEndpoint=01 ResponseEndpoint=01 InquireDevice=0 NoDriverLoading=1 MessageContent="0f00010142"

Then find the udev rule file for usb_modeswitch (usually /usr/lib/udev/rules.d/40-usb_modeswitch.rules) and add the following to it:
ATTR{idVendor}=="046d", ATTR{idProduct}=="c261", RUN+="usb_modeswitch '%b/%k'"

This should make it switch automatically when the g920 is connected directly.
Absolutely beautiful, success! Thanks for all your help Edwin. If you need any more testing done I'm in your debt.
You're welcome. Any test reports are appreciated. Just make a post if you have anything interesting.
hey, thanks for the package.

i have hard time figuring this out though.

i have logitech driving force gt

do i still have to use this command?

sudo make load_g29

cause i tried sudo make load_dfgt but it obviously isnt working :)

and when i load_g29 then i loose all my roccat mouse/keyboard input - have to replug the devices:

sudo make load_g29
rmmod hid-logitech-hidpp hid-logitech klgd-ff-plugin klgd usbhid hid-generic hid
rmmod: ERROR: Module hid_logitech_hidpp is not currently loaded
rmmod: ERROR: Module klgd_ff_plugin is not currently loaded
rmmod: ERROR: Module klgd is not currently loaded
rmmod: ERROR: Module hid is in use by: hid_roccat_ryos hid_roccat_koneplus
Makefile:22: recipe for target 'load_g29' failed
make: [load_g29] Error 1 (ignored)
insmod hid/hid.ko
insmod: ERROR: could not insert module hid/hid.ko: File exists
Makefile:22: recipe for target 'load_g29' failed
make: *** [load_g29] Error 1


edit: lsmod | grep hid reports

lsmod | grep hid hid_logitech 32768 0 hid_generic 16384 0 usbhid 45056 0 ff_memless 16384 1 hid_logitech mac_hid 16384 0 hid_roccat_ryos 16384 0 hid_roccat_koneplus 16384 0 hid_roccat 16384 2 hid_roccat_ryos,hid_roccat_koneplus hid_roccat_common 16384 2 hid_roccat_ryos,hid_roccat_koneplus hid 114688 7 hid_generic,hid_roccat_ryos,hid_logitech,hid_roccat_koneplus,usbhid usbcore 196608 16 uas,snd_usb_audio,usb_storage,ohci_hcd,ohci_pci,snd_usbmidi_lib,ehci_hcd,ehci_pci,hid_roccat_common,usbhid,xhci_hcd,xhci_pci
Legutóbb szerkesztette: Xpander; 2016. márc. 15., 6:33
Indeed you ran into the problem I mentioned somewhere of having more dependencies on HID. Basically you would need to add the following line directly below "load_g29:"
-rmmod hid_roccat_ryos hid_roccat_koneplus hid_roccat hid_roccat_common

and the following lines after "modprobe hid-generic"
modprobe hid_roccat_ryos modprobe hid_roccat_koneplus

Note that those lines start with a tab!

However, if something goes wrong during the load, you could be left without keyboard/mouse driver. Which is slightly annoying. I cases like that, it is handy to have a PS/2 keyboard nearby.
< >
115/151 megjegyzés mutatása
Laponként: 1530 50

Összes téma > Általános témák > Téma részletei