LAG 6.0 everywhere :-( - fixed by driver update and improved cooling

Ask here if you experience technical problems with X4: Foundations.

Moderator: Moderators for English X Forum

Post Reply
Vheissu
Posts: 105
Joined: Wed, 15. Apr 20, 17:35
x4

LAG 6.0 everywhere :-( - fixed by driver update and improved cooling

Post by Vheissu » Thu, 18. May 23, 22:03

Just picked X4 up a couple days ago. Having some serious problems with stuttering and fps in a new game. It's nigh unplayable in Heretic's End and Second Contact sectors (asteroids, lots of ships) but stutters occur consistently elsewhere in open space without traffic - I can't figure out a pattern in those occasions.

It's a new game, so just one ship and a trader. I'm all too familiar with the damage a hilariously overgrown PHQ or ridiculously large fleet in Khaak territory can do from my time in X3 :mrgreen:

Young Gun start.

Tested with and without mods (only had 2).

Not a significant difference between high, medium and low settings.

Version 6.0, up to date according to Steam and installed a couple days ago. English language

Any recent changes to system: Not really. Did basic maintenance (updating everything, dusting and cleaning) last month.

DXDiag
https://drive.google.com/file/d/1V_b7Ud ... sp=sharing

Vulkan
https://drive.google.com/file/d/1A7lI-F ... sp=sharing

CBJ
EGOSOFT
EGOSOFT
Posts: 51955
Joined: Tue, 29. Apr 03, 00:56
x4

Re: LAG 6.0 everywhere :-(

Post by CBJ » Thu, 18. May 23, 22:34

Thanks for reposting with the proper information. :)

The first thing I'd look at is your drivers. Your graphics drivers are nearly a year out of date, and your sound drivers are even older.

When you say you tested "without mods", if you mean that you disabled them on your existing save in which they were previously installed, that's not going to remove the mods' effects from the save. You'd need to start a new game without any mods to eliminate them as being the cause.

It would also be good to see what kind of fps issues you're having. If it's slow all the time then that would be very different from an intermittent slowdown, and could have very different causes.

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30429
Joined: Fri, 16. Apr 04, 19:21
x4

Re: LAG 6.0 everywhere :-(

Post by Alan Phipps » Thu, 18. May 23, 22:45

Your laptop also has Intel UHD onboard graphics that you have probably disabled. Counter-intuitively, it may be worth updating the Intel driver for that alongside all the others as experience has shown us that the onboard and dedicated card graphics drivers tend to lean on each other for support and performance.
A dog has a master; a cat has domestic staff.

Vheissu
Posts: 105
Joined: Wed, 15. Apr 20, 17:35
x4

Re: LAG 6.0 everywhere :-(

Post by Vheissu » Fri, 19. May 23, 00:00

Thanks for the replies!

Issue tentatively fixed or at least much improved. I should probably do more testing than just a couple minutes flying and I can't rule out other contributing issues.

Updating graphics drivers provided a large improvement in fps and removed stuttering in stations. Still a severe fps drop in Heretic's End asteroid field on medium settings. I'm still not satisfied with that behaviour considering this laptops specs.

While I update everything once a month, I forgot I had put a freeze on gpu updates some time ago while troubleshooting display driver issues. A Windows update somehow changed BIOS settings and/or interfered with Nvidia Optimus so that instead of "intelligently" switching between onboard and discrete graphics, Optimus just... didn't choose any display driver on start-up :evil: which lead to me pulling my hair out figuring how to troubleshoot a laptop that only booted to a black screen.

Vheissu
Posts: 105
Joined: Wed, 15. Apr 20, 17:35
x4

Re: LAG 6.0 everywhere :-(

Post by Vheissu » Fri, 19. May 23, 01:06

So after some more travelling - General fps is buttery smooth but there are still strange stuttering slowdowns in and around stations. It goes from 60+ fps to almost nothing for a second or two and then back to normal. Happens most often while turning or moving. Occurs every.. 5-20 seconds? pretty often.

I'll move on to the other fixes suggested and see if anything helps.

Scoob
Posts: 10069
Joined: Thu, 27. Feb 03, 22:28
x4

Re: LAG 6.0 everywhere :-(

Post by Scoob » Sat, 20. May 23, 00:35

Vheissu wrote:
Fri, 19. May 23, 01:06
So after some more travelling - General fps is buttery smooth but there are still strange stuttering slowdowns in and around stations. It goes from 60+ fps to almost nothing for a second or two and then back to normal. Happens most often while turning or moving. Occurs every.. 5-20 seconds? pretty often.

I'll move on to the other fixes suggested and see if anything helps.
The only time I've had a situation where the fps has dropped so drastically as you describe, it turned out to be a weird Windows paging file issue. Basically, for whatever reason, Windows was paging out data when the game was using more than about 8 GB. Normally, this would not be too much of an issue as the paged data would not be needed for the current scene. However, in my case, Windows was incorrectly paging out data the game needed NOW, leading to huge fps drops every few seconds. Literally, several seconds of smooth gameplay, several seconds of unplayable judder, repeat.

As I had the tools available to me, I monitored the system while this was happening and could see that currently needed data was being written to the page file, then read back right away - heightened drive access observed, X4 data present in the page file being read back. I had a save that exhibited the issues upon loading, so I had a good test case to examine. As my first test, I tuned OFF my system's Page file entirely. While this is perhaps not advised, for various reasons, it was the quickest way to test. Upon loading my save, everything was perfectly smooth once more. I could see that Windows wanted to page stuff out, but as there was no page file available to it, it effectively "paged" it to RAM.

The solution - well, a work-around really - I eventually settled on was to restore the Page file, but at a minimum level of 256MB so certain features that rely on it still worked AND raise the game's Priority to "High". Raising it to high leads X4 to effectively use more RAM - which obviously has to be available, I have 32GB - avoiding the excessive page file use.

The Windows issue was eventually fixed via regular Windows updates, and I've never seen such extreme Page file thrashing since in any title. However, I still run that minimal page file and the game at "High" priority as it appears to give the most consistent performance. I don't notice any stutter when near stations either, however, there WILL be some stutter when I teleport to a station as there's a few seconds delay, then some stutter and potentially slight overall FPS reduction as the wandering NPC's on a station spawn in. Once they're spawned though, things do tend to settle down. They do have a noticeable performance impact if I'm going by pure fps, but I generally limit to 60 FPS and I don't often go below that.

I set up a small script to automate launching the game with High priority:

Create a .bat file in Notepad called something like "X4 Foundations (High Priority)" or whatever you like.

Add the following:

Code: Select all

D:
cd Games/X4 Foundations
Start /High X4.exe -showfps
Save the .bat file.

Broken down that's:
D: - change to D: Drive where my Games folder is (I have the GoG version)
cd Games/X4 Foundations - change to the game folder (obviously this, and the drive letter above, need to be YOUR game drive and folder location)
Start /High X3.exe -showfps - Start X3.exe with HIGH priority and display the game's fps in the bottom right corner (can be assigned to a keyboard shortcut)

Next, you create a shortcut to that .bat file - call it what you like - but set that Shortcut to run as administrator.

Place the shortcut wherever you like and use that to launch the game. Path will be different for Steam version, and Steam will need to be running unless you use the NoSteam.exe available from Egosoft.

q111
Posts: 780
Joined: Fri, 11. Jul 03, 21:32
x4

Re: LAG 6.0 everywhere :-(

Post by q111 » Sat, 20. May 23, 01:00

@Scoob

Be careful limiting your pagefile; while it seems quite antique to need it, Windows react badly when you disable it; also with SSDs nowadays the pagefile actually has some uses compared to the HDD-days. I personally rather give enough space to the pagefile and don't have any stuttering issues except when i open around 100 tabs in my browser and have x4 on sinza.

Also: I have too 32 GB, and nowadays it's no longer enough, we are slowly going to the 64GB-Era. You can never have enough ram; this never failed me.

Scoob
Posts: 10069
Joined: Thu, 27. Feb 03, 22:28
x4

Re: LAG 6.0 everywhere :-(

Post by Scoob » Sat, 20. May 23, 01:32

q111 wrote:
Sat, 20. May 23, 01:00
@Scoob

Be careful limiting your pagefile; while it seems quite antique to need it, Windows react badly when you disable it; also with SSDs nowadays the pagefile actually has some uses compared to the HDD-days. I personally rather give enough space to the pagefile and don't have any stuttering issues except when i open around 100 tabs in my browser and have x4 on sinza.

Also: I have too 32 GB, and nowadays it's no longer enough, we are slowly going to the 64GB-Era. You can never have enough ram; this never failed me.
Yes, that's why disabling it was only done to test a theory regarding the page file being used incorrectly by Windows (due to a bug). Setting the Pagefile to the lowest allowable level (256MB) I avoid the various weird quirks of running with no pagefile (Like Windows taking an AGE to shut down for no valid reason) and, with the Pagefile being small, Windows was (when the bug existed) far less likely to try to use it for stuff that needs to be in RAM. I did debate getting a second pair of 16GB DDR4 modules, RAM is pretty cheap at the moment, but then so am I lol.

So far, and I've been at this level since last year, I've encountered ZERO weirdness from running the Pagefile at 256MB. Don't get me wrong, I was generally happy to leave the Pagefile to manage its self prior to encountering this weird Windows issue that only impacted X4 for some reason. X4 would so reliably start paging out when it went a little over 8GB used, that I genuinely thought it was a game issue. However, speaking to CBJ (I think it was) they clarified that X4 did not do anything special to control when stuff was paged out, so it was all on Windows.

Note: the issue exhibited its self most clearly in longer-term games with a lot going on. I.e. needing more RAM. I'd NEVER seen a game page needed stuff out so aggressively as was occurring back then. I managed to get second per frame scenarios, which was unheard of. All "fixed" by turning off the page file (to prove a point) before going down the High priority and minimal page file route.

Note 2: there was a perhaps related Windows bug around the same time, perhaps a little earlier, where it was failing to correctly clear out Standby RAM. I.e. say I was playing (heavily modified) Skyrim, then went to play another game, much of Skyrim's data would be retained in Standby RAM. When the RAM ultimately became full due to this standby data being retained, rather than being purged as it should, the more recent title's data started to be paged out, ultimate resulting in Windows reporting "Low Memory" situations. Situations that were solely of its own doing with failing to correctly purge standby memory. I got into the habit of running a game, then manually forcing a purge of Standby RAM before launching the next title, eliminated the issues I was getting.

Of course, the excessive page file usage Windows bug, combined with the failing to purge standby memory Windows bug led to interesting times, until I figured it out.

User avatar
alt3rn1ty
Posts: 2387
Joined: Thu, 26. Jan 06, 19:45
x4

Re: LAG 6.0 everywhere :-(

Post by alt3rn1ty » Sat, 20. May 23, 08:05

@Scoob - Instead of /High, try /ABOVENORMAL instead.
I'm getting the same performance increase with abovenormal as I did with high, and not setting it to high has less impact on halting essential background tasks.
Laptop Dell G15 5510 : Win 11 x64
CPU - 10th Gen' Core I7 10870H 2.2-5.0ghz, GPU - NVidia Geforce RTX 3060, VRAM 6gb GDDR5,
RAM - 32gb (2x16gb, Dual Channel mode set in BIOS) DDR4 2933mhz Kingston Fury Impact,
SSD - Kioxia M.2 NVME 512gb (System), + Samsung M.2 NVME 970 Evo Plus 1tb (Games)

:boron: Long live Queen Polypheides and may her tentacles always be supple.
Seeker of Sohnen.

Vheissu
Posts: 105
Joined: Wed, 15. Apr 20, 17:35
x4

Re: LAG 6.0 everywhere :-(

Post by Vheissu » Sat, 20. May 23, 15:36

The .bat file is a neat idea, especially with the fps counter. Thanks! If nothing else, it'll be a big help while troubleshooting.

User avatar
alt3rn1ty
Posts: 2387
Joined: Thu, 26. Jan 06, 19:45
x4

Re: LAG 6.0 everywhere :-(

Post by alt3rn1ty » Sat, 20. May 23, 17:10

For the .bat file you could also just include the start line, "Start /AboveNormal X4.exe" .. if you create the .bat file inside the foundations\ folder (same place as X4.exe). No need for changing drive / path. Then right click the .bat file and choose Send to desktop (create shortcut) - On Windows 11 you have to go into More options in the right click menu to see the Send to options. Works both ways.
Laptop Dell G15 5510 : Win 11 x64
CPU - 10th Gen' Core I7 10870H 2.2-5.0ghz, GPU - NVidia Geforce RTX 3060, VRAM 6gb GDDR5,
RAM - 32gb (2x16gb, Dual Channel mode set in BIOS) DDR4 2933mhz Kingston Fury Impact,
SSD - Kioxia M.2 NVME 512gb (System), + Samsung M.2 NVME 970 Evo Plus 1tb (Games)

:boron: Long live Queen Polypheides and may her tentacles always be supple.
Seeker of Sohnen.

Vheissu
Posts: 105
Joined: Wed, 15. Apr 20, 17:35
x4

Re: LAG 6.0 everywhere :-( - fixed by driver update

Post by Vheissu » Tue, 23. May 23, 13:07

I see the thread title has been updated.

I'm done troubleshooting the issue, however graphics drivers were only half the issue. There was still very choppy performance after the initial game launch, seemingly at random. Running HWinfo64, I could confirm that the CPU was thermal throttling as it reached max temps.

I already clean the laptop with canned air regularly. The (temporary) fix has been to use a cooling pad - long-term solution will be to clean and re-apply fresh thermal paste and blow any extra detritus out of the laptop while it is disassembled.

Truly impressive performance from X4! This laptop hasn't had similar problems with other notoriously cpu-heavy games (Stellaris, excessively modded Elder Scrolls titles, Cities Skylines, X3...) unless they are pushed to their absolute limits.

Should also note that while troubleshooting this problem, I found a number of recommendations to disable thermal throttling in the top search results in Google. Which is a terrible idea, it's gonna melt the cpu or severely reduce its lifespan. Probably a good idea to discourage throttling in the FAQ. It might save some folks a lot of grief (and potentially save Egosoft from having to deal with some unhappy customers).

CBJ
EGOSOFT
EGOSOFT
Posts: 51955
Joined: Tue, 29. Apr 03, 00:56
x4

Re: LAG 6.0 everywhere :-( - fixed by driver update

Post by CBJ » Tue, 23. May 23, 13:21

Glad to hear you've identified and solved the problems, and thanks for getting back to us with your solutions (and that timely warning!). :)

Scoob
Posts: 10069
Joined: Thu, 27. Feb 03, 22:28
x4

Re: LAG 6.0 everywhere :-(

Post by Scoob » Tue, 23. May 23, 18:46

alt3rn1ty wrote:
Sat, 20. May 23, 08:05
@Scoob - Instead of /High, try /ABOVENORMAL instead.
I'm getting the same performance increase with abovenormal as I did with high, and not setting it to high has less impact on halting essential background tasks.
I will try it, though I'd not noticed any side effects from /HIGH. It was initially suggested using HIGH due to how it (apparently) was better at keeping stuff in RAM than AboveNormal. Game is generally running really well currently. I think the big test will be when the v6.0 version of the Star Wars mod is available, that has be ability to really push things. My current modded game runs great though, with only larger battles seeing FPS drop below 60.

@OP Glad you sorted things. I've noticed that X4's CPU workload is an odd one. For example, on my 3900X rig, I run it in ECO mode (65w limit vs. 105w) and, even on stock cooling, I don't see temps much over 60 during stress tests such as P95 or Cinebench R23. However, these tests are all core loads so, to stay within that 65w the individual cores, while all loaded at 100%, are clocked quite a bit slower. When that full 65w "allowance" is used by just a few cores, I see much higher temps (70's) for what initially appears to be a lighter overall load, due to how that load is spread. Anyway, just a random observation.

Vheissu
Posts: 105
Joined: Wed, 15. Apr 20, 17:35
x4

Re: LAG 6.0 everywhere :-( - fixed by driver update and improved cooling

Post by Vheissu » Wed, 24. May 23, 11:22

Hah, yeah more cores is nice but I've yet to see a game that scales efficiently on them. It's a pretty difficult task to pull off apparently.

Incinerator
Posts: 133
Joined: Thu, 27. Jul 06, 13:56
x4

Re: LAG 6.0 everywhere :-( - fixed by driver update and improved cooling

Post by Incinerator » Sun, 28. May 23, 10:36

If its thermal throttling even after a clean and repaste you can try throttlestop (unless you have those options in the bios) and undervolt a little and lower the cpu boost by 100mhz or so and see if its enough to stop it from throttling..

Post Reply

Return to “X4: Foundations - Technical Support”