The online racing simulator
LFS, Wine and force feedback
(7 posts, started )
LFS, Wine and force feedback
Hi Guys,

Does anyone have LFS working well through Wine with force feedback? For a long time I couldn't get force feedback to work at all in Linux, but now with Ubuntu 9.04 (or Linux Mint 7) it "sort of" works. When I start the game the wheel (Logitech Momo) lights up, but when I am inside the car, the wheel nudges to the left every second and just keeps doing that until it starts bumping off the stop at the hard left. I can drive the car but the nudging is a little distracting!

I have wine 1.1.28 and 2.6.28-11 kernel.
the chucking is wine's fault... it has a half-assed directinput implementation... there's no way around it until wine can support every "effect" that wheels use. Shrug
Ah, well I figured it was probably something lacking in Wine.. I guess I'll keep my Xp install around until it's fixed or Virtualbox's direct3d is usable...
#4 - GabbO
Hello I am bumping this thread to get some feedback from linux users. I ran LFS with unmodified wine, but there are no force feedback effects from my wheel (except the default centering force)
Is there any news about FF with LFS?

Wheel: Logitech Momo Force (the Red one)
OS: Ubuntu 16.04, Wine 1.6.2
#5 - expr
Quote from GabbO :Hello I am bumping this thread to get some feedback from linux users. I ran LFS with unmodified wine, but there are no force feedback effects from my wheel (except the default centering force)
Is there any news about FF with LFS?

Wheel: Logitech Momo Force (the Red one)
OS: Ubuntu 16.04, Wine 1.6.2

I may have some info that could help you out. Does FFB work for you otherwise in Ubuntu?

LFS recently (one or two revisions ago) changed its handling of controllers, and this had perhaps a bigger effect for Wine users (I run a similar setup to yours, but not the same wheel): after the update, refreshing controllers – which also happens when toggling fullscreen status, or exiting LFS – turns on auto-centering permanently, until some other application disables it. This will mask any other FFB events. (I assume this is a bug in Wine, which may have been solved since; after all, 1.6 is already a rather old version of Wine.)

I've made a tool to work around the issue, but it's not the most user-friendliest to use, so before discussing that I'd like to know if FFB works with your LFS to begin with: when you first turn on your computer, and launch LFS, your wheel should not be centering itself. If then, before changing active window or fullscreen state, you go in game and drive, FFB should work for you. If this is the case, I'm rather sure my workaround could work for you, too. (edit: first make sure your FFB settings in LFS settings are reasonable if you've been playing with them when trying to fix the issue)
#6 - GabbO
Thanks, I have just tried again, and the force feedback indeed gets stuck with that centering force. I can reset it only if I unplug my wheel, exiting LFS will leave me with the centering active.
The FFB quality is not that good, but it is there now - except if I refresh or change controllers. (There are 2 controller versions available, with a (js) and an (event) postfix.
#7 - expr
Ok. I'm afraid I can't help with the FFB quality issue. You could try using a newer version of Wine, although I doubt it would make a difference.

Regarding the persistent auto-centering, it seems like your issue is similar to mine. I've come up with two workarounds for that (you already discovered at least one of those, but it's not really a very good solution in so many ways).

The one I've settled to using is resetting the auto-centering force from another application. The tricky part to this is that you have to reset it each time Wine/LFS combo sets it – i.e. whenever you refresh or change controllers (or switch to full screen). It's not that annoying in practice, but it needs a little set-up – not very user friendly, but not incredibly hard either. Instructions inside spoiler.

Spoiler - click to revealThere are many ways to accomplish this, but I think overall the easiest route is to use the 'ffset' tool. If you're running Ubuntu, you can install that by installing the package 'joystick' from the default repositories (AFAIK).

Secondly, to use the script below, you need to locate your wheel's device file in the directory /dev/input/by-id/. The files should be named after the devices they represent, so it shouldn't be too hard to find the one you're looking for. Like you noticed, there are a pair of them for your wheel – pick the one that ends with -event-joystick (as long as you don't connect another identical wheel, you shouldn't have to ever find the name again)

With that information you can create a helper script to remove the auto-centering force. Copy and edit the following, and save it as "fix-autocenter.exe" in your LFS install directory.

#!/bin/bash
# edit the line below with your wheel's path
device="/dev/input/by-id/usb-046d_G25_Racing_Wheel-event-joystick"
# wait a moment, and then set autocentering strength to 0 (return immediately)
(sleep 2; ffset "$device" -a 0) & disown

After creating the file, you have to mark it as executable. You can do that in the Files app (Select the saved file -> Right click Properties -> Permissions tab -> Mark "Allow executing this file as program") or in the Terminal.

Now to make the script easier to use, we make an LFS script which we can assign to a controller button (or a hotkey) to call whenever we want to go full screen. Save the following in <LFS-install-directory>/data/script as "fixac.lfs"


wait fix-autocenter
shift f4

Now in LFS Controls options, under "CTRL+" or "ALT+" tabs, assign one action as "//fixac" (and optionally assign that to some joystick button), and use that to switch to full screen. In a couple of seconds after the autocenter locks, it should again release itself allowing you to feel the FFB effects.

Hope I didn't make any errors typing that. It's more steps than I'd like, but it is what it is.

LFS, Wine and force feedback
(7 posts, started )
FGED GREDG RDFGDR GSFDG