Need help troubleshooting (micro)stutter in Battlefield 4

Hi hi! New to the forums, I hope I’m doing this right!

I’ve been playing Battlefield 4 for a good amount of months now, and hopefully building up a nice and big shader cache. But still, the game consistently has weird stuttering. 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 :thinking: On some maps, the hitches are slightly longer. (Final Stand, anyone?)

Here’s a video:

Here is my inxi output:

System:
  Kernel: 5.13.4-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.13-x86_64 
  root=UUID=6b8c3e50-cb52-4aff-a403-1f7387843bc8 rw quiet udev.log_priority=3 
  Console: tty pts/1 wm: kwin_x11 DM: SDDM Distro: Manjaro Linux 
  base: Arch Linux 
Machine:
  Type: Desktop Mobo: Micro-Star model: B450M PRO-VDH MAX (MS-7A38) v: 8.0 
  serial: 07A3881_L21E647740 UEFI: American Megatrends LLC. v: B.C0 
  date: 05/14/2021 
Battery:
  Message: No system battery data found. Is one present? 
Memory:
  RAM: total: 15.55 GiB used: 4.69 GiB (30.2%) 
  Array-1: capacity: 128 GiB slots: 4 EC: None max-module-size: 32 GiB 
  note: est. 
  Device-1: DIMM 0 size: No Module Installed 
  Device-2: DIMM 1 size: 8 GiB speed: 3066 MT/s type: DDR4 
  detail: synchronous unbuffered (unregistered) bus-width: 64 bits 
  total: 64 bits manufacturer: Kingston part-no: KHX2666C16/8G 
  serial: E83BE742 
  Device-3: DIMM 0 size: No Module Installed 
  Device-4: DIMM 1 size: 8 GiB speed: 3066 MT/s type: DDR4 
  detail: synchronous unbuffered (unregistered) bus-width: 64 bits 
  total: 64 bits manufacturer: Kingston part-no: KHX2666C16/8G 
  serial: E73BE642 
CPU:
  Info: 6-Core model: AMD Ryzen 5 2600 socket: AM4 bits: 64 type: MT MCP 
  arch: Zen+ family: 17 (23) model-id: 8 stepping: 2 microcode: 800820D cache: 
  L1: 576 KiB L2: 3 MiB L3: 16 MiB bogomips: 81625 
  Speed: 1379 MHz min/max: 1550/3400 MHz base/boost: 3400/3900 boost: enabled 
  volts: 1.1 V ext-clock: 100 MHz Core speeds (MHz): 1: 1379 2: 1374 3: 1308 
  4: 2781 5: 1446 6: 1334 7: 1398 8: 2827 9: 1913 10: 1388 11: 1340 12: 1295 
  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1 
  bmi2 bpext clflush clflushopt clzero cmov cmp_legacy constant_tsc cpb cpuid 
  cr8_legacy cx16 cx8 de decodeassists extapic extd_apicid f16c flushbyasid 
  fma fpu fsgsbase fxsr fxsr_opt ht hw_pstate ibpb irperf lahf_lm lbrv lm mca 
  mce misalignsse mmx mmxext monitor movbe msr mtrr mwaitx nonstop_tsc nopl 
  npt nrip_save nx osvw overflow_recov pae pat pausefilter pclmulqdq pdpe1gb 
  perfctr_core perfctr_llc perfctr_nb pfthreshold pge pni popcnt pse pse36 
  rdrand rdseed rdtscp rep_good sep sev sev_es sha_ni skinit smap smca sme 
  smep ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3 succor svm svm_lock syscall tce 
  topoext tsc tsc_scale v_vmsave_vmload vgif vmcb_clean vme vmmcall wdt 
  xgetbv1 xsave xsavec xsaveerptr xsaveopt xsaves 
  Vulnerabilities: Type: itlb_multihit status: Not affected 
  Type: l1tf status: Not affected 
  Type: mds status: Not affected 
  Type: meltdown status: Not affected 
  Type: spec_store_bypass 
  mitigation: Speculative Store Bypass disabled via prctl and seccomp 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, STIBP: 
  disabled, RSB filling 
  Type: srbds status: Not affected 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: NVIDIA TU106 [GeForce RTX 2060 Rev. A] vendor: ASUSTeK 
  driver: nvidia v: 470.57.02 alternate: nouveau,nvidia_drm bus-ID: 29:00.0 
  chip-ID: 10de:1f08 class-ID: 0300 
  Device-2: Valve 3D Camera type: USB driver: uvcvideo bus-ID: 6-3.1:4 
  chip-ID: 28de:2400 class-ID: 0e02 serial: 00000001 
  Display: server: X.Org 1.20.11 compositor: kwin_x11 driver: loaded: nvidia 
  display-ID: :0 screens: 1 
  Screen-1: 0 s-res: 5760x1080 s-dpi: 94 s-size: 1557x292mm (61.3x11.5") 
  s-diag: 1584mm (62.4") 
  Monitor-1: DVI-D-0 res: 1920x1080 hz: 60 dpi: 92 
  size: 531x299mm (20.9x11.8") diag: 609mm (24") 
  Monitor-2: DP-1 res: 1920x1080 hz: 60 dpi: 102 size: 477x268mm (18.8x10.6") 
  diag: 547mm (21.5") 
  Monitor-3: HDMI-1 res: 1920x1080 hz: 60 dpi: 92 size: 531x299mm (20.9x11.8") 
  diag: 609mm (24") 
  OpenGL: renderer: NVIDIA GeForce RTX 2060/PCIe/SSE2 
  v: 4.6.0 NVIDIA 470.57.02 direct render: Yes 
Audio:
  Device-1: NVIDIA TU106 High Definition Audio vendor: ASUSTeK 
  driver: snd_hda_intel v: kernel bus-ID: 29:00.1 chip-ID: 10de:10f9 
  class-ID: 0403 
  Device-2: AMD Family 17h HD Audio vendor: Micro-Star MSI 
  driver: snd_hda_intel v: kernel bus-ID: 2b:00.3 chip-ID: 1022:1457 
  class-ID: 0403 
  Device-3: Texas Instruments PCM2902 Audio Codec type: USB 
  driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-3:3 chip-ID: 08bb:2902 
  class-ID: 0300 
  Device-4: Valve Valve VR Radio type: USB driver: cdc_acm,hid-generic,usbhid 
  bus-ID: 5-3.3.2:5 chip-ID: 28de:2102 class-ID: 0a00 serial: 41944083C3-RYB 
  Device-5: Valve Valve VR Radio & HMD Mic type: USB 
  driver: hid-generic,snd-usb-audio,usbhid bus-ID: 5-3.3.3:6 
  chip-ID: 28de:2102 class-ID: 0102 serial: 0A2E1233C2-LYM 
  Sound Server-1: ALSA v: k5.13.4-1-MANJARO running: yes 
  Sound Server-2: JACK v: 0.125.0 running: no 
  Sound Server-3: PulseAudio v: 14.2 running: no 
  Sound Server-4: PipeWire v: 0.3.32 running: yes 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: Micro-Star MSI driver: r8169 v: kernel port: f000 bus-ID: 25:00.0 
  chip-ID: 10ec:8168 class-ID: 0200 
  IF: enp37s0 state: up speed: 1000 Mbps duplex: full mac: d8:bb:c1:0c:0c:20 
  IP v4: 192.168.0.66/24 type: noprefixroute scope: global 
  broadcast: 192.168.0.255 
  IP v6: fe80::5325:8789:5d0f:b62b/64 type: noprefixroute scope: link 
  WAN IP: 141.0.107.135 
Bluetooth:
  Message: No bluetooth data found. 
Logical:
  Message: No logical block device data found. 
RAID:
  Message: No RAID data found. 
Drives:
  Local Storage: total: 2.86 TiB used: 1.26 TiB (44.1%) 
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung 
  model: SSD 970 EVO Plus 500GB size: 465.76 GiB block-size: physical: 512 B 
  logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: S4EVNF0MB08931X 
  rev: 2B2QEXM7 temp: 48.9 C scheme: GPT 
  SMART: yes health: PASSED on: 279d 21h cycles: 607 
  read-units: 15,757,767 [8.06 TB] written-units: 10,175,298 [5.20 TB] 
  ID-2: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 250GB 
  family: based SSDs size: 232.89 GiB block-size: physical: 512 B 
  logical: 512 B sata: 3.2 speed: 6.0 Gb/s type: SSD serial: S3YGNX0K319395D 
  rev: 3B6Q temp: 36 C scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 1y 172d 15h cycles: 1141 
  written: 17.37 TiB 
  ID-3: /dev/sdb maj-min: 8:16 vendor: Corsair model: Corsair Force 3 SSD 
  family: Driven SSDs size: 111.79 GiB block-size: physical: 512 B 
  logical: 512 B sata: 3.0 speed: 6.0 Gb/s type: SSD 
  serial: 12326503000013411891 rev: 5.07 temp: 128 C scheme: MBR 
  SMART: yes state: enabled health: PASSED on: 5y 149d 8h cycles: 1628 
  read: 23728 GiB written: 47084 GiB 
  ID-4: /dev/sdc maj-min: 8:32 vendor: Western Digital model: WD20EZRX-00DC0B0 
  family: Green size: 1.82 TiB block-size: physical: 4096 B logical: 512 B 
  sata: 3.0 speed: 6.0 Gb/s type: N/A serial: WD-WCC1T0676225 rev: 0A80 
  temp: 35 C scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 2y 263d 18h cycles: 115 
  ID-5: /dev/sdd maj-min: 8:48 vendor: OCZ model: TRION100 
  family: OCZ/Toshiba Trion SSDs size: 223.57 GiB block-size: physical: 512 B 
  logical: 512 B sata: 3.1 speed: 6.0 Gb/s type: SSD serial: 952B541MKMCX 
  rev: 11.2 temp: 31 C scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 3y 77d 13h cycles: 1640 
  ID-6: /dev/sde maj-min: 8:64 type: USB model: N/A size: 28.88 GiB 
  block-size: physical: 512 B logical: 512 B type: N/A 
  serial: 070388FCB664DD83 rev: PMAP scheme: MBR 
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure? 
  Message: No optical or floppy data found. 
Partition:
  ID-1: / raw-size: 232.59 GiB size: 227.88 GiB (97.98%) 
  used: 158.92 GiB (69.7%) fs: ext4 block-size: 4096 B dev: /dev/sda2 
  maj-min: 8:2 label: Manjaro uuid: 6b8c3e50-cb52-4aff-a403-1f7387843bc8 
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) 
  used: 288 KiB (0.1%) fs: vfat block-size: 512 B dev: /dev/sda1 maj-min: 8:1 
  label: NO_LABEL uuid: E1C9-337B 
  ID-3: /mnt/970evoplus raw-size: 465.76 GiB size: 465.76 GiB (100.00%) 
  used: 98.13 GiB (21.1%) fs: ntfs block-size: 4096 B dev: /dev/nvme0n1p1 
  maj-min: 259:1 label: Samsung 970 EVO Plus SSD uuid: 9840AAA340AA8818 
  ID-4: /mnt/force3 raw-size: 111.79 GiB size: 109.47 GiB (97.93%) 
  used: 87.42 GiB (79.9%) fs: ext4 block-size: 4096 B dev: /dev/sdb1 
  maj-min: 8:17 label: Force 3 SSD uuid: 7adda8f0-6767-4e36-8474-21072ad5444a 
  ID-5: /mnt/hddext4 raw-size: 900.39 GiB size: 885.18 GiB (98.31%) 
  used: 38.3 MiB (0.0%) fs: ext4 block-size: 4096 B dev: /dev/sdc3 
  maj-min: 8:35 label: WD Green HDD uuid: 4a539381-4918-44ab-8fc7-bf89b84078a3 
  ID-6: /mnt/hddntfs raw-size: 962.61 GiB size: 962.61 GiB (100.00%) 
  used: 828.81 GiB (86.1%) fs: ntfs block-size: 4096 B dev: /dev/sdc2 
  maj-min: 8:34 label: WD Green WD20EZRX HDD uuid: 0454C59C54C5913A 
  ID-7: /mnt/trion raw-size: 223.45 GiB size: 223.45 GiB (100.00%) 
  used: 116.52 GiB (52.1%) fs: ntfs block-size: 4096 B dev: /dev/sdd3 
  maj-min: 8:51 label: OCZ Trion SSD uuid: 28AC9054AC901E7E 
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) 
  ID-1: swap-1 type: file size: 512 MiB used: 495.9 MiB (96.9%) priority: -2 
  file: /swapfile 
Unmounted:
  ID-1: /dev/sdc1 maj-min: 8:33 size: 16 MiB fs: N/A label: N/A uuid: N/A 
  ID-2: /dev/sdd1 maj-min: 8:49 size: 100 MiB fs: vfat label: N/A 
  uuid: DA81-8741 
  ID-3: /dev/sdd2 maj-min: 8:50 size: 16 MiB fs: N/A label: N/A uuid: N/A 
  ID-4: /dev/sde1 maj-min: 8:65 size: 2.3 GiB fs: iso9660 
  ID-5: /dev/sde2 maj-min: 8:66 size: 4 MiB fs: vfat label: MISO_EFI 
  uuid: 04A9-1FC7 
USB:
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 10 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Device-1: 1-2:2 info: Alcor Micro Multimedia Card Reader type: Mass Storage 
  driver: usb-storage interfaces: 1 rev: 2.0 speed: 480 Mb/s power: 250mA 
  chip-ID: 058f:6361 class-ID: 0806 serial: 058F63616476 
  Device-2: 1-3:3 info: Texas Instruments PCM2902 Audio Codec type: Audio,HID 
  driver: hid-generic,snd-usb-audio,usbhid interfaces: 4 rev: 1.1 
  speed: 12 Mb/s power: 100mA chip-ID: 08bb:2902 class-ID: 0300 
  Device-3: 1-7:4 info: Logitech G910 Orion Spark Mechanical Keyboard 
  type: Keyboard,HID driver: hid-generic,usbhid interfaces: 2 rev: 2.0 
  speed: 12 Mb/s power: 500mA chip-ID: 046d:c32b class-ID: 0300 
  serial: 166734613232 
  Device-4: 1-10:5 info: Corsair Gaming SCIMITAR RGB Mouse type: Mouse,HID 
  driver: usbfs interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 300mA 
  chip-ID: 1b1c:1b1e class-ID: 0300 serial: 1801300FAEBD1844561B5F2DF5001941 
  Hub-2: 2-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.1 speed: 10 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
  Hub-3: 3-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Hub-4: 4-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.1 speed: 10 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
  Hub-5: 5-0:1 info: Full speed (or root) Hub ports: 4 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Hub-6: 5-3:2 info: Valve ports: 3 rev: 2.0 speed: 480 Mb/s power: 2mA 
  chip-ID: 28de:2613 class-ID: 0900 
  Hub-7: 5-3.3:3 info: Microchip (formerly SMSC) Hub ports: 5 rev: 2.1 
  speed: 480 Mb/s chip-ID: 0424:2744 class-ID: 0900 
  Device-1: 5-3.3.1:4 info: Valve Index HMD type: HID 
  driver: hid-generic,usbhid interfaces: 3 rev: 2.0 speed: 12 Mb/s 
  power: 500mA chip-ID: 28de:2300 class-ID: 0300 serial: LHR-13454E65 
  Device-2: 5-3.3.2:5 info: Valve Valve VR Radio 
  type: HID,Abstract (modem),CDC-Data driver: cdc_acm,hid-generic,usbhid 
  interfaces: 3 rev: 2.0 speed: 12 Mb/s chip-ID: 28de:2102 class-ID: 0a00 
  serial: 41944083C3-RYB 
  Device-3: 5-3.3.3:6 info: Valve Valve VR Radio & HMD Mic type: HID,Audio 
  driver: hid-generic,snd-usb-audio,usbhid interfaces: 3 rev: 2.0 
  speed: 12 Mb/s chip-ID: 28de:2102 class-ID: 0102 serial: 0A2E1233C2-LYM 
  Device-4: 5-3.3.4:7 info: Valve Watchman Dongle type: HID 
  driver: hid-generic,usbhid interfaces: 1 rev: 2.0 speed: 12 Mb/s power: 20mA 
  chip-ID: 28de:2101 class-ID: 0300 serial: F10D52CB68 
  Device-5: 5-3.3.5:8 info: Microchip (formerly SMSC) Hub Controller type: Hub 
  driver: N/A interfaces: 1 rev: 2.0 speed: 480 Mb/s chip-ID: 0424:2740 
  class-ID: 0000 
  Hub-8: 6-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.0 speed: 5 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
  Device-1: 6-2:2 info: Kingston SP Mobile C31 (64GB) type: Mass Storage 
  driver: usb-storage interfaces: 1 rev: 3.2 speed: 5 Gb/s power: 504mA 
  chip-ID: 13fe:6300 class-ID: 0806 serial: 070388FCB664DD83 
  Hub-9: 6-3:3 info: Microchip (formerly SMSC) Hub ports: 4 rev: 3.2 
  speed: 5 Gb/s chip-ID: 0424:5744 class-ID: 0900 
  Device-1: 6-3.1:4 info: Valve 3D Camera type: Video driver: uvcvideo 
  interfaces: 2 rev: 3.2 speed: 5 Gb/s power: 800mA chip-ID: 28de:2400 
  class-ID: 0e02 serial: 00000001 
Sensors:
  System Temperatures: cpu: 34.2 C mobo: N/A gpu: nvidia temp: 54 C 
  Fan Speeds (RPM): N/A gpu: nvidia fan: 0% 
Info:
  Processes: 357 Uptime: 3h 9m wakeups: 0 Init: systemd v: 249 tool: systemctl 
  Compilers: gcc: 11.1.0 clang: 12.0.1 Packages: 1474 pacman: 1467 lib: 425 
  snap: 7 Shell: Bash (sudo) v: 5.1.8 running-in: konsole inxi: 3.3.06

I do not have this issue in other games I play, both native and Windows games. Thing is I’ve seen people get this game running 100% smoothly, and I really want to figure out if my machine can do that as well :smile:

This is how I run the game:

  • Origin overlay is disabled
  • I am running with -notexturestreaming arg
  • With Feral Gamemode
  • esync & fsync

Furthermore I’ve tested with:

  • Disabling write permissions for AppData/Roaming/Origin
  • Disabling desktop composition
  • 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
  • STAGING_SHARED_MEMORY=1 and 0
  • DXVK-NVAPI (With WINEDLLOVERRIDES=“dxgi,nvapi,nvapi64,nvml=n”)
  • Edit 29/07/2021: I just tried without DXVK, and it seems to have the exact same issue without it. I do not believe DXVK is causing this stutter.

I feel like I’ve tried every solution in the solar system!

Here are my env. variables for BF4:

    STAGING_SHARED_MEMORY=0
    __GL_SHADER_DISK_CACHE=1
    __GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1
    __GL_THREADED_OPTIMIZATIONS=1

In Lutris DLL overrides, I have nvapi and nvapi64 set to “disabled”.

DXVK versions I tried:

  • v1.9.1
  • v1.9L-8b6ac52
  • v1.9L-async
  • v1.9L
  • v1.8.1L
  • v1.7.1L

Wine versions I tried (64 bit prefix):

  • lutris-6.13
  • Staging-6.13
  • lutris-ge-6.12
  • lutris-6.12
  • Staging-6.12

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.
https://paste.ubuntu.com/p/26sXsszK5P/

So, any tips? Did I miss any things I could try to troubleshoot this further? :smiley:
Thanks in advance everyone!!

Welcome to the forum! :wave:

Since you’re a new user on this forum, I’d recommend you take a look at the link below and update your post accordingly.

That way other users might be able to help out. Thanks. :slightly_smiling_face:

1 Like

Thank you kindly, I really appreciate the guidance! I’ll edit my post right away.

Hey, not sure if you are still facing this issue but I would recommend switching discord from “system default” audio input/output to a manual selection. Discord for linux is a buggy mess.

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 bf4.exe EADesktop.exe BF_Launcher.exe in the “Include processes” field.

Curious if this helps anyone! I’ll mark this as solution since it fixes my issue, probably.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.