PDA

View Full Version : Linux for Speed


detail
12th December 2006, 13:59
Let's continue the omonimous RSC topic here, discuss running LFS in Linux.

I've finally set it up to run. Mandriva 2007, Cedega engine 5.2.6. I've got some questions and observations.

1) The graphics performance is twice lower than in the same view settings in Win (FPS limit turned off), though, according to KSysGuard, system is loaded only by 75%!
2) Viewing own car from outside, or AI cars, you see the track sector very dark, and a normally illuminated square, 5*5 meters large, around the car. :tilt:
3) If music is played at LFS start, I have no sound in the game. Cedega's audio test shows OSS engine doesn't work, ALSA works (so ALSA is selected). Music player settings are: sound engine - Xine, plugin - ALSA.
4) Just a strange behaviour: pressing Esc in the entry screen changes it's background image. :)

Becky Rose
12th December 2006, 14:16
2) Viewing own car from outside, or AI cars, you see the track sector very dark, and a normally illuminated square, 5*5 meters large, around the car. :tilt:
You can get this to happen with the windows version by viewing in 16bit graphics modes, either your graphics driver is 16bit (could explain some lost performance), or the emulator is 16bit, or your LFS settings are 16bit.

andy29
12th December 2006, 14:47
I tried it with plain old Wine in Kubuntu Dapper a while ago, and I didn't notice any problems at all. I was surprised at how well it worked. I didn't try using my wheel though, but I suppose it wouldn't have had any force feedback if I had done.

askoff
12th December 2006, 15:35
detail: Which GFX card do you have?

detail
12th December 2006, 18:01
GeForce FX 5200, legacy driver (downloaded yesterday from Nvidia website)

My desktop is 24-bit (can't set 32, just not present in the list). In LFS under windows i had 32 bit and copied LFS to Linux. With cedega LFS uses 24-bit and crashes when I choose 32-bit mode.

Furthermore, it can't set 100 Hz. :(

JohnUK89
12th December 2006, 18:25
A few things here,

First off, the 24/32 bit issue is not actually a problem, the extra 8 bits in Windows is the Alpha channel, which Linux automatically uses if available in 24 bit mode. Stick with 24 bit, it's the same as 32 in Linux terms.

The problem with lower frame rates is an issue in Wine/Cedega. As with all emulators and compatibility layers there are speed issues. Especially in DirectX layers that use OpenGL as a renderer, if LFS was OpenGL then it would be much quicker (OpenGL is the 3d renderer used in ALL Linux distros). This is coupled with the fact that in my experience, nvidia's drivers in Linux are slower than they are in Windows. Both of these add up to make a significant overhead on the graphics card.

The 75% CPU issue is one with LFS. It refreshes the physics at 100Hz, no matter what the frame rate on the display. If the CPU is not fully stressed at 100Hz physics updates then that will cause the CPU to be less than 100% utilised.

The illumination issue is one in Cedega also. This is caused by an over-expansion of the shadows, and can easily be solved by turning them off. It is an annoyance though.

The sound issue is unknown to me, I've never actually had that issue myself. All I can suggest is disabling music, IMO it's not needed (and quite frankly crap) and takes away from racing.

Hope this helps a bit, it's about my limit as far as Linux + LFS goes, but I'm sure others know more :thumb:

MadCatX
12th December 2006, 18:27
Are you using some of the test patches containing new sound system? That can be a problem. Your performace is that low because of poor DX8.1 support in Cedega emulator - you do have HVS enabled, dont you?

EDIT - Looks like JohnUK explained it very clear. Please keep in mind that ALL DirectX API commands must be "translated" in real-time to format executable by Linux. So D3D goes to OpenGL, DirectSound goes to ALSA or OSS and so... that is performance eater!!!

detail
12th December 2006, 19:04
JohnUK89, thanks for explanation! :thumb: Yes, I expected to have the overhead caused by emulation engine, but not that much. :) Turning shadows off worked well!

One strange thing is that LFS, running in the same resolution as desktop (1152*864) reduces the monitor refresh rate to 75 Hz. :scratchch That's tolerable, but inconvenient. LFS thinks that it works at 60 Hz :really: and <=60 Hz in the screen modes list.

I'm sure, the sound issue is purely Mandriva's, nothing to do with LFS. The same thing happens with Opera: if I start it when any sound is being played, there will be no sound in Flash animations. I'm a bit dissapointed that Mandriva 2007 is not better than 2006 in this sense. Again, a whole zoo of sound systems.

S14 DRIFT
13th December 2006, 00:24
My desktop is 24-bit (can't set 32, just not present in the list.

OMG.
I suggest buying a cheap newer gfx card like a nvidia 6200. Its crap, but is better than what you have, and can support 32bit ! :)

felplacerad
13th December 2006, 00:30
OMG.
I suggest buying a cheap newer gfx card like a nvidia 6200. Its crap, but is better than what you have, and can support 32bit ! :)


Woah, you did it again!

stjuart
13th December 2006, 00:39
LOL and i know why your telling him that^:uglyhamme

detail
13th December 2006, 06:10
OMG.
I suggest buying a cheap newer gfx card like a nvidia 6200. Its crap, but is better than what you have, and can support 32bit ! :)
Sales agent? :scratchch :D

I've written already up there, it supports 32 bit.

JohnUK89
13th December 2006, 06:17
OMG.
I suggest buying a cheap newer gfx card like a nvidia 6200. Its crap, but is better than what you have, and can support 32bit ! :)

Did you not read what I said in my post, about Linux interpreting 32 bit as 24 bit + the alpha channel (which it actually is)? Read the full thread before commenting, his card supports 32 bit :)

sweetreid
13th December 2006, 13:43
LFS runs in wine? It always gives me a spew of errors and dies. Must investigate..

JohnUK89
13th December 2006, 14:10
I couldn't ever get it working in plain WINE, chucked out an error about not being able to write to the data folder, even though it could, it works in Cedega, a non-free implementation of WINE though, and that's what I always used it on when I did.

askoff
13th December 2006, 14:35
It works fine with Wine 0.9.22 that I have tested and probably with newer versions also.

detail
13th December 2006, 14:55
On my PC, LFS in Wine 0.9.25 gives a message: "probable error in graphics driver".

Bob Smith
13th December 2006, 19:35
I get that error in Windows if I don't have graphics drivers installed. Don't know if that helps. :shrug:

kidzer
13th December 2006, 21:23
OMG.
I suggest buying a cheap newer gfx card like a nvidia 6200. Its crap, but is better than what you have, and can support 32bit ! :)
Did you not read what I said in my post, about Linux interpreting 32 bit as 24 bit + the alpha channel (which it actually is)? Read the full thread before commenting, his card supports 32 bit :)


And dont suggest buying a card, which is sold mostly (or exclusivley) as a 'TurboCache' card :razz:

...TurboCache = uses System RAM IIRC :)

askoff
13th December 2006, 22:03
On my PC, LFS in Wine 0.9.25 gives a message: "probable error in graphics driver".
Have you configured Wine with it's own winecfg (might be wineconfig. I don't remeber exactly.)

JohnUK89
14th December 2006, 05:48
And dont suggest buying a card, which is sold mostly (or exclusivley) as a 'TurboCache' card

...TurboCache = uses System RAM IIRC

Hehe...well said! At least the FX5200 doesn't have to rely on system RAM being readily available. TurboCache has, in EVERY application I have seen it in, been a LOT slower than a non-TurboCache card. This coupled with the fact the 6200 is a useless card anyway doesn't make for much of an upgrade.

Have you configured Wine with it's own winecfg (might be wineconfig. I don't remeber exactly.)


Definitely winecfg, no matter what distro WINE is installed to. I would stick with Cedega though, because although WINE has made a lot of progress when it comes to games, Cedega is still more compatible with a lot of games, including LFS IIRC

detail
15th December 2006, 10:16
The problem is what to do in winecfg. Add libraries? Which?

[edit2] SOLVED THE AUDIO PROBLEM! CTL device: default, PCM device: default. "Use MMap" - unchecked. And killed arts daemon to be safe.

Since I had no old software, aRts engine was not needed anymore, I've turned it off: Control center (shell> kcontrol) > Sound and multimedia > Sound system > uncheck the "Enable sound system" box.

The command to make a windows-like desktop icon: in Cedega, you have, for example, "My games" folder and "LIve for Speed" application there.
shell> cedega -run My\ games Live\ for\ Speed

detail
26th December 2006, 17:57
Patch V installed perfectly on my Mandriva Linux, but I can't unlock it. The game password is correct, LFS connects to master server, but then gives "Unlocking error" message. If I copy LFS from windows partition to ext3, it locks. :(

Maybe Scawen takes care about Linux unlock too? HELP!

kaankasim
27th December 2006, 12:05
Patch V installed perfectly on my Mandriva Linux, but I can't unlock it. The game password is correct, LFS connects to master server, but then gives "Unlocking error" message. If I copy LFS from windows partition to ext3, it locks. :(

Maybe Scawen takes care about Linux unlock too? HELP!

Activate lfs with wine and then copy system.reg in .wine directory to .cedega directory where your profile is. :thumb:

detail
28th December 2006, 09:21
Can't run LFS in wine. "Probable error in graphics driver"

If I can copy registration checksum within my PC with a registry entry, maybe I can copy it from Windows registry? Where do I search?

Chris758
28th December 2006, 18:41
Perhaps you could make a version designed specifically to work with Linux.

detail
28th December 2006, 20:33
@Chris758: I do have a copy. I've copied misc\f*.xxx as well. All files have a proper mode (rwxr--r--).

As for copying the registry, I don't see any changes to system registry upon unlocking LFS. (Used regmon)

kaankasim
28th December 2006, 20:50
i actually used crossover office beta for unlocking not wine and then copied the system.reg in /home/..../.cxofficebeta/Your_Bottle_Name to /home/.../.cedega/Your_Profile_Name

Mikey
9th January 2007, 22:16
Anyone tried patch V under wine? I managed to get it working pretty easily

ubuntu 6.10 desktop (very impressed with it so far)
wine package installed

LFS seems to work more or less couple of issues:

- no sound (maybe vista stuff thats been added)
- shadows issues (minor)
- no real dial display

S14 DRIFT
9th January 2007, 22:31
Sales agent? :scratchch :D

I've written already up there, it supports 32 bit.

dude im 15 i got no job

and i know its a crap card ... thats why i upgraded but for playing LFS its ok .. BLEH

smashpiranha
9th January 2007, 23:22
Anyone tried patch V under wine? I managed to get it working pretty easily

ubuntu 6.10 desktop (very impressed with it so far)
wine package installed

LFS seems to work more or less couple of issues:

- no sound (maybe vista stuff thats been added)
- shadows issues (minor)
- no real dial display


I tried it under Fedora Core 6. Under Wine I get similar problems, though I do have sound. Under Cedega I only have the shadow issue, dials work fine. Getting about 25FPS at 1280x1024 16bit (24/32 was like 5 fps slower and didn't fix shadows), XP2500, Geforce 6200 (not TC!!), Audigy2 ZS. So while it's nice to know it works I think I'll keep playing on my A64/X1900XT ;)

tecwizrd
11th January 2007, 19:11
Here (http://www.lfsforum.net/showthread.php?t=2292) is the post for the entry in system.reg that will fix the unlock problem.

Here (http://www.lfsforum.net/showthread.php?t=4159) is a post in the screenie section that will give you linux guys some happiness.

I have been using cedega 4.3.3 and Ubuntu linux for awhile now. I would not have it any other way, except to have a native client for LFS.

P.S. I have just updated to patch V, the Unlock system must have changed. I am now back to demo mode. I don't have a net connection at the moment for the desktop so I can't unlock. FPS went up some, and I like the new menus.

detail
13th January 2007, 17:53
tecwizrd, thanks for help! :thumb: I oversaw those threads. Will try a bit later.

Execution Style
14th January 2007, 16:05
LFS works like a charm under plain Wine for me. Using Ubuntu dapper 6.06 i386 I selected Wine in synaptic and it worked right away. I have no existing Windows installation on that drive: Wine is not piggybacking on an already working installation.

Cons:
no shadows (no big deal)
dials mess up on dash if I use shift-f4
problems getting to full-screen with LFS on top
joystick range and/or deadzone
no force-feedback

Now the last 2 are what make me have windows installed still. I realise that the deadzone and joystick range problems are due to Wine's joystick mapper because in Ubuntu my joystick range is fully detected. So I am needing basically the logitech profiler in Wine.

For the force-feedback, I think it should work, I'm just too lazy to compile the code I found that sends the force messages to the controller. Certainly LFS is already generating these messages :D

Performance is 80fps+ running on Athlon 64 2Ghz + geforce 7600GT.

hth

TysCaargh
15th January 2007, 15:15
---schanipp---
For the force-feedback, I think it should work, I'm just too lazy to compile the code I found that sends the force messages to the controller. Certainly LFS is already generating these messages :D
---schanipp---
hth
Could you elaborate a bit on what code you found? For about two years now LFS is the only reason for keeping windows. Working Force Feedback under windows to be exact. So please don't be lazy:D