Anyone else get awful stuttering when using DX12? Is there a fix or are the games/API just broken?

Discussion in 'Videocards - NVIDIA GeForce Drivers Section' started by BlindBison, Jan 14, 2020.

  1. BlindBison

    BlindBison Master Guru

    Messages:
    409
    Likes Received:
    66
    GPU:
    RTX 2080 Super
    Hi there guys,

    For this, I'm using a 3900X and 2080S at stock clocks along with 32 GBs of DDR4 3200 Mhz RAM on an NVMe SSD for context if it's relevant (playing at 1440p). My Nvidia driver and windows itself are fully up to date. The games are also up to date on its latest patch.

    For every DX12 game I have tested (Battlefield V/Control/Borderlands 3), I get frequent awful hitching/stuttering whenever I enable the DX12 API regardless of other settings.

    Notably, this stuttering disappears when I switch over to DX11 (for BFV for example).

    I did see online that folks "resolved" this by disabling the "Control Flow Guard" for the specific application -- just as a test then I toggled this OFF globally and then even tried fully disabling all exploit protection globally (as well as all firewall/Defender security blocks just as a test), but -- this did not resolve the issue at all for me in my tests.

    Are the games or the API just "bad" or what? I expect others have seen this issue in practice as well.

    Anyway, thank you for your help and time, I really appreciate it.
     
  2. mbk1969

    mbk1969 Ancient Guru

    Messages:
    9,816
    Likes Received:
    6,754
    GPU:
    GF RTX 2070 Super
    I played one or two games (Tomb Rider, Deus Ex) with DX12 and they were fine. I saw many gurus mentioned that they played DX12 titles fine too.

    Do not forget that DX12 is not a magic wand. Game developers can spoil any interface they use.
     
    Mda400, Kolt and BlindBison like this.
  3. Smough

    Smough Master Guru

    Messages:
    531
    Likes Received:
    89
    GPU:
    GTX 1060 3GB
    The only game that had stutter at DX12 on my system was Metro: Exodus. On DX11 it plays fine, the rest of the games I have tested on DX12 are smooth; Tomb Raider, HITMAN and some others. Maybe it's the Standby Memory issue?

    Also, try doing a clean driver install with DDU.
     
    BlindBison likes this.
  4. BlindBison

    BlindBison Master Guru

    Messages:
    409
    Likes Received:
    66
    GPU:
    RTX 2080 Super
    @Smough @mbk1969

    Thanks, good to know! I have not yet played Tomb Raider or Hitman on DX12 so perhaps it's a game specific implementation thing.

    I read online at least that for most testers performance decreased with DX12 for Battlefield V for example so perhaps it's simply their implementation.

    I have tried the clean DDU driver installation and the Standby Memory tool from Wagnersoft, but it didn't help in this case -- I may try playing more DX12 games to see if it's implementation specific since so far the games I tested that stutter in dx12 seem to work better in dx11.
     

  5. mbk1969

    mbk1969 Ancient Guru

    Messages:
    9,816
    Likes Received:
    6,754
    GPU:
    GF RTX 2070 Super
    Also, consensus is NV DX11 drivers are better than AMD DX11 drivers, so the gain from going to DX12 is greater for AMD cards.
     
    Mda400, moo100times and BlindBison like this.
  6. BlindBison

    BlindBison Master Guru

    Messages:
    409
    Likes Received:
    66
    GPU:
    RTX 2080 Super
    Ah, I didn't know that, thanks.
     
  7. mkh

    mkh Member Guru

    Messages:
    123
    Likes Received:
    5
    GPU:
    Asus 2080 Dual O8G
    COD MW 2019 has pretty good dx12 performance and is dx12 only. Maybe it's the games that were not build ground up for dx12 that lack in performance. Where the support was patched in later on.
     
    Strange Times and BlindBison like this.
  8. Carfax

    Carfax Ancient Guru

    Messages:
    2,933
    Likes Received:
    465
    GPU:
    NVidia Titan Xp
    The DX12 API is fine, it's just the implementation might be bad. I have both of these games and they play absolutely fine in DX12 mode for me. BF5 is actually faster and smoother in DX12 now after several driver and game updates. BL3 is still a bit slower in DX12 compared to DX11, but only in GPU limited areas. In CPU limited areas, DX12 is faster.

    My advice is, delete the shader cache for Windows 10 under the storage setting. Also, for BF5 make sure you have the future frame rendering option enabled. Also, disable Ansel and any other overlays if you haven't already.
     
    Kolt likes this.
  9. BlindBison

    BlindBison Master Guru

    Messages:
    409
    Likes Received:
    66
    GPU:
    RTX 2080 Super
    @Carfax CoD Modern Warfare runs great for me with only occasional stuttering (seems tied to asset streaming in most cases being my guess for when it pops up).

    I almost always leave FFR enabled regardless of game since I can't stand stuttering and want to help out my CPU as much as I can -- BFV is really a stuttering mess for me with DX12 enabled and I get lower average fps to boot (have tested a couple levels with both).

    The one thing I don't understand is deleting the Shader cache -- I could be missing something, but -- don't you "want" the shader cache? Or, would deleting it simply cause it to "reset" and rebuild? Thanks
     
  10. BlindBison

    BlindBison Master Guru

    Messages:
    409
    Likes Received:
    66
    GPU:
    RTX 2080 Super
    @mkh Yeah, it seems that way to me -- like, some titles were simply made DX12 "compatible" rather than being built from the ground up with DX12. My big question is where exactly is all DX12 Stuttering coming from exactly -- shaders? CPU bottleneck? Isn't DX12 suppposed to help the CPU/increase utilization across cores and all that jazz? It's a real pain in the neck.
     

  11. bobblunderton

    bobblunderton Master Guru

    Messages:
    341
    Likes Received:
    159
    GPU:
    EVGA 2070 Super 8gb
    DX11 and DX12 differ in a few ways. The biggest one is that DX12 allows multi-threaded draw calls - that means in scenes with a LOT of detailed objects, the gpu won't be waiting for a single-thread of the CPU to file all the draw calls to the GPU one at a time. Thousands of time per frame, 50~100 frames a minute (or more / less).
    Draw calls are simply the CPU processing the scene and telling the video card to render one identically-textured connected set of (UV) textured surfaces on a model, one at a time. If a model has four different textures on it, and all the faces using each like-texture are sewn together while modeling, then it will require four draw calls (or more, if there's LOD versions of that same model in the distance, different LOD's won't batch). If a model has forty different surfaces, each with a different texture, it will require 40 draw calls. It does not make much difference to the gpu if it's got to render 1 surface, or 10,000 surfaces with one draw call, the gpu can render all this in roughly equal time. Lots of little draw calls really slow down filling in the scene, especially if the engine has a lot of state changes in between. So it pays in DX11 and below to keep draw calls down more than say in DX12 where multiple threads are working to drive the GPU to fill in the scene.
    Batching = multiple identically textured surfaces on a model will batch, this is implemented at game-engine rendering engine level. This has no performance hit and is only a bonus to performance if anything. They will all draw in at once, take for example, two or more identical doors on an apartment building.
    LOD's = Levels of detail. These are how things are rendered in open-world 3D games for ages now, these get progressively simpler as the camera/player is further away, requiring less triangle fill from the GPU to render, and much less draw calls via the CPU to render.

    Wait, but isn't this off-topic?
    Nope, you need to learn this to help know why you're getting stuttering and how to fix it. I make 3D game worlds and know a decent bit about PC hardware. So I might be able to help.
    Look to the CPU my friend. There's likely monitoring software doing it if the stutter is regular in intervals. That's what happens on my 3700x in *some* applications if I leave some (but not all) monitoring software open, especially if it's older software that predates the processor.
    Some forms of Denuvo DRM can also cause a stutter, as has been noted in Just Cause 3, and looping these DRM phone-home calls back to 127.0.0.1 via Windows hosts file can be helpful. So look to see if your game has Denuvo, it might be the root cause of it. I've personally avoided Denuvo like the plague but don't use pirated software either. I just choose to wait until it's on GoG or similar sites without it, as it can cause the exact issue you describe.
    Open an administrator command line, (CTRL+SHIFT+CLICK on command console icon, used to be called 'MS-DOS prompt'), and type in the following CHKDSK /F C: then press enter. If it asks to restart, type Y and hit enter, save your work, then restart the machine. The machine may take up to a minute (or more if you have hard drives in your system), which it will then reboot again and be ready for use. This specific problem is caused by a failure to shut down properly. This showed up in 'Saints Row IV' as a random hitching issue with regularity of about 1 time a minute to 10 times a minute getting stuck for 2~6 seconds each time it locked up. One time it locked up completely, too. So next time I restarted and did that command and it went away completely.
    THIS LAST ISSUE IS ALSO TRUE FOR RADEON USERS SPECIFICALLY POLARIS CARDS CRASHING / ACTING DEFECTIVE.
    If you've closed everything out, and you're still getting a stutter, it is (somewhat) known that Windows 10 can cause certain video cards to clock too high, causing all kinds of problems from random hitching up to complete display driver resets / complete OS lockups or loss of inputs/outputs / BSOD's. The way to test for this is to downclock your video board 100~200mhz on it's core clocks using software such as MSI afterburner (if closing it out in the above test did not work, of-course!), and see if the issue persists. If it goes away, play around with the video card clocks to see if you can gain back any of the lost speed without re-introducing the issue. If the issue comes back, lower clock speed by about 25~30mhz at a time until it's gone. This works for both Nvidia and AMD dedicated graphics cards, and differs in the models affected.
    For example, my old RX 480 8gb model with a default factory-clocked core of 1250 and custom AIB model (that I purchased) clocked the core at 1288mhz. Windows 10 would take it up to 1303mhz or higher at times, sometimes hitting 1310 - even if I manually set it lower and set it back to 1288max mhz, and it just wasn't stable there no matter what I did with the voltage. A friend with an MSI RX 480 4GB card with 1303mhz core (or close to that) was reporting the same issue with up to date drivers just last week. Well, it surely was the same issue, as downclocking it 100mhz stabilized it ARK game for four hours - but then it crashed, moving the clock-speed down another 50mhz solved it entirely and he could play all night.
    For me the issue showed up as hitching randomly while editing on BeamNG Drive, and then eventual crashes to desktop and the closing / lockup of any open 3D app or game (such as Maya and the game I was creating maps for). I tried everything, then I tried downclocking the card and poof the lockups got less, a little more clock speed off the core and poof, issue went away entirely. Eventually my graphics board did die due to the substation near us EXPLODING in a violent 10 second BZZZT over all the stereo-systems in the house, so, I needed a new card.

    I haven't had the issue recur on my EVGA 2070 Super 'Gaming Black' (which I love, mind you), for what it's worth.
    This advice above is to be constructive and help you no matter what your tech level, taking little knowledge for granted. This assumes however you have basic hardware, software, and operating system competence. This article also assumes you have already tried to remove your driver via DDU and install a newer version already. This is not meant to offend in any way, if it does, please let me know constructively.
    If you wish to correct any of this information, please do so citing sources, so I may update my information accordingly.


    I hope some of this helps you, Good luck!
     
    Carfax and BlindBison like this.
  12. BlindBison

    BlindBison Master Guru

    Messages:
    409
    Likes Received:
    66
    GPU:
    RTX 2080 Super
    @bobblunderton Thank you for the thorough write-up, that's very helpful to know!

    I do use Rivatuner (RTSS) to measure framerate in the title as far as monitoring software goes.

    As for Denuvo (DRM), I would think in Battlefield V's case at least the same DRM would be active in DX11 and 12, no?

    In any case, after work today I'll try what you recommend there:

    1) Turn off monitoring software (RTSS)
    2) Try command line to properly shut down the machine
    3) Try downclocking GPU (I expect I can do this with MSI Afterburner, no?)

    As for Denuvo, I have seen Overlord gaming's tests proving that DRM can cause major stuttering -- for that reason, I greatly dislike DRM.

    Notably though in the case of Battlefield V at least, the stuttering on DX12 appears to happen for many people, not just myself. I recently read an article where they tested DX12 with several different GPUs and the issue happened regardless when using DX12 (can't recall the link off the top of my head though unfortunately, but will look again later).

    I'd be surprised if monitoring software like RTSS was causing the issue though -- I had thought the perf impact of RTSS monitoring was supposed to be negligible, but I could be wrong.
     
  13. bobblunderton

    bobblunderton Master Guru

    Messages:
    341
    Likes Received:
    159
    GPU:
    EVGA 2070 Super 8gb
    Awful stuttering only in DX12 (as it frees up the CPU bottlenecks, providing you don't go gonzo with the AI) can mean a few other things, too. If your GPU hits thermal throttle it WILL stutter but generally you'll see a slight drop in FPS as it hits around 80~85C until absolute throttling over 90~100C temps. Cleaning fixes that, or getting better case in-take fans if they're already clean. Running with the side off seriously dropping temps will tell you if your case fans are strong enough to keep the system cool enough. Side off and <10C difference? You're good enough with the case fans, a 20C drop or more tells you the system is not getting enough fresh air - sadly some cases this is incurable, but most cases have enough intake fan ventilation room outright to install better fans like Noctua's to fix the issue. Running the system for prolonged periods with the side panel off can cause other parts (like drives or the motherboard's VRM) to heat up unnaturally, as systems are designed for positive ventilation (pulling cool air in the front or bottom blowing hot air out the back and/or top by force) by large and whole these days short of OEM pre-built solutions which sometimes use negative ventilation (sucking air out by force). Your system may have dust filters on higher-end cases, do check those first. If it's been more than a month or two - especially if you smoke or have pets - they're likely filthy.
    Also, if your GPU is defective in the memory on the GPU, you might never know it outside of stuttering. Try another similar-series GPU and re-test.
    If that's not available, find the program that checks for GPU memory errors, I forget which one that is but there is a free one that can. Memory parity bit check failures will cause hitching if there's enough of them.
    The issues with clocks on the video board going too high btw, is NOT caused by the monitoring software or it's ability to adjust clocks (just to clarify!). Though the software itself on AMD CPU's (as I have one) can sometimes be the source of hitching as it queries the cpu. I had my CPU "CORE TEMP" program set to 10 seconds, sure enough, every 10 seconds some of my software (but not others) would hitch.

    If you have a spare SSD to use as a system drive you can try pulling your existing drive and trying linux or reinstalling the OS and seeing if it still does it, but I'd sooner see you try RMA'ing the card before you reinstall the system - as that can be a real pain in the butt.
    Yes, you can downclock the GPU with MSI Afterburner or possibly RivaTuner software (I haven't used riva tuner in a dogs age, but I know for a fact MSI afterburner can certainly do what you asked).
    --Good luck!
     
    BlindBison likes this.
  14. The Goose

    The Goose Ancient Guru

    Messages:
    2,522
    Likes Received:
    112
    GPU:
    MSIrtx2080 superXS
    The Division2 dx12 on i7 7700k,32gig ddr4 3200 and Msi 2080sxuper xc runs flawless
     
  15. BlindBison

    BlindBison Master Guru

    Messages:
    409
    Likes Received:
    66
    GPU:
    RTX 2080 Super
    UPDATE:

    I actually found a somewhat solution in my case (for BFV at least -- only one i've tested so far).

    1) Fully disabled all Windows Defender Settings I could find

    2) Fully disabled any Firewall settings I could find

    3) Since you can't disable "real time protection" (it re-enables after some time automatically), I added an "exclusion" for the BFV folder (where its installed) and for the bfv.exe

    4) searched in the windows bar for "exploit" to get to exploit protection -- from here disabled all of these globally -- then just to be sure, went into program settings tab and added bfv.exe then disabled control flow guard (and the rest) here.

    Now, though BFV still has the occasional hitch, the stuttering is greatly reduced. I had seen this done more or less (the control flow guard thing) online, but that didn't work for me so I went nuclear and it didn't appear to help til I added the exclusion from real time protection.

    Anyway, I need to do more testing, but initially results are positive for me.
     

  16. BlindBison

    BlindBison Master Guru

    Messages:
    409
    Likes Received:
    66
    GPU:
    RTX 2080 Super
    UPDATE #2:

    Turns out it's more complicated than my last comment.

    So, I now believe this has more to do with the way DX12 handles shaders (though the security exclusion may have helped too, I really don't know -- on Youtube lots of folks are saying that approach alleviated the issue for them so what do I know).

    I did some testing with DX12 in BFV and my findings are interesting.

    1) Load up a level
    2) Start playing through and get lots and lots of stutters
    3) At some point, restart the level -- ZERO stutters this time

    I have yet to test playing level A, then restarting it, then moving to level B to see if the "no stutters" carries over, but I will do this test.

    It could be that the first time you play a level, it's installing all these shaders or some such on the fly then the next time you play the level they're already there -- or something.

    Need to do more testing, but this is really bizarre -- like, whatever the game is "doing on the fly" they either need to re-write that so it doesn't stutter this way OR just do whatever it is they're doing on the fly in advance while the level loads, no?

    Interestingly, the new CoD is DX12 and perhaps the reason why it doesn't have the same issue is because it preinstalls all the shaders on startup. If I'm right about this being the reason, then I really wish BFV did the same.
     
    Last edited: Jan 16, 2020
  17. Carfax

    Carfax Ancient Guru

    Messages:
    2,933
    Likes Received:
    465
    GPU:
    NVidia Titan Xp
    That's why I told you to delete the DirectX shader cache. Deleting it won't do anything, but if any of the shader files are corrupt or whatever it will get rid of them and just repopulate when you play the game again.

    Most stuttering in games can always be traced to shader compilation. DX12 is supposed to solve that by having the shader compilation take place right as the game boots up or during the level loading process. But not every engine is fully DX12 capable yet, especially Frostbite 3 and UE4.
     
    Kolt and BlindBison like this.
  18. BlindBison

    BlindBison Master Guru

    Messages:
    409
    Likes Received:
    66
    GPU:
    RTX 2080 Super
    @Carfax Thanks, I appreciate that. Very helpful for determining what the issue was! For BFV, it seems like in DX12 mode, shaders are not installed during loading or in advance -- my tests seem to indicate they are compiled "on the fly" during gameplay which causes stuttering. BUT, this only happens on a first play through in my case (at least after having disabled CFG/set an exclusion for RTP for BFV -- will need to test without that too) -- reload the same level after having played it once and those stutters are almost all gone has been what I've seen.

    Really really weird that it works that way -- very interesting to learn all this, but I think I'm just gonna stick to DX11 after all this. The perf impact of even Low/Medium RTX is just too high imo to be worth it anyway.

    Seems more like the RTX cards (and super cards for that matter) are more experimental at this point. I can barely tell the difference in most scenes between the stock cube maps/SSR VS RTX, but perhaps that's just me.
     
  19. Carfax

    Carfax Ancient Guru

    Messages:
    2,933
    Likes Received:
    465
    GPU:
    NVidia Titan Xp
    That's VERY odd, because I've tested BF5 in DX12 and DX11 mode and come away with opposite results. For me, BF5 in DX12 mode compiles the shaders when it's loading the map and once I'm in the game, it stops and I can play instantly with no stuttering at all. With DX11 on the other hand, the shaders compile during the actual game. I monitored my CPU usage with MSI Afterburner and saw this myself. With DX12 my CPU usage is sky high when the map is loading which indicates that the shaders are compiling, but once I'm in game, the CPU usage drops dramatically. With DX11 it's the opposite. As the level is loading, my CPU usage isn't very high at all, but once I get in game, it skyrockets for a while and movement is jerky and laggy until the CPU usage drops back to normal.

    I tested this in the Last Tiger single player campaign which is very CPU intensive.

    As I said before, DX12 is supposed to compile all the shaders before gameplay. DICE has improved Frostbite 3's capabilities to do this over time, and I think it's very good now. I have no idea why your system is behaving the way it does.

    You should definitely delete the OS shader cache, and also disable the driver shader cache for BF5 if you want to use DX12.
     
  20. Astyanax

    Astyanax Ancient Guru

    Messages:
    7,933
    Likes Received:
    2,652
    GPU:
    GTX 1080ti
    BF5 and Battlefront 2 precompiles
    BF4 and Battlefront(1) do not.
     

Share This Page