Author Topic: 120 fps slowdown on linux????  (Read 1208 times)

0 Members and 1 Guest are viewing this topic.

Offline oaul

  • 23
120 fps slowdown on linux????
Figured this could be a windows issue too so i posted it here ^^

I just upgraded to ATI's new 8.41 driver on linux.  FS2 is vastly improved since previous driver versions on my x700 mobility. 

...too improved, im afraid.   It seems that when my rig meets 120 fps, the game "pulls" back and makes the game slower when I hit that mark, for as soon as it drops below 120fps, game-time speeds up by a significant factor (Im guessing 2x). 

I tried -no_vsync.  Still slow.  Is this a known issue?  Could it be because of the completely redone drivers?  Anybody else have that problem?  (I saw on google someone mentioned this with the MAC version, but that source suggested it was addressed in the official builds - AND it was posted awhile ago...).  Thanks!

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: 120 fps slowdown on linux????
The OS X issue was with the same bit of code, but technically it was a different problem since it was platform specific.  The Linux problem here is also platform specific, but I haven't figured out why yet.  The code in question is basically just a call to SDL_Sleep(), and it hasn't changed in years.  It used to work fine, but now it doesn't.  There hasn't really been a SDL change that I can find, so it may be an issue with newer kernels or something.  There are numerous ways to do a non-blocking sleep on Linux, and I've tried them all, but always get the same results.

The OS X fix was to use a "cpu whore", which basically amounts to an empty while() statement that just eats up CPU time to perform the same functionality.  That is supposedly an accepted fix on OS X, but it's a really hacky way to go about fixing such a problem.

The Linux "fix", at the moment, is to just use v-sync and let the video drivers handle the FPS cap for you.  That way we don't have to be directly dependent on X to solve the problem, since the drivers do it internally.  Where most people get tripped up there though, is that they have v-sync disabled at the driver level, which means that the game's call to enable v-sync is ignored by the drivers.  So just make sure that you aren't overriding v-sync at the driver level and that should take care of it for you.  Your FPS will be limited to your refresh rate, but you won't get the slowdown any longer.

 

Offline oaul

  • 23
Re: 120 fps slowdown on linux????
Thanks for the informative response.  Makes perfect sense, but I am not very familiar with ATI on linux.  Since you are the linux guru, do you know what options to pass to AMD's proprietary driver?  I would think i would need to pass the --vs=on option to aticonfig.  Tried it but it didn't work.  But then again that utility kinda sucks.  I am pretty sure this isn't the place to be asking about ATI linux driver use...but you do seem to have some experience in the matter of vertical refresh...

EDIT:  I discovered that --vs=on option is in fact exactly I need and that the ati linux utility did its thing correctly.  The problem is the driver itself is malfunctioning.  I am sure that the reason it doesn't work is because of the truckload of bugs in this new driver (plus my card is technically not supported).  Thanks again
« Last Edit: September 12, 2007, 10:47:25 pm by oaul »