dsfix icon indicating copy to clipboard operation
dsfix copied to clipboard

FPS decay problem

Open LaplaceNoMa opened this issue 8 years ago • 8 comments

Hello, I'm not a programmer so I don't think I'll be able to quickly pinpoint the real culprit, but I think I chased this problem to a corner. I will copy-paste a post I've been making on various forums, trying to get people's attention. It contains the description of the problem and the necessary steps to reproduce it.

I've tested this on:

  • 2 Different PCs, one being a high-end 980ti PC, another being a crappy 400$ laptop
  • Both W10 and W7
  • With and without installing MSI AB and using its overclocking
  • With and without drivers for various other hardware
  • With various Windows power options and C1/3/6 states in bios

The results are simple:

If you have DSfix installed, the max FPS decays over time, regardless of any other DSfix options. With or without custom textures, borderless, windowed, fullscreen, disabled cursor - those settings don't matter at all. The only thing that matter is DSFix and unlocked FPS.

How does the decay work?

When you launch the game, you sit at 60.3 FPS without VSync ('ripple'-tearing really evident) or 60.0 FPS with Vsync (game plays really smooth). Backspace shows 30.0 FPS. About ~20-25 minutes later, both Vsync and non-vsync choices drop to 59.7 and don't go up anymore (before that moment the FPS kinda 'bumps' from time to time, sometimes going to 59.7, but always returning to 60.0+). You can only see decimal FPS using MSI AB, so if you're using Steam overlay and want to test this, do it without Vsync. When you launch the game, steam overlay will move between 60-61, but ~25 minutes later you'll stop seeing 61 at all - it will move between 59 and 60.

During this 59.7 phase, the 'backspace' FPS is still 30.0. Sometimes 59.7 drops even further to 59.6 or 59.5 - this is a bit inconsistent between my tests. If that happens, the backspace FPS drops to 29.8.

~30-50 minutes later it turns to 58.8. Stuttering becomes really noticeable, regardless of vsync setting. The backspace FPS drops even further.

After 8-9 hours the backspace FPS drops lower than 28, while the normal FPS drops below 56. I haven't tested it longer than that.

Now, how do I prove it happens due to DSFix if you can't force more than 30 FPS without it? That's why I closely watched the 'backspace' FPS during my tests. If you delete DSFix, you'll be having the 30 FPS cap, and if this problem wasn't related to DSFix, it would still decay in the same way - 29.8 and then dropping below 28 after 8-9 hours.

Yet it doesn't. After 9 hours of sleep, I woke up to stable 30 FPS with DSfix files deleted from the game folder.

So... I really don't know WTF is going on, especially with literally no one else reporting this. The only way to actually notice this stuttering is to play non-stop more than ~1.5 hours. Or maybe I'm missing something. While it's definitely DSFix's fault, it might be tied to something else.

There is one thing that's common between my 980ti rig and laptop: both use Nvidia drivers 353+. My 980ti simply can't use any lower drivers due to this one being the first to support this card, but the laptop could probably use some DDU -> 320.xx testing.

It's not hard to test this. Simply leave the game running for 2+ hours with any FPS-checking software. Before doing that make sure that your current settings allow for constant 60 FPS (since I have a feeling that this problem doesn't occur if your FPS goes all over the place while you're doing stuff in game). Stand somewhere where your MSI AB shows 60.3 (with vsync off) or in case of steam overlay - 60-61 jumps.

Please poke me if you want me to test anything out - I'm closely watching this.

LaplaceNoMa avatar Mar 19 '16 05:03 LaplaceNoMa

I don't seem to have this problem (granted I only let it run for an hour or so) so I can't really test/debug this, but is there any difference if you comment out this line https://github.com/PeterTh/dsfix/blob/master/RenderstateManager.cpp#L993 ?

Also make sure there aren't any driver-specific overrides (like from the Nvidia Control Panel) that might interfere with the game/hook settings.

Zapeth avatar Jul 16 '17 08:07 Zapeth