The online racing simulator
Linux: got Wine + LFS + Logitech G27 + Force Feedback working
Hi there!

*updated post*
06.05.2011: further updates will likely happen over here: http://www.lfsforum.net/showthread.php?t=74115.Since Kernel 3.2 all you need is an actual wine (>= 1.3.17), lfs should just run fine with newer Logitech wheels.

I managed to get my new G27 working flawlessly with wine under linux (gentoo), anyone seeking advice just may ask.

If you connect your G27 you will have several problems, for some there are solutions more easily to find via google, but also some for which i haven't found a solution online:
- Wheel is in some kind of compatibility mode, needs to be set to native/extended mode to get all 4 axis and all buttons recognized.
- Wheel motion is limited to about 300 degrees
- Autocenter can't be disabled
- ForceFeedback might be hacky (feels more like a pneumatic hammer...)

To remove the 300-degrees cap and get all 4 axis and buttons recognized, you have to use (a modified) G25manage, a tool from the open-source game vDrift.
As for the crappy ForceFeedback, an actual development-version of wine (1.3.17 and above) is fixed and should work just fine.
Disabling autocenter will work with kernel 2.6.39 and above (at least i hope i gets commited soon enough).
This is a nice thing, I did something similar to get my DFP working, but I eventually gave up because of the crappy force feedback.
How is force feedback with this patch?
Quote from MadCatX :How is force feedback with this patch?

it works like a charm, just like when playing via windows.

I have yet to check out what's necessary and what not... i managed to get autocenter disabled within wine, too, but i obviously can verify that for the G27 only. You might try the attached patches (against wine-1.3.14). If your wheel is supported by the kernel, they should work fine.
Awesome, thanks s bunch! I'll certainly give it a try and report back. It'd be nice if we could create sort of a guide with patches and set of tools needed to fully enjoy LFS through WINE.
Just tried to run LFS on Mint 10 with WINE. Everything works perfect exept the sound. It has always a 1 second delay . Any idea how to fix that problem?
E: NVM I just looked into the WINE settings and made hardware acceleration to emulation and it works now too. Will try it with G25 later :/
-
(slim.one) DELETED by slim.one : double post
Quote from MadCatX :It'd be nice if we could create sort of a guide with patches and set of tools needed to fully enjoy LFS through WINE.

It should be possible to completely build a ported application which would then run native on linux -> http://www.winehq.org/site/docs/winelib-guide/index ... any LFS-dev out there? :-)
But still wine would have to be patched before this to get FF working correctly. I'm trying to get one of the wine-devs to integrate the patches into wine, which would spare everybody using wine from a repository (ubuntu, suse, whatever) to build their own version... since this is not easy for an end-user and requires lots of deps to be installed (which are normally not needed, too), this should be the better way to go.

Did you already test the patches btw.?

EDIT: I made a small script, which isn't doing errorhandling whatsoever and therefor will likely fail if encountering errors (esp. if missing libs/tools). But it works - it installs a patched wine and LFS. Enjoy: http://team-infinity.ath.cx/slim/installer.sh
-
(Dj-Aeri) DELETED by Dj-Aeri
Quote from Dj-Aeri :I only have 30fps vs 100fps in Windows 7. I don't get it.

Catalyst 11.2 and Directx 9 installed with winetricks. Is there something more that I need?

you should not need any 'alien' dlls at all, at least over here it runs out of the box (with the patched dinput). I have a nvidia GF 8600 GT, nothing top notch either, and its running with solid 100fps.
what opengl-performance do you have in other games like doom3? Maybe try a fresh wine without dlls from directx (move .wine to .wine_backup and reinstall LFS).
-
(Dj-Aeri) DELETED by Dj-Aeri
Quote from Dj-Aeri :
Is there any game that work in Linux (not with Wine) to test the graphics card and see if the drivers are ok?

You can try Nexuiz, OpenArena, Warsow or LightsMark and Unigine benchmarks.
Quote from Dj-Aeri :I didn't test it with other games really, but I've tried LFS in 4 different distros in the last days, and I have the same crappy performance in all three. With the open ATI drivers, with Catalyst, with Wine out of the box, installing d3d... and still nothing.

I'm obviously doing something wrong but I don't have any idea what can be.

i hate to say this, but ati's drivers are terrible.
Quote from Dj-Aeri :EDIT: I've tried Counter Strike and in OpenGL mode I'm stuck on 71fps, don't know why, because my monitors refresh rate is 60Hz and the Vsync is disabled in Catalyst. If I trie in D3D mode i lost the menus in the game.

71 fps is default value of frame limiter (in cs 1.6).

do fps_max 101.
-
(Dj-Aeri) DELETED by Dj-Aeri
-
(Dj-Aeri) DELETED by Dj-Aeri
you might try disabling fancy stuff like AA in LFS.
Do you get any errors/debugging-messages in the console when starting wine/LFS?

Another thing: Do you have desktop effects enabled? If yes, try disabling them.
-
(Dj-Aeri) DELETED by Dj-Aeri
Quote from Dj-Aeri :
I've noticed in the system monitor that the CPU's are only 30% busy with LFS on

Is that an overall or per-CPU usage?

Quote from Dj-Aeri :
Could not write to data folder
is LFS correctly installed in a hard drive?

Do you have a write permissions to that folder? Are you running wine as a different user?
Quote from Dj-Aeri :If I disable the desktop effects I can't put LFS in window view because of a graphical glitch.

Who wants to play windowed anyway
Is performance in fullscreen without desktop effects still the same?
Quote from Dj-Aeri :EDIT: if I try running wine from the console (wine c:\\LFS\\lfs.exe) I've got an error:
Could not write to data folder
is LFS correctly installed in a hard drive?

did you use a recent version of my script? It should install wine and create an appstarter in the apps-menu (wine/LFS has its own folder ~/.lfs/ afterwards)
to run, goto into a console and, delete any previous versions and execute
wget team-infinity.ath.cx/slim/installer.sh
chmod +x ./installer.sh
./installer.sh

EDIT: the script hangs at installing G25manage if executed more than once. i fixed that.
There it goes, all the necessary patches do get DFP working a bit better. I added a DFPfullInit function to G25manage which sets the wheel to extended mode and 900 degrees. I currently cannot set the range to anything else than 200 or 900 nor can I get separate axes for throttle and brake. Anyway, it's a start

EDIT: Added corrected version of kernel patched (files dfp_id*). Also please note that the dfp_patch should be applied against slim.one's fork of G25manage only.
Attached files
dfp_patchset.zip - 2.3 KB - 465 views
-
(Dj-Aeri) DELETED by Dj-Aeri
Hey, this is seriously good news! :-)

Quote from slim.one :Disabling autocenter will work with kernel 2.6.39 and above (at least i hope i gets commited soon enough).

Did you already get feedback if the patch will make it into the 2.6.39?

Edit: Just noted that current Wine release available for my distro (Arch linux) is alread 1.3.18. Does this mean that no more patches are necessare there?
Force feedback in stock WINE 1.3.18 works OK with my DFP and patched 2.6.38.3 kernel, so perhaps the FF patch was merged to WINE's upstream.

I'm not sure about autocentering kernel patch, the only thing I saw in the changelog was added support for the DFP in native mode.
Quote from MadCatX :I'm not sure about autocentering kernel patch, the only thing I saw in the changelog was added support for the DFP in native mode.

It's in the queue, that's what i know. No idea in which queue tho :P

Also, my patch only covers the G25, as i have no DFP for testing - but i don't think that it should be a problem to integrate the patch for a DFP, too. It just has to be proposed by someone :-)
Patch for native DFP is already upstream in 2.6.39 line, if a few lines with proper VID/PID can be really called a patch Changelog incorrectly reports it at "Support Force Feedback on G25/G27 wheel" though...
Quote from MadCatX :Patch for native DFP is already upstream in 2.6.39 line, if a few lines with proper VID/PID can be really called a patch Changelog incorrectly reports it at "Support Force Feedback on G25/G27 wheel" though...

yeah, right, it seems i sent both id's - i need vacation
G25/G27 is incorrect indeed, since that are the id's for the DFP/G25 (G27 has another ID), but the G27 works with the patch, anyway.

I don't understand why Logitech isn't providing a simple tool like G25manage to initialize the wheels, since its not really a big deal. The windows-driver simply reads some bits from the wheel and then sends a proper command to initialize the H/W, no big magic. I don't think anyone needs a bloated tool like in windows with profiles and stuff, but basic initialization would be nice
I'm afraid it's not that simple. Even G25manage cannot properly deal with separate throttle/brake axes because of the rather unusual way the wheel sends throttle and brake position when they're separated. (at least in case of DFP).
There is also a bug in the HID stack that causes my DFP to disappear from /dev/input when I set it to native mode with 0x01 and 0x03 commands (sending them in the opposite order somewhat works though).

A complete list of accepted commands with some description would be nice, the rest is just a matter of writing a proper driver and a simple userspace tool.
Quote from MadCatX :I'm afraid it's not that simple. Even G25manage cannot properly deal with separate throttle/brake axes because of the rather unusual way the wheel sends throttle and brake position when they're separated. (at least in case of DFP).
There is also a bug in the HID stack that causes my DFP to disappear from /dev/input when I set it to native mode with 0x01 and 0x03 commands (sending them in the opposite order somewhat works though).

Separate axes works fine with the G25 here. But i have the same problem of disappearing input device after setting native mode. But this can be fixed by reloading of some usb modules:
sudo rmmod hid_logitech usbhid; sudo modprobe usbhid

If you do this after setting the wheel to native mode/full range it is available again in dev/input. I tried to put this into the udev ruleset so it happens automatically after plugging it in, but didn't get it to work yet...

Also the autocenter issue i did not try to fix yet - maybe i find some time to build a patched kernel, or i'll just wait for 2.6.39 to be released

But there is another issue: I need to recalibrate axes everytime LFS window loses focus and whenever i change FF setting, which is quite annoying.
Any idea how to prevent this?
Hey guys,

based on your and vdrift forums work and research i created a tool to setup the logitech wheels on linux -> See this thread for details.

Let me know if it works for you :-)

FGED GREDG RDFGDR GSFDG