ThirteenAG / GTAIV.EFLC.FusionFix

This project aims to fix or address some issues in Grand Theft Auto IV: The Complete Edition
GNU General Public License v3.0
912 stars 42 forks source link

Fall in performance while GPU usage increases #436

Closed nbp92 closed 4 weeks ago

nbp92 commented 7 months ago

Game version this happens in

v1.2.0.59

What area of the game

Anywhere outdoors. I just reinstalled the game and have been installing-uninstalling mods to see when the issue begins or under what circumstances. Doesn't matter if I am having a shootout with the whole LCPD or walking a street, the GPU utilization goes crazy and the higher it goes, the worse for my FPS. As Vanilla or with DXVK, the GPU utilization is at 36% or so with stable 60 FPS. Aften installing FusionFix, the game runs on 60FPS with 50%-60% GPU utilization. It will hold them for a time but out of nowhere, the GPU usage will skyrocket to 99% or 100% and the FPS will drop down to 40 with the "99% FPS" showing around 20. Is there maybe a setting that can be tweaked on the mod settings that may be spiking the GPU into doing this?

Your Hardware configuration

x64-based PC M/B: MSI - MS-7C56 CPU: AMD Ryzen 7 5800X 8-Core Processor, 8 Core(s), 16 Logical Processor(s) RAM: 32,0 GB / DDR4 @3600MHz GPU: GeForce RTX 3070 Ti GAMING OC 8G

Game capture

20240203_212829 20240203_212934 20240203_212948 20240203_213118

Last working version

I haven't used any previous versions, only 2.5.4

Does IV run better without FF installed?

No response

Graphics backend (3D API)

DXVK

Any other notes or things you've tried

I'm not having any background processes running during that time. Also, I had to take the photos with a mobile device because the NVIDIA Performance Overlay wasn't included in any screenshots I've taken (even with the NVIDIA Overlay screenshot shortcut). During the screenshots, the character is standing still.

Checklist

Ash-735 commented 7 months ago

The game DOES have higher usage settings under Fusion Fix compared to the default, if you want to claw back performance then putting the shadow settings one tier lower will match the old (e.g. Medium on Fusion Fix is the same as High on normal), you could also take a look at the INI to disable some of the extra shadow casting features fusion fix enables.

nbp92 commented 7 months ago

Στιγμιότυπο οθόνης 2024-02-07 080221 Ι have set these values and have "FlickeringShadowsFix" changed from 1 to 0, among other things. I also disabled the "Console Shadows", on the Graphics menu and the game seems to run very good now. During the night, my GPU usage, doesn't get over 30%. During the day, it maxes out at 60%.

P.S., The "BudgetedIV" options, are meant to be changed if I ever face the "taxi spawn bug", or under any other circumstance?

Thanks a lot!!!

UPDATE: The issues still persist. I might go for a clean installation and a thorough back-up procedure. Additionally I will try out older versions of FusionFix to see if the issue is present there as well.

Ash-735 commented 7 months ago

Yes, BudgetedIV is where you put in the values so you don't get the taxi bug.

As for the shadow options, in the above, set 0 for the following... DynamicShadowsForTrees FixCascadeShadowMapResolution

and in-game set your shadows to SHARP and Shadow Quality to one level below what you currently have. These options will restore the shadows to how they were in the base game without Fusion Fix.

nbp92 commented 7 months ago

Screenshot (227) Screenshot (226)

After your recommendations, these are the settings I'm going with now. So, this is what I've encountered so far: After installing FusionFix, editing the .ini file and launching the game, everything was rolling fine. The GPU, just jumped to 60% but the frames were spot on. Unfortunately, after having drinks with Michelle, on the way to her home, the game crashed when entered a taxi. No big deal. The strange thing is that the second time I launched the game, I initiated a date with Michelle again (no crashes at all) but when I reached her place and for the rest of the session, the GPU usage skyrocketed to 99% and never dropped below 87%. I don't know why but this "issue" seems to appear, always the second time I launch the game, after installing FusionFix. I don't know if it's a problem with the current version or something on my end like a new configuration file being created or the logs that are kept while FusionFix is running but it's really peculiar.

P.S. Is there a great drawback in performance between "Sharp" and "PCSS" shadows? I've also set the Tree Shadows to "PC+". Maybe I ought to be adding "[GTAIV.EFLC.FusionShaders]", into FusionFix or it comes with it, in the latest version?

RecklessGlue540 commented 7 months ago

P.S. Is there a great drawback in performance between "Sharp" and "PCSS" shadows?

Yes. A big one. However, between Sharp, Soft, Softer and Softest there is no difference in performance.

I've also set the Tree Shadows to "PC+".

I'd recommend using Console TreeFX, since PC+ is mostly meant for modded and custom trees. The normal ones are not going to look pleasant with PC+.

I can also recommend setting FlickeringShadowsFix to 1 in the .ini as it improves performance even more when Console Shadows is disabled.

FusionFix already includes everything from Fusion Shaders. There's no need to overwrite anything, and you may also end up breaking some stuff by doing that....

nbp92 commented 7 months ago

It seems that I've found another thread were my "issue" is also mentioned on the following link: https://github.com/ThirteenAG/GTAIV.EFLC.FusionFix/issues/235

Maybe a redirection between the two can help future players who might face the same FPS drops.

Additionally, I will give your solutions a try and see what difference that will make. Update: 1) I'm walking the road where Niko lives (with always run option on). With "Sharp" shadows, my GPU works at 40% - 50%. With "PCSS", it reaches 70% !! So that's one thing taken care of, for the moment... 2) Based on the comment bellow, I've changed the value mentioned to 1 and the shadows in "High", indeed look like the "Very high" setting.

RecklessGlue540 commented 7 months ago

Also, never use Very High shadows. In most cases, they take away half of the framerate.

Instead, use High shadows but with FixCascadedShadowMapResolution to 1 in the .ini. Doing this will make High and Very High shadows look exactly the same, but High will be a lot more performant.

nbp92 commented 7 months ago

If someone would like to test the shadow performance, I've found 2 spots that are quite demanding: 1) The bar where you can play Darts, west of Dukes. The GPU usage goes from 42% to 70%+ 2) The fuel storages in Dukes, just west of Francis Int. Airport. (where you can get the Combat Pistol).

I will attach a screenshot. Στιγμιότυπο οθόνης 2024-02-08 215753

RecklessGlue540 commented 7 months ago

You may also try setting View Distance to 42 and Detail Distance to 20. Those are double the console defaults (which are 21, 20). Expect some performance improvements doing this as well. This is mostly for stability though.

Otherwise, if you'd still like the distances to be higher, try 84 for View, and 40 for Detail. These can work too. Compare between 42, 20 and 84, 40 and see what is better for you.

Distances as well should never be maxed. Rockstar broke the game big time.

nbp92 commented 7 months ago

I've been trying out these options as well but today, I didn't face any GPU spikes on my sessions. Even after multiple 4+ star police chases and 10+ car explosions (looks like cars had actual fuel tanks on this game-silly me). What I did was set the shadows to "Console" because it seems to be the one less demanding.

I've also edited the DXVK.conf a bit with the following commands: dxgi.maxFrameLatency = 1 d3d9.maxFrameLatency = 1 dxgi.maxFrameRate = 60 d3d9.maxFrameRate = 60

The only issue I've faced, is a drop to 57FPS at 2 occasions for about 3 seconds.

shmadoinfers commented 5 months ago

I've been having the same issue except none of the fixes here worked for me. My issue is slightly different as in the game will constantly be at 100% utilization making the frame rate suffer.

I've found a fix in that on first launch with the mod installed it runs fine, only on subsequent runs will it run into the utilization glitch. What I do to counteract this is just have a folder with my mods saved in it, and before playing I delete the update and plugins folder along with the dinput8.dll file, then drag my mods back in. This fixes the issue for the first launch, but subsequent launches require me to redo the process.

For reference, without the glitch my GPU utilization is at 30-60% with fps averaging around 170 (before capping it at 60). But once the glitch happens, my utilization gets all the way up to 100% and my fps averages around 30. If its any use, my GPU is an AMD 6700XT, but I notice @nbp92 was having the same issue with an NVIDIA GPU so I'm not sure if that's the issue here.

I am also running various fixes, DXVK, radio downgrader, and console visuals. I know its not DXVK as the glitch remains with or without it. The weird part is that I didn't have this issue a few days ago, It just randomly appeared yesterday.

RecklessGlue540 commented 5 months ago

Wait for the next update, then report. It's gonna be all about performance and optimization.

shmadoinfers commented 5 months ago

Will quickly add that for me the problem was with enabling SMAA 2x under the game settings. When I enable it the glitch happens right as I restart the game, but goes away once I turn it off and restart again. Hopefully the next update resolves the issue.

RecklessGlue540 commented 5 months ago

Will quickly add that for me the problem was with enabling SMAA 2x under the game settings. When I enable it the glitch happens right as I restart the game, but goes away once I turn it off and restart again. Hopefully the next update resolves the issue.

SMAA or SSAA2x?

SSAA is designed to do that, please don't use it for casual play.

shmadoinfers commented 5 months ago

Apologies, meant SSAA 2x. Yeah, figured that out the hard way. Could be useful to add a warning to the setting to help fellow naive people like myself. Thank you!

Markie98 commented 5 months ago

I'd recommend using Console TreeFX, since PC+ is mostly meant for modded and custom trees. The normal ones are not going to look pleasant with PC+.

That's subjective, I absolutely prefer how trees are shaded with PC+, after comparing it.

strupset commented 5 months ago

Will quickly add that for me the problem was with enabling SMAA 2x under the game settings. When I enable it the glitch happens right as I restart the game, but goes away once I turn it off and restart again. Hopefully the next update resolves the issue.

You cracked the code bro. I fucking knew I wasn't seeing things when I first launched the game and it ran at 144 barely dropping under 120, and when I launched the game again with the slightest change it hardly held 60. SSAA 2x affects frames drastically, dont put it on unless you have a high end PC.

Apologies, meant SSAA 2x. Yeah, figured that out the hard way. Could be useful to add a warning to the setting to help fellow naive people like myself. Thank you!

1000% they should. Thank YOU my brother!!!

RecklessGlue540 commented 5 months ago

I mean, it's already mentioned on the main page that SSAA requires restart and affects performance...

I have suggested to have In-game descriptions of things in the past, but it's honestly quite minor and with no real point... Of course, I'd still like having something like that, but I've also heard the UI stuff is very hard to understand and work with properly, so it's best we live with what we have.

nbp92 commented 5 months ago

@strupset My thoughts exactly.

@shmadoinfers you're a hero!!

I knew that something was indeed off but couldn't put my finger on it! Let's hope that this thread will help others in the future.

juicermv commented 5 months ago

You cracked the code bro. I fucking knew I wasn't seeing things when I first launched the game and it ran at 144 barely dropping under 120, and when I launched the game again with the slightest change it hardly held 60. SSAA 2x affects frames drastically, dont put it on unless you have a high end PC.

I mean... it's mentioned multiple times throughout the readme that SSAA 2x renders the game at twice the resolution. What did you expect?

Markie98 commented 5 months ago

I mean... it's mentioned multiple times throughout the readme that SSAA 2x renders the game at twice the resolution. What did you expect?

It's actually four times the resolution (twice on each axis).

juicermv commented 5 months ago

Fair but I don't think anyone really counts it like that since in newer games for example when you have a resolution scale slider it goes from 0.x to 2 so I apply the same logic here

RecklessGlue540 commented 5 months ago

SSAA also breaks some effects too, in case u guys didn't know. Raindrops go back to being black, and Bloom gets more excessive. Probably depth of field too. Keep that in mind.

Markie98 commented 5 months ago

SSAA also breaks some effects too, in case u guys didn't know. Raindrops go back to being black, and Bloom gets more excessive. Probably depth of field too. Keep that in mind.

And it doesn't scale the menus/HUD/UI either so you don't get them to look smoother like you would with downsampling, which would be a nice improvement, though on the other hand performance is a bit better because of that.

RecklessGlue540 commented 5 months ago

SSAA also breaks some effects too, in case u guys didn't know. Raindrops go back to being black, and Bloom gets more excessive. Probably depth of field too. Keep that in mind.

And it also doesn't scale the menus/HUD/UI so you don't get them to look smoother like you would with downsampling, which would be a nice improvement, though on the other hand performance is also a bit better because of that.

Hmm, interesting. Feels like it should scale the whole framebuffer by default, and not having to use an extra pass... Though again, I'm no expert on the matter (at least not yet, I guess).

Anyways, DSR, DLDSR and VSR do a much less intensive job, so probably stick to those. I'm using VSR currently and it's wonderful.