PeterTh / dsfix

Interceptor dll for the improvement of Dark Souls PC
GNU General Public License v3.0
346 stars 58 forks source link

FPS decay problem #25

Open LaplaceNoMa opened 8 years ago

LaplaceNoMa commented 8 years ago

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:

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.

Zapeth commented 7 years ago

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.

vonotsals commented 2 months ago

I got the same issue as OP on a completely different PC setup (Ryzen 5600G + RX 6800 XT), fps dropped to 58.7 within ~30-60 mins. Have no idea how to change code here, registered here only to provide an additional report. Still I can provide any needed details regarding testing

D3SOL4TE commented 2 months ago

Try this updated fork https://github.com/Hal47/dsfix/releases/tag/2.5

vonotsals commented 2 months ago

The issue seems to be fixed in 2.5, haven't got any fps decay within 3+ hours. Btw, is it even possible to get stable 60 fps (like in Remastered) using DSfix? I mean in such terrible places like Blighttown, Demon ruins or Painted world?

D3SOL4TE commented 2 months ago

Btw, is it even possible to get stable 60 fps (like in Remastered) using DSfix? I mean in such terrible places like Blighttown, Demon ruins or Painted world?

I don't think so unfortunately. I get drops to 53 fps at specific spots in Blighttown.

vonotsals commented 2 months ago

Well, 53 FPS is not that bad as mine. Can you please share your hardware setup? I believe the game is very damanding on the CPU. Maybe once we get stable 60 fps.

D3SOL4TE commented 2 months ago

My System Specs: Intel i7-8700K NVIDIA GeForce GTX 1080 Ti G. Skill Trident Z DDR4 16GB Memory Samsung 970 EVO NVMe 250GB (OS Drive) Crucial MX500 1TB SSD (Games Drive) ASUS ROG MAXIMUS X HERO Window 10 Home 64-bit

P.S. I have had Dark Souls drop to around 30 fps in the Darkroot Basin while looking at the Hydra doing it's ranged magic attack while also having some of the Crystal Golems do their AoE attack at the same time.

vonotsals commented 2 months ago

Thank you for your help, I believe the OP issue is resolved (at least in my case).