ELDEN RING

ELDEN RING

View Stats:
PainkilleR Mar 6, 2022 @ 4:54pm
MICRO-STUTTERING WORKAROUND
So, basically the issue is a presentation model just as I have predicted in this comment before the game release: https://steamcommunity.com/app/1245620/discussions/0/3183486320463750955/?ctp=4#c3183486320463897699

Elden Ring has some completely borked v-sync/frame cap implementation which screws the whole rendering pipeline ANY TIME frametimes drop below 16.6(6)ms. It's obviously impossible to tell what exactly happens during stuttering without seeing the actual code, but my uneducated guess is that there is some kind of framerate compensation logic which "tries" to take v-sync and 1/2 v-sync values (or between 1/2 v-sync and 1/3 v-sync, etc) into the account and "smooth out" the framerate based on those values. This results in crazy frametime spikes. Even if you turn v-sync off or run the game in g-sync mode. Under the hood it's still running "v-synced logic". I wouldn't be surprised if my uneducated guess is something that actually happens in this game.

Two things worth mentioning here:

-It's NOT a directx 12 issue, nor your hdd/ssd speeds, nor it is a shader cache issue. Although it is totally possible that stuttering happens exactly during caching, or loading assets, etc.
-It is totally possible that some people with extremely good configs don't have stuttering at all, in case if they NEVER drop below 16.6(6)ms. However, I don't believe that people with "lower end" hardware don't have that issue (I bet they simply don't notice it).

Now, if you have a GTX 1070+ and a 120hz monitor (preferably a g-sync monitor), I have a good news for you. There is a way to mitigate 100% of stutters (and by 100% I mean no single hiccup... not even those stutters that fall under "I have a slight hiccup when it's loading new area, but that's about it").

The bad news is that it's not a fix but a workaround, and you will have to play at some rather low framerates (totally worth it at the moment in my opinion, since there is no better solution available yet). The other deal breaker is that you have to play offline, because you will have to use FPS unlocker. There is no other way around, sorry (if we didn't have a frame cap in first place, it would be totally possible to apply the fix while playing online, but oh well...).

You may get banned from online, do at your own risk!

Now, if you are ok with those limitations, here is the actual workaround:

0. For g-sync owners the global config in Nvidia Control Panel should look like this:
Low Latency Mode > on
Max Frame Rate > off
Monitor Technology > G-SYNC
Power management mode > Prefer Maximum Performance
Preferred refresh rate > Application-controlled
Vertical sync > On (will be overwritten by Nvidia inspector).

1. First of all determine the absolute minimum fps you get in Elden Ring with your current settings. For the reference I will focus on my config (if you have the same hardware as me, you can simply follow the instructions). I have a hexa core cpu running at 4.4Ghz, a GTX 1080 G1 gpu (stock overclock) and a 32Gb of ram. And the absolute minimum fps I get with these specs is somewhere around ~44 fps (maximum settings; DoF, Motion blur off).

2. Go to nvidia control panel > Change Resolution > Refresh Rate.

3. Choose the refresh rate according to the minimum fps you get in the game. For example in my case I have to choose a 40-43hz mode. In my case I don't have such refresh rate available under the refresh rate modes tab (obviously), so I will use a 120hz mode instead (because 1/3 of 120 is 40hz). If my absolute minimum fps was something like ~54-59 I would choose a 50 (100hz 1/2). You get the idea. Now, the problem is settings in Elden Ring change almost nothing performance wise - at lowest possible settings the absolute minimum fps raises to ~49 which is still not enough for me to play at 50, so that's why I choose 40hz in the end.

4. Download Elden Ring FPS Unlocker from the github. (OPTIONAL) I'd suggest you to compile the project on your own. You will need a Visual Studio 2022 community version installer and a .NET Framework 4.8 Developer Pack Offline Installer. In visual studio 2022 installer choose .NET Desktop Development (for minimum install untick all optional packages under the "installation details" list, and untick "keep download cache after the installation" under "installation locations" tab). After installing the visual studio install .NET Framework 4.8 (simply follow the installation wizard instructions). Extract Elden Ring Fps Unlock source code folder somewhere and launch EldenRingFPSUnlockAndMore.sln. Delete "icon.ico" from Explorer Solution (located on the right side of the window). I'd also suggest you to open MainWindow.xaml.cs (under MainWindow.xaml) and comment out
if (File.Exists(steamIdPath)) { try { File.Delete(steamIdPath); } catch { } }
to:
//if (File.Exists(steamIdPath)) //{ // try // { // File.Delete(steamIdPath); // } // catch { } //}
In the left upper corner you will find a drop down menu (with an arrow) which says "Debug". Change that to "Release", press F6. You will find binary in "\EldenRingFpsUnlockAndMore-1.0.0.1\EldenRingFPSUnlockAndMore\bin\x64\Release".

5. Go to Elden Ring folder and rename start_protected_game.exe to start_protected_game_backup.exe. Rename eldenring.exe to start_protected_game.exe

6. To be extra safe and don't get a softban go to Start > Control Panel > Windows Defender Firewall > Advanced Settings >
Inbound Rules > New Rule > Program > start_protected_game.exe > Block the connection
Outbound Rules > New Rule > Program > start_protected_game.exe > Block the connection

7. Download Nvidia profile inspector 2.3.0.10.

8. In Nvidia profile inspector add new profile by pressing a yellow gear icon > name it "ERing" > Ok > find "ERing" in the profiles drop down list.

9. Set Vertical Sync to 1/3 refresh rate to get "40hz mode" vertical sync (or to your desired value based on Step 3).

10. OPTIONAL. To be extra safe disable internet to never go online during gameplay, or launch cmd as an admin and type:
netsh interface show interface
This will show you names of available interfaces. I use cable, so my interface is named "Ethernet". To disable it type:
netsh interface set interface name="Ethernet" admin=DISABLED
To turn it back on type:
netsh interface set interface name="Ethernet" admin=ENABLED

11. Launch EldenRingFPSUnlockAndMore.exe you have downloaded/compiled in step 4, tick framerate lock and change it to some random high value, for example 120. Press "Start game without EAC"

Now, g-sync users might rightfully question me what's the reason to do all that crap if they can simply lock fps at whatever value and call it a day? And the answer is... You can but it will NOT eliminate stuttering. As I have mentioned previously the game has some finicky v-sync/framerate cap implementation which completely breaks g-sync compatibility. I have no idea what is wrong with the game, but it simply doesn't perform as it should no matter what settings. ¯\_(ツ)_/¯
Last edited by PainkilleR; Mar 18, 2022 @ 4:14am
< >
Showing 1-15 of 40 comments
El Fuerte Mar 6, 2022 @ 5:00pm 
Originally posted by PainkilleR:

Two things worth mentioning here:

-It's NOT a directx 12 issue, nor your hdd/ssd speeds, nor it is a shader cache issue. Although it is totally possible that stuttering happens exactly during caching, or loading assets, etc.
¯

Bull crap. I stopped reading your whole post right there. It was already pinpointed by actual professional coders with tools that the game is failing to load the correct DX12 library files for caching.

Please learn the difference between bad framepacing and actual stuttering caused by cache, aka the game freezing for half a second when for example you first break an object in the game, and then it doesn't freeze ever again the next time you break that same object.

Vsync has absolutely NOTHING to do with this kind of stutter.
Last edited by El Fuerte; Mar 6, 2022 @ 5:05pm
PainkilleR Mar 6, 2022 @ 5:04pm 
Originally posted by Moluscow:
Originally posted by PainkilleR:

Two things worth mentioning here:

-It's NOT a directx 12 issue, nor your hdd/ssd speeds, nor it is a shader cache issue. Although it is totally possible that stuttering happens exactly during caching, or loading assets, etc.
¯

Bull crap. I stopped reading your whole post right there. It was already pinpointed by actual professional coders with tools that the game is failing to load the correct DX12 library files for caching.

Please learn the difference between bad framepacing and actual stuttering caused by cache, aka the game freezing for a whole second when you first break an object in the game, and then it doesn't freeze again the next time you break the same object.

Vsync has absolutely NOTHING to do with this.
This post focuses on stuttering, not freezes.
El Fuerte Mar 6, 2022 @ 5:08pm 
Originally posted by PainkilleR:
Originally posted by Moluscow:

Bull crap. I stopped reading your whole post right there. It was already pinpointed by actual professional coders with tools that the game is failing to load the correct DX12 library files for caching.

Please learn the difference between bad framepacing and actual stuttering caused by cache, aka the game freezing for a whole second when you first break an object in the game, and then it doesn't freeze again the next time you break the same object.

Vsync has absolutely NOTHING to do with this.
This post focuses on stuttering, not freezes.

what you're describing is not stutter. Its bad framepacing or micro-stuttering at worst.
Last edited by El Fuerte; Mar 6, 2022 @ 5:15pm
PainkilleR Mar 6, 2022 @ 5:13pm 
Originally posted by Moluscow:
Originally posted by PainkilleR:
This post focuses on stuttering, not freezes.

what you're describing is not stutter. Its bad framepacing or micro-stuttering at worst.
I have changed the name of the topic to MICRO-STUTTERING WORKAROUND.
Voador Holandês Mar 6, 2022 @ 5:26pm 
I've been getting either horrible tearing or terrible frame pacing depending on whether I force v-sync on or off. There's something wrong with the game alright. And it's not a cache issue for me.

I very much appreciate the tutorial, but if that is what it takes to get the game to run acceptably it is clearly not worth the hassle. I hope From will fix the issue, but given their historical incompetence I very much doubt it.
El Fuerte Mar 6, 2022 @ 5:29pm 
*sigh* Since SO MANY people are not understanding the shader cache issue in this game i made a youtube clip from a streamer who was testing Elden Ring on multiple video cards that perfectly ilustrates the issue.

https://youtube.com/clip/UgkxTZPXbRB9XPe_STHWdlbPhxUJ31Ktt587
Fast Pooper Mar 6, 2022 @ 5:32pm 
From needs to hire some Western devs even that Lance Macdonald guy fixed Bloodborne without even seeing the source code
PainkilleR Mar 6, 2022 @ 6:20pm 
Originally posted by Moluscow:
*sigh* Since SO MANY people are not understanding the shader cache issue in this game i made a youtube clip from a streamer who was testing Elden Ring on multiple video cards that perfectly ilustrates the issue.

https://youtube.com/clip/UgkxTZPXbRB9XPe_STHWdlbPhxUJ31Ktt587
Besides those micro-freezes shown in the video, can you see how the game micro-stutters when the guy simply walks around?

The original post was about that issue. The game constantly stutters every 20 meters when you simply travel the map, let alone break stuff.

Again, the workaround is aimed at stutters and not micro-freezes.
Kaldaien Mar 6, 2022 @ 9:47pm 
Originally posted by Moluscow:
*sigh* Since SO MANY people are not understanding the shader cache issue in this game i made a youtube clip from a streamer who was testing Elden Ring on multiple video cards that perfectly ilustrates the issue.

https://youtube.com/clip/UgkxTZPXbRB9XPe_STHWdlbPhxUJ31Ktt587
The shader cache problem is that it doesn't invalidate the old cache after a driver update or hardware change. Instead it ignores the error that this creates and continues running without a cache :-\

I've worked around it in Special K. The game is handed an empty pipeline cache library and not informed of the error (since it would ignore it anyway).
Kaldaien Mar 6, 2022 @ 9:53pm 
Originally posted by PainkilleR:
7. Download Nvidia profile inspector 2.3.0.10.

8. In Nvidia profile inspector add new profile by pressing a yellow gear icon > name it "ERing" > Ok > find "ERing" in the profiles drop down list.

9. Set Vertical Sync to 1/3 refresh rate to get "40hz mode" vertical sync (or to your desired value based on Step 3).
Sorry, this needs correction.

Under no circumstances should you be recommending this to G-Sync users. G-Sync is disabled for all but 2 V-Sync modes: On / Off (and OFF is not a good idea for reasons I won't get into). If you force a fractional V-Sync mode, input latency goes up massively.

Fractional refresh V-Sync is frankly bad for fixed-refresh users as well. It's one of the worst things you can possibly do for latency. Instead just grab a quality framerate limiter like RTSS or Special K, they can handle frame pacing correctly without resorting to these fractional refresh modes.
Last edited by Kaldaien; Mar 6, 2022 @ 9:54pm
PainkilleR Mar 6, 2022 @ 10:40pm 
Originally posted by Kaldaieℵ₀:
Originally posted by PainkilleR:
7. Download Nvidia profile inspector 2.3.0.10.

8. In Nvidia profile inspector add new profile by pressing a yellow gear icon > name it "ERing" > Ok > find "ERing" in the profiles drop down list.

9. Set Vertical Sync to 1/3 refresh rate to get "40hz mode" vertical sync (or to your desired value based on Step 3).
Sorry, this needs correction.

Under no circumstances should you be recommending this to G-Sync users. G-Sync is disabled for all but 2 V-Sync modes: On / Off (and OFF is not a good idea for reasons I won't get into). If you force a fractional V-Sync mode, input latency goes up massively.

Fractional refresh V-Sync is frankly bad for fixed-refresh users as well. It's one of the worst things you can possibly do for latency. Instead just grab a quality framerate limiter like RTSS or Special K, they can handle frame pacing correctly without resorting to these fractional refresh modes.
I see what you mean, and I totally agree with what you say, except this particular game has an absolutely strange v-sync/framerate cap implementation. It simply doesn't work correctly with conventional settings. I am making a video right now which will show what exactly this particular method fixes. Just give me some time. It's hard to capture such issues on the video.
El Fuerte Mar 7, 2022 @ 6:10am 
Originally posted by Kaldaieℵ₀:
Originally posted by Moluscow:
*sigh* Since SO MANY people are not understanding the shader cache issue in this game i made a youtube clip from a streamer who was testing Elden Ring on multiple video cards that perfectly ilustrates the issue.

https://youtube.com/clip/UgkxTZPXbRB9XPe_STHWdlbPhxUJ31Ktt587
The shader cache problem is that it doesn't invalidate the old cache after a driver update or hardware change. Instead it ignores the error that this creates and continues running without a cache :-\

I've worked around it in Special K. The game is handed an empty pipeline cache library and not informed of the error (since it would ignore it anyway).
Interesting. Do you think there is a way to implement Dx11 in this game and that it would make any difference?
Kaldaien Mar 7, 2022 @ 12:15pm 
No, there's no chance of that. Though for what it's worth, the game is already half-D3D11, lol. Under the hood, the thing it uses to render its UI (Scaleform) runs in D3D11.

It's a dirty little secret the game has. It's not the biggest problem the engine has, but it definitely isn't helping anything that part of the engine runs in D3D11.
kmanitou81 Mar 7, 2022 @ 2:27pm 
Lower frame time causes stuttering now?
wololo Mar 7, 2022 @ 2:38pm 
If you think you have an improvement for EldenRingFpsUnlockAndMore, why write up a massive tutorial trying to help people modify and compile it themselves when you could just link to your fork and/or submit a PR?
< >
Showing 1-15 of 40 comments
Per page: 1530 50

Date Posted: Mar 6, 2022 @ 4:54pm
Posts: 40