criterion-sm dice-lg ea-starwars-lg instagram lucasfilm-lg motive-lg twitch you-tube

[How to] Fix stuttering and 100% CPU usage at the beginning of the round (AMD GPU)

Szaby
96 posts Member
edited October 2018
I've seen a lot of people suffering from this issue, so I decided to share how I dealt with it.

The stutter is caused by the shader compilation & shadercache generation which happens the first time you launch the game (and necessary to do it again after game/driver updates or shadercache reset) and every map.
The DX12 mode now creates it's own cache so that might be a good option for some people, but despite this advantage the DX12 mode is still less smooth and less stable, so overall provides worse experience.

When the cache is being generated the graphics driver will use all available CPU resources to do it as fast as possible, this is what's causing the stutter, because (on most PC-s) the game doesn't have enough CPU resources left to provide smooth gameplay AND also generate the cache files.
On some PC-s (usually with HDD and/or with slower CPUs) this can cause extreme stutters, and the game could even freeze for 1-2 seconds.

Here is a step-by-step tutorial and also a full video illustration: Fix for stuttering and 100% CPU usage at the beginning of the round in Star Wars Battlefront 2

Test system: Windows 10 1803, i7-4790k, R9 Fury + AMD RS 18.4.1, 16 GB RAM

Necessary tool: Something to monitor the CPU usage, I'll use my usual combo (MSI Afterburner+HWINFO+RTSS) for the best demonstration. The windows task manager will also do fine, just less convenient.

1. Launch Radeon Settings
  • Navigate to Gaming -> Global settings tab
  • Click on Reset -> Shadercache: YES

    To double check remove all files from here too (press ignore for locked files):
    %localappdata%\AMD\DxCache

    Optional: if you'll have issues (see the notes) you can also add starwarsbattlefront2.exe to the game profile list and enable the shadercache there.


2. Open the Shadercache folder
  • Press Winkey+R
  • Paste this line
    %localappdata%\AMD\DxCache

    and press enter

    You'll have a few files there but nothing large, since you just reset it. Leave this window open.

3. Launch the game

(I'm doing it with the Modmanager because I use some mods, but you can launch it the usual way with Origin.)

1st phase - generating the main cache

IMPORTANT: DO NOT DO ANYTHING after the game booted, stay in the main menu.
  • Now this is where you should start paying attention at the CPU usage. When the shadercache is generated you'll have increased usage on all cores/threads.
  • If everything is working, the previously opened shadercache folder will have a new file and it's size will increase.
  • Wait patiently until the CPU usage drops. If this is done continue to the next step.

2nd phase - caching additional assets for each map

The initial cache doesn't contain every necessary assets, you still have to do a similar process for each map the first time you launch them. (I used an arcade battle scenario on the video.)
  • So, start playing, when you load the first map and get into the spawn screen, you'll experience high CPU usage and stutter again.
  • If you have a choice don't spawn until the CPU usage is normal again, if that's not an option then you'll have to wait it out on the battlefield battlefront.
  • Do this with every ("new") map, once you''ll have the assets generated for each map, the next time you load them it will be smooth from the beginning. (Check the video, no high CPU usage at all, the second time I launch the same map).

If you check the shadercache folder, the file size might increase again. Once all maps are generated it will be around 160 MB or more depending on your VGA and how many maps have you played.

NVIDIA:

I also tested the same process with an nVidia hardware as well, the cache needs to be manually removed:
C:\ProgramData\NVIDIA Corporation\NV_Cache

or for older driver versions:
%temp%\NVIDIA Corporation\NV_Cache\


It was on a System with i5 4460+GTX970 and while it improved the performance, wasn't as good as with the AMD hardware, might be because of the slower CPU or the nVidia cache is less effective with this game.


NOTES:
  • Cache generation speed may vary depending on your CPU performance and storage (HDD vs. SSD) speed.
  • Each map (variant) needs it's own cache, for example Hoth HvV will still generate some assets even if you already played Hoth Galactic Assault.
  • Arcade map generation seems to be faster and less demanding.
  • Mods can affect this, especially the new No holo mod with in-game spawn. Will take a few seconds more to generate the cache.
  • Sometimes the AMD driver doesn't save the cache files. You may need to toggle the cache ON/OFF/Optimized to "trigger" proper function. (That's why I suggested to add the game executable and also monitor the folder to be 100% sure it's working as intended).
  • As I said earlier, new game and driver updates will require to repeat the process.

I really hope a future game/driver update will fix this issue. Would make sense to generate the full cache like how it is done in DX12 to avoid in-game stutters.

UPDATE 2018.10: I had the chance to play the game on my GTX 970 again, it seems the nVidia shadercache is broken with this game: for some reason, the driver is not keeping the files after you relaunch the game. Which means you'll experience stuttering and 100% CPU usage almost every time you load the map.
I reported it to them, I suggest to do the same, more reports will ensure getting it fixed.
Post edited by Szaby on

Replies

  • Detailed explanation like it.
    ''The difference between a fall and a sacrifice is sometimes difficult, but I feel he understood that difference, more than anyone knew. The galaxy would have fallen if he had not gone to war. Perhaps he became the Dark Lord out of necessity to prevent a greater evil''
    9qkoakxcje0l.gif

  • Can others confirm if this works?
  • capyJuky
    31 posts Member
    Can others confirm if this works?

    It didn´t work. For me at least.
  • BuGoRk
    10 posts Member
    I had a lot of freeze and this solved my problem.

    Thanks!
  • Anapoda
    745 posts Member
    I'm a Nvidia peasant, any tips for poor ol' me?
  • Anapoda wrote: »
    I'm a Nvidia peasant, any tips for poor ol' me?

    Me too
    -----
    Tired of BUGs?

    Well, they'll still exist.
    But visit the Rogue Bros Channel, there we document many BUGs and possible workarounds for them. There's also gameplay and other videos related to EA's Star Wars Battlefront (I & II)
  • fancyladypants
    257 posts Member
    edited July 2018
    Szaby wrote: »
    I've seen a lot of people suffering from this issue, so I decided to share how I dealt with it.




    NVIDIA:

    I also tested the same process with an nVidia hardware as well, the cache needs to be manually removed:
    %temp%\NVIDIA Corporation\NV_Cache\

    It was on a System with i5 4460+GTX970 and while it improved the performance, wasn't as good as with the AMD hardware, might be because of the slower CPU or the nVidia cache is less effective with this game.


    :(

    It is awesome though that this helped someone!

  • Szaby wrote: »
    I've seen a lot of people suffering from this issue, so I decided to share how I dealt with it.




    NVIDIA:

    I also tested the same process with an nVidia hardware as well, the cache needs to be manually removed:
    %temp%\NVIDIA Corporation\NV_Cache\

    It was on a System with i5 4460+GTX970 and while it improved the performance, wasn't as good as with the AMD hardware, might be because of the slower CPU or the nVidia cache is less effective with this game.


    :(

    It is awesome though that this helped someone!

    TBF I didn't read the whole post exactly because it was about AMD, as stated in the title. But it seems there's for NVidia as well. I'll test this method later
    -----
    Tired of BUGs?

    Well, they'll still exist.
    But visit the Rogue Bros Channel, there we document many BUGs and possible workarounds for them. There's also gameplay and other videos related to EA's Star Wars Battlefront (I & II)
  • Anapoda
    745 posts Member
    Szaby wrote: »
    I've seen a lot of people suffering from this issue, so I decided to share how I dealt with it.




    NVIDIA:

    I also tested the same process with an nVidia hardware as well, the cache needs to be manually removed:
    %temp%\NVIDIA Corporation\NV_Cache\

    It was on a System with i5 4460+GTX970 and while it improved the performance, wasn't as good as with the AMD hardware, might be because of the slower CPU or the nVidia cache is less effective with this game.


    :(

    It is awesome though that this helped someone!

    TBF I didn't read the whole post exactly because it was about AMD, as stated in the title. But it seems there's for NVidia as well. I'll test this method later

    Same lol, time to see if it works.
  • Relikk
    244 posts Member
    Yeah I get this on the first game I play every time I start the game (GTX 1080). It's really annoying when you run into a group of people you have to kill and the game starts stuttering.
    ___________________________________________________________________________________________________________________
    du2UASv.gif
  • Intel 7700k 4.2Ghz CPU, 32gb 3200Mhz MEM, Samsung 670 Pro M.2 1tb SSD, Asus Rog Strix 1080ti 11gb OC, 27" G-sync monitor.

    When I first boot up SWBF2, I let it run for about 5 minutes or so on the main screen. The OP is correct that this may help some players. SWBF2 CPU optimization is poor, but it is what it is.

    Normally when playing GA and it is a new map, as soon as I spawn in there will be a slight delay of 2-3sec with some microstuttering. Some of the maps seem to take a little bit longer, but after a couple of minutes the game runs smooth.

    I do use Nvidia Inspector and it helps. There should be more information about Nvidia Inspector in the Off-Topic section of the forum.

    I also agree with the OP that the shader cache tweaks they have shown may work or not work for you. Even if it's only a slight performance increase the changes won't hurt your system.


    KC
  • excellent post...
    nvidia players (including myself) - always make sure you're running the most up-to-date drivers because of the DX11 / DX12 issue. I keep the game on DX11 - don't see a much stuttering except for the first game (which I go to Arcade to get that over with). I also turn off vertical sync (or v-sync) in the control panel settings - which forces the GPU to keep up with the refresh rate of high-end monitors (above 75 Hz) - critical for VR headsets and 3D gaming?
    *right click the desktop and open the nVidia control panel - go to mange 3D settings - then Google search every setting listed until you are sure they are correct* bc I ain't going no further than this!
  • Szaby
    96 posts Member
    edited October 2018
    Updated the post with more info for nVidia users. Looks like the nVidia shadercache is not working well with this game, so this method won't solve the issue completely, but emptying the NV_Cache folder might still help.
  • I am using Nvidia and I am really tired of DX12 shader calculations everytime, so I use only DX11, it is much more faster.
  • EA FIX THIS!!!!!!!!!!!!
  • AlexGaming1G
    1 posts Member
    edited January 2019
    I know this thread is old however I was able to from what it seems solve the issue by using DDU display driver uninstaller and reinstall latest nvidia driver. The range is 50-70%. This not only deletes the old cache but other settings as well. I do run the game in dx11 as dx12 isn't fully supported as it states. Graphics are max out with frames from 100-200fps depending on what's going on.

    DDU
    https://www.wagnardsoft.com

    Ryzen 1600x 4.0Ghz
    8GB 2400 Mhz
    GTX 1070
    Samsung m.2 970
    1 TB 7200rpm hard drive (where BF2 is installed)
  • Also getting these issues still even after this incredibly detailed and insightful walkthrough. I really wish EA would fix this, I see countless threads that are a year or more old with people that have this issue. Even on consoles.

    Pathetic, EA.
Sign In or Register to comment.