Require help troubleshooting consistent Battlefield 4 micro-stutter

Questions about Wine on Linux
Locked
User avatar
ridge
Level 1
Level 1
Posts: 7
Joined: Fri Jul 30, 2021 5:37 pm

Require help troubleshooting consistent Battlefield 4 micro-stutter

Post by ridge »

Hello forum!

I’ve been playing Battlefield 4 for a good amount of months now, and hopefully building up a nice and big shader cache.
Now, I’m well aware shaders being compiled causes stutter during runtime, but even on maps I’ve played over 10, if not more hours on I still get this hitching - as if my shader cache isn’t being used 🤔
On some maps, the hitches are slightly longer. The stuttering is usually 250ms long, every 3 seconds.

Here's a video of a worst case scenario map: https://youtu.be/gMQDr2kvVOA?t=114

I do not have this issue in other games I play, both native/Windows games via Wine, or Battlefield 4 natively on Windows.
My system info via inxi: https://paste.ubuntu.com/p/67vRr3vssf/

Thing is I’ve seen people get this game running 100% smoothly with Wine, and I really want to figure out if my machine can do that as well 😄

This is how I run the game:
  • Origin overlay and telemetry is disabled
  • With -notexturestreaming arg
  • With Feral Gamemode
  • DXVK, esync & fsync
  • Windows version set to Windows 10
Here are my env. variables for BF4:
  • Nvidia GPU is reported to the game via DXVK.
  • __GL_SHADER_DISK_CACHE=1
  • __GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1
  • __GL_THREADED_OPTIMIZATIONS=1
Furthermore, unsuccessfully tried the following things:
  • Disabling write permissions for AppData/Roaming/Origin
  • Disabling desktop composition
  • Reporting an AMD GPU via DXVK
  • Using 200% resolution scaling in game to increase GPU usage
  • Setting "prefer max performance" in the Nvidia settings GUI
  • Tested on Manjaro, Xanmod, Zen and Liquorix kernels
  • Setting CPU governor to performance
  • STAGING_SHARED_MEMORY=1 and 0
  • DXVK-NVAPI (With WINEDLLOVERRIDES=“dxgi,nvapi,nvapi64,nvml=n”)
  • Tried playing without DXVK, and it still had the exact same stutter at the exact same rate. So I believe DXVK isn't the issue.
  • Tried setting Windows version to 7 and 8.1
DXVK versions I tried:
  • v1.9.1L
  • v1.9.1
  • v1.9L-8b6ac52
  • v1.9L-async
  • v1.9L
  • v1.8.1L
  • v1.7.1L
Wine versions I tried (64 bit prefix): I feel like I’ve tried every solution out there in the solar system!
Also, because of how disabling DXVK still shows the game having the same consistent stutter, I believe there might be a problem with how networking is handled, or maybe CPU? I just don't know, really.

And last but not least, if its of any interest here’s the Lutris log, where I launch Battlefield 4, join a server, run around a bit and then leave. The terminal didn’t output anything while I was playing, but who knows. It’s insanely long tho: https://paste.ubuntu.com/p/26sXsszK5P/

So, any tips? Did I miss any things I could try to troubleshoot this further? Thanks in advance everyone!!
User avatar
ridge
Level 1
Level 1
Posts: 7
Joined: Fri Jul 30, 2021 5:37 pm

Re: Require help troubleshooting consistent Battlefield 4 micro-stutter

Post by ridge »

This issue has been resolved!

I thought to try playing on Manjaro again, and with the EA App and Wine 6.19-GE instead of Origin + whatever Wine version I was using then it works flawlessly.
That being said, I've had to downgrade from the 2060 to 1060; I'm not sure if the change in graphics card is what fixed it, but I can't imagine.

Anyone with this issue, try the following or a similar config:
- Wine-GE-6.19-1, DXVK + D3D Extras + DXVK NVAPI + Esync + Fsync enabled in Lutris.
- Use the EA App, not Origin.
- In Lutris, configure Battlefield 4 -> System options tab, put the following in the "Include processes" field:

Code: Select all

bf4.exe EADesktop.exe BF_Launcher.exe


Curious if this helps anyone!
Locked