Author Topic: Linux: Slowdowns...  (Read 4083 times)

0 Members and 1 Guest are viewing this topic.

Offline chaotic

  • 25
Linux: Slowdowns...
Hi all!

I've a strange problem:

I've installed FS2 SCP 3.6.9 Final with the Installer. When I run the game with
Code: [Select]
fs2_open everythings works fine.

Now the problem: When I run FS2 or any Total Conversion (I tried out Babylon 3.4 final...) by typing
Code: [Select]
./fs2_open.bin I've got strange slowdowns, the game is running in slow motion for a few seconds over and over again. It doesn't matter if I use the official Binary or a self-compiled one...

PS: sorry for my very, very bad English  :pimp:

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Linux: Slowdowns...
What video card/drivers do you have?  If it's not enabled already, be sure to turn on V-Sync and see if it's still a problem.  There is some issue with SDL (though perhaps just hit on our side) that causes speed problems when it tries to correct for fast FPS with a sleep timeout.

This hasn't always been a problem, and some combinations of SDL still work fine with the same binary, but others don't.  I have never had the time to diagnose it properly, unfortunately.

 

Offline castor

  • 29
    • http://www.ffighters.co.uk./home/
Re: Linux: Slowdowns...
You could further verify whether it is the sleep problem by adding the -fps command line option (to see if these slowdowns actually occur at 120+ FPS :) )
 

 

Offline chaotic

  • 25
Re: Linux: Slowdowns...
VSync didn't help  :(
Yes, it seems to be the "sleep problem" because without VSync, I've got 120 FPS all the time when playing without mediavps. Are there any other solutions for that?

Edit: OK, I played with mediavps and even with VSync enabled, everytime I've got those slowdowns, my FPS jump form about 80 up to 120  :eek2:
Edit: Oh, and I'm using Nvidia and Kubuntu Feisty
« Last Edit: July 30, 2007, 04:04:22 pm by chaotic »

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Linux: Slowdowns...
Are you sure that V-Sync was actually enabled?  If it is then you will pretty much never hit 120 FPS.  More likely you will be in the 60/70/75/85 range as a max.  It can be disabled at the driver level, so just be sure that "Sync to VBlank" is checked under the OpenGL Settings of nvidia-settings.

The sleep bug only shows itself when you hit the FPS cap, which is 120 by default.  If you use V-Sync then it should never get that high (unless you actually have your refresh rate set that high or higher, which few monitors can do at hi-res).

 

Offline chaotic

  • 25
Re: Linux: Slowdowns...
Yes, I know that it should be impossible  :confused:

But I checked "Sync to VBlank" (screenshot 1) but see the FPS shown in screenshot 2...



 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Linux: Slowdowns...
And you are not using the -no_vsync cmdline option (either on the command line, or in data/cmdline_fso.cfg, or in ~/.fs2_open/data/cmdline_fso.cfg), correct?

 

Offline chaotic

  • 25
Re: Linux: Slowdowns...
No, I'm not using it...here is my ~/.fs2_open/data/cmdline_fso.cfg:

Quote
-spec -glow -env -mipmap -2d_poof -noscalevid -missile_lighting -cache_bitmaps -dualscanlines -targetinfo -orbradar -rearm_timer -3dwarp -warp_flash -snd_preload -alpha_env  -spec_exp 16.7 -spec_point 0.6 -spec_static 0.9 -spec_tube 1.0 -ambient_factor 50 -ogl_spec 80 -fov 0.675 -img2dds -ship_choice_3d

The data/cmdline_fso.cfg is empty.

 

Offline Mars

  • I have no originality
  • 211
  • Attempting unreasonable levels of reasonable
Re: Linux: Slowdowns...
I'm getting the exact same problem with ATI FGLRX drivers.

Slow motion at 120+ fps... usually when I'm facing away from resource intensive things

 

Offline castor

  • 29
    • http://www.ffighters.co.uk./home/
Re: Linux: Slowdowns...
Chaotic, have you specified the vertical refresh rates in your xorg.conf "Screen" section?
E.g. the _60 parts associated with the resolution definitions below.

Code: [Select]
    SubSection     "Display"
        Depth       24
        Modes      "1280x1024_60" "1024x768_60" "800x600_60" "640x480_60"
    EndSubSection

At least that solved the probelm for my 7600GS.

I used to have an ATI card, but never found equally good (smooth) solution for it :(
« Last Edit: July 31, 2007, 12:03:51 pm by castor »

 

Offline chaotic

  • 25
Thx castor, that helped  :yes:

But what for ATI? I want to update my german linux guide and it would be good if there is an solution for both cards...

 

Offline castor

  • 29
    • http://www.ffighters.co.uk./home/
I don't know about the ATI open source driver, but for the proprietary driver (fglrx) I had to force VSYNC in xorg.conf (aticonfig has an option for this) and activate it in ~/.drirc. You can easily find info on this by Googling ".drirc VSYNC fglrx", for example.

And this was already some time ago... dunno whether it works with the latest fglrx drivers anymore (and it was never as smooth as it is with NVIDIA).

 

Offline chaotic

  • 25
And something I have to add:
This solution (for nvidia) only works when I specify 60 as my vertical refresh rate, even my TFT can do 75...will this bug be fixed in the next version?

 

Offline castor

  • 29
    • http://www.ffighters.co.uk./home/
So if you try and put 75 in your xorg.conf it doesn't work? Most likely it has to do with your X configuration/vid-driver, hard to see how FSO could have anything to do with it.

 

Offline chaotic

  • 25
I meant the "speed problem" in general, not the 60 or 75 thing...

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
It's not really a FSO problem.  The same basic code has been in use for 5 years, but the problem only showed up about 2 years ago, without the code on our side ever changing.  Although we could get around it, doing so would add to code complexity and compatibility issues (ie, we have to do it manually, something that SDL handles for us at the moment).  Fixing it on our side makes the code less portable/compatible, in other words.

Basically, there is no ETA for getting this fixed from our side, and it certainly won't be happening for 3.6.10 since you can get around it simply by using v-sync.

 

Offline Mars

  • I have no originality
  • 211
  • Attempting unreasonable levels of reasonable
Thanks castor... I haven't played FS2 for about a year due to this; it's nice to be able to again.

 

Offline castor

  • 29
    • http://www.ffighters.co.uk./home/
You got it working with an ATI card?? Well good to know its still possible! ..had some serious doubts here :)

 

Offline chaotic

  • 25
It's not really a FSO problem.  The same basic code has been in use for 5 years, but the problem only showed up about 2 years ago, without the code on our side ever changing.  Although we could get around it, doing so would add to code complexity and compatibility issues (ie, we have to do it manually, something that SDL handles for us at the moment).  Fixing it on our side makes the code less portable/compatible, in other words.

Basically, there is no ETA for getting this fixed from our side, and it certainly won't be happening for 3.6.10 since you can get around it simply by using v-sync.
OK, I see. Just thought it would be helpful for people new to Linux...its not that easy for them if they got ATI  ;)