X4 Performance Troubleshooting Suggestions

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

Moderator: Moderators for English X Forum

Daemonjax
Posts: 95
Joined: Tue, 27. May 14, 01:54
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Daemonjax » Thu, 3. Aug 23, 23:54

What motion blur? I never noticed. This game could use some motion blur (imo).

Daemonjax
Posts: 95
Joined: Tue, 27. May 14, 01:54
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Daemonjax » Fri, 4. Aug 23, 00:25

Liath wrote:
Fri, 18. Mar 22, 18:50
I had been having issues with stuttering in the game, in ways that screamed "loading texture data".
If you have 32gb+ ram, you can put all the base game dat and cat files on a ramdisk.

Another thing you can do is pin your GPU IRQ to something other than core 0, and try to pin your sata controller to not use that core. And/Or try raising the IRQ priority for your video card to high while setting the IRQ priority for your sata controller (or whatever controller is for your disk) to normal. And maybe the sound card to High, too. And MSI mode for... everything that supports it. I don't want to get too specific about it, otherwise we'll go down the dpc latency reduction rabbit hole.

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

Re: X4 Performance Troubleshooting Suggestions

Post by alt3rn1ty » Sat, 5. Aug 23, 09:24

Daemonjax wrote:
Thu, 3. Aug 23, 23:54
What motion blur? I never noticed. This game could use some motion blur (imo).
Its tied in with the Distortion setting. You only ever see motion blur towards the edges of your screen, most noticeable if you are on a highway, watch those mid highway structures (the ones that are like advertisement rigs) when they go by the edge of your screen and you will see it.

You will also notice it if you go near an anomaly shimmering away, it makes the anomaly catch your eye a bit more as it goes by the edge of your screen.
Also (when Ventures is working), if you visit your Venture dock and send a ship on its way into a venture using the console, there is a shimmering distortion around your Venture ship as the rings start to spin, turn your head so that this distortion is at the edge of your screen and you will notice the effect the blur has on the shimmering.
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.

Daemonjax
Posts: 95
Joined: Tue, 27. May 14, 01:54
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Daemonjax » Thu, 24. Aug 23, 07:20

I recently finished building a newish win10 10700k system with some parts I had laying around. I wasn't impressed, because in this game I was experiencing some weird stuttering (although performance WAS better than with my old i5-3570k, just not massively so) -- the kind that reminded me of the problem dx9 had that was solved by using a framelimitter with vsync on... the kind that doesn't really show up in RTSS's framegraph (unless you change it to start measuring from frame presentation instead of the default frame start). I was also kinda bummed that I can't hit the same stable overclock on my gpu that I could on win7 with the old i5 (using the same 1070ti gpu)... lost 10 min fps on furmark that I can't get back. But whatever. Could be the newer drivers (win7 is stuck on 474.11).


The stuttering persisted even after I pinned the gpu driver to my 8th core while setting the game's core affinity to the first 7... I thought that was weird and decided to plug away at the problem.

The quickest way for me to test whether any changes I made had any effect was to load a save I made near the beginning of the Stranded game start (immediately after you get into the space suit) -- in that cylindrical room, where the eventual exit is at the bottom. When I went into center of that cylindrical room and looked around, I would quickly experience that stutter... would only take 30 seconds or so for me to know whether it was still doing the strange stutter. While that was an easy spot to test, it was certainly not the only spot in the game that would cause it... if that were the case, I wouldn't have cared much.


I tried something strange (I was out of ideas) that actually worked to improve smoothness MASSIVELY for me (keep in mind I play at 60 fps with vsync on @1980x1200 res):
I set the (nvidia) option in control panel:
Vulkan/OpenGL present method... to: prefer layered on DXGI swap chain



And the game is actually buttery smooth now (played for about 2.5 hours without a single stutter). BUTTERY smooth.

Which is weird, but I'll take it. It's not supposed to be a performance boost option (it destroyed my furmark min and average fps, but furmark is opengl, so who knows), but it seems to fix something in this game... on this PC at least. I haven't done any investigating to see whether it changed gpu or cpu usage (using me old 1070ti because my 2080ti died recently). I do have HAG on, but turning that on by itself didn't really do a whole lot. Seemed smoother with it on, and furmark gained 1 min fps, so I kept it on. I didn't try this change with HAG turned off yet.

Looking back on it, I think I experienced the same stutter on the i5 in win7, but chalked it up to x4 being x4 and I only had 4 cores. But really I can't remember... it was a few weeks ago and I don't feel like swapping this card back into the old pc to test. But if I was experiencing it on win7, there's nothing I could have done to fix it.

Curious for someone else with an nvidia card on win10/11 to try setting Vulkan/OpenGL present method to use the DXGI swap chain.
Last edited by Daemonjax on Thu, 24. Aug 23, 17:41, edited 4 times in total.

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

Re: X4 Performance Troubleshooting Suggestions

Post by alt3rn1ty » Thu, 24. Aug 23, 09:48

@ Daemonjax - I found a Developers blog on the subject https://devblogs.microsoft.com/directx/dxgi-flip-model/
Will test later, it may be beneficial on laptops with an optimus setup having both an IGPU and DGPU.

@ Imperial Good - There's mention of FSE versus this in that Blog, I wonder if this is what the Egosoft Dev was relating to when discussing most people these days use window borderless, and you thought (as did I) that FSE is supposed to be better for performance.
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.

Daemonjax
Posts: 95
Joined: Tue, 27. May 14, 01:54
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Daemonjax » Thu, 24. Aug 23, 16:41

I think it works because:

1) This game doesn't offer a fullscreen exclusive mode (fullscreen and borderless windows options are both just borderless windows)
2) On win10 and win11, if the os detects a dx12 app running borderless windowed, it engages “Independent Flip” present mode.
3) this nvidia option (prefer layered on DXGI swap chain for vulkan/opengl) triggers #2 for this game*, completely bypassing whatever vulkan is trying to do to get the frame on the screen

Switching to use the DX12 DXGI swapchain allows the game to bypass DWM, like how a fullscreen exclusive mode would.

* Which may explain the massive decrease in performance I saw on Furmark with this option on because I always run it in a 640x480 window, not a fullscreen window -- the option does its thing, but DWM isn't bypassed.


If I'm right, then everyone on win10+ would be experiencing these stutters unless they set the option to prefer DXGI (auto is the default, which seems to always prefer native present mode -- at least for my pc... at least on driver version 536.99).




Here's a different dev blog on the subject (swap chains and present latency): https://jackmin.home.blog/2018/12/14/sw ... t-latency/

Not sure what all the required conditions are to ensure the change in present mode and bypass DWM... does it require an nvidia gtx or newer card? Dunno. Does AMD offer a similar option in their gpu control panel? Dunno. Would using a vulkan to dx12 wrapper do the same thing (assuming one exists)? Dunno. Does this OS feature work for dx10 or dx11 on win10+? Dunno.

Pretty sure the game's window resolution has to match Windows' desktop resolution (so a borderless window) -- so that it only has to consider drawing the game's frames and nothing else. How do overlays affect that (steam overlay, windows notifications, Launchy search bar, hitting the windows button, etc.)? Dunno. I do get a bs steam overlay popup notification when the game is launched, but that's during the intro video so it doesn't actually mean anything. Does this game have to be set to "fullscreen" (which is just a borderless window that doesn't allow any other windows to overlay ontop of it)? Dunno. I haven't tried the not-fullscreen-borderless-option on with this nvidia option yet because I prefer the "fullscreen" behavior that allows access to the windows taskbar when alt-tabbing.

I'm surprised I couldn't find a blurbuster article on this nvidia option, because this is right up their alley.

And...
@ alt3rn1ty @ Imperial Good - There's mention of FSE versus this in that Blog, I wonder if this is what the Egosoft Dev was relating to when discussing most people these days use window borderless, and you thought (as did I) that FSE is supposed to be better for performance.

What exactly are you talking about? Full Screen Exclusive most certainly is more performant than borderless because it bypasses DWM. That's what fullscreen exclusive MEANS. Sure, DX12 on win10+ can maybe get equal performance to fullscreen exclusive by doing exactly what fse does (bypassing dwm) but so what? It's just a different fse implementation at that point.

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

Re: X4 Performance Troubleshooting Suggestions

Post by alt3rn1ty » Fri, 25. Aug 23, 09:13

Daemonjax wrote:
Thu, 24. Aug 23, 16:41
Pretty sure the game's window resolution has to match Windows' desktop resolution (so a borderless window) -- so that it only has to consider drawing the game's frames and nothing else. How do overlays affect that (steam overlay, windows notifications, Launchy search bar, hitting the windows button, etc.)? Dunno. I do get a bs steam overlay popup notification when the game is launched, but that's during the intro video so it doesn't actually mean anything. Does this game have to be set to "fullscreen" (which is just a borderless window that doesn't allow any other windows to overlay ontop of it)? Dunno. I haven't tried the not-fullscreen-borderless-option on with this nvidia option yet because I prefer the "fullscreen" behavior that allows access to the windows taskbar when alt-tabbing.
Yep when I get testing this it will be in Borderless window mode, I have the game from GOG and do not use GOG Galaxy (except for updating game files), but even if I did Galaxy's Overlay is disabled, Win 11 notifications are off, I dont have NVidia Geforce experience installed etc etc (every man and his dog wants to provide friggin overlays these days).
And...
@ alt3rn1ty @ Imperial Good - There's mention of FSE versus this in that Blog, I wonder if this is what the Egosoft Dev was relating to when discussing most people these days use window borderless, and you thought (as did I) that FSE is supposed to be better for performance.

What exactly are you talking about? Full Screen Exclusive most certainly is more performant than borderless because it bypasses DWM. That's what fullscreen exclusive MEANS. Sure, DX12 on win10+ can maybe get equal performance to fullscreen exclusive by doing exactly what fse does (bypassing dwm) but so what? It's just a different fse implementation at that point.
This was something mentioned by an Egosoft Dev in another topic, IG will remember thats why I addressed it to him.
I was talking in the past tense because its quite a while ago now since the exchange of posts. I could have worded that better so that it didn't sound like I had changed my mind :)
The way the dev worded the post made us think ES Devs maybe now consider Window Borderless to be better, or at least the accepted norm from their POV .. There was no response from ES to IGs question on that. I guess they are stuck with developing for a bias towards everyones default windows/game setup.
Personally I do still believe FSE to be better, but Microsoft recent changes to Windows wants to steer everyone towards a default of not using FSE and uses their Fullscreen Optimisations so that it makes their Game Bar work better (and a few other considerations, see this blog).

Edit: I had a quick test of this last night, but nothing imperically conclusive .. However I did notice while in a quiet sector (Black hole sun), in my fighter and away from any stations, that FPS on my laptop was up to 110. Normally I get around 80-90. Landed on a station I had 60-70 FPS which is usually between 50-60, and while landed on the station with the map open 38-42 which is normally around 32-38.
I teleported to my PHQ which is setup as a self sufficient Wharf so currently the biggest thing in my game which could affect performance, and got around the same result with a few FPS less.
Really though I need to do a before and after, havent the time right now. But it does seem encouraging.

Edit 2: I dont really get any stuttering in game (unless there's a major battle in sector nearby, or I am in a Vig sector with loads of fighters everywhere .. I tend to steer clear of going there, TOA sectors are waaay too much of a problem), so cant corroborate on that score.
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.

Daemonjax
Posts: 95
Joined: Tue, 27. May 14, 01:54
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Daemonjax » Fri, 25. Aug 23, 18:18

What about near the start for the Stranded game start? in the cylindrical room where you first put on the spacesuit? You don't get any weird stutter in there when you look around? May take ~30 seconds or so to show up. And if you pause and unpause the game, the stuttering will stop for a handful of seconds.

You're on win11, so that's different from me. Also you have the gog version... why does that matter? Steam running in the background constantly sets (or at least tries to) the clock tick interval on your pc to 0.987, which is weird and maybe maybe maybe can cause problems in this game. I say it "tries to" because you can't really affect the global tick interval the way you could a few years ago, but it DOES have some effect that can be measured using a toy program that measures how long a sleep(1) call actually sleeps for -- it's really weird when you deep drive into that.

The stutter would be clearly experienced, but won't show up on RTSS's framegraph when using the default measurement type (frame start) -- it only really displays in the framegraph when changed to start measuring at "frame presentation", where it matches exactly what's experienced. Which is weird, right? Like I said, reminds me of that bug in dx9 that did something similar -- but that was easilly solved by using a framelimiter.

I could record it and make a video about all this, probably. But then I'd have to install geforce experience for shadowplay. But the game is still buttery smooth for me when using the DXGI nvidia option, so I'm not sure if I'm invested enough to investigate further... I am still curious as to whether this problem affected anyone else... maybe win11 is different? I'm also playing with vsync on @60 fps because I hate tearing and it's not like this is a competetive online fps where I need to minimize input lag to the extreme -- I don't even play those.

I did do some vulkan benchmarks using GravityMark -- but they were done in FSE mode, so it doesn't really apply to this game. DXGI mode enabled had equal or better performance, but I don't know if it does anything AT ALL when in FSE mode. It does have a windowed mode test, but it's not borderless, so it doesn't really help here. I need to find a vulkan game that has a builtin benchmark... The only game I know of that fits that bill is Red Dead Redemption 2, but I don't have it and I'm not sure I want to play it.

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

Re: X4 Performance Troubleshooting Suggestions

Post by alt3rn1ty » Fri, 25. Aug 23, 19:21

Daemonjax wrote:
Fri, 25. Aug 23, 18:18
What about near the start for the Stranded game start? in the cylindrical room where you first put on the spacesuit? You don't get any weird stutter in there when you look around? May take ~30 seconds or so to show up. And if you pause and unpause the game, the stuttering will stop for a handful of seconds.
Just tried, New game, Stranded, ignored Axiom and went straight to the cylindrical room, got in the spacesuit (cycled the airlock) and went through into the middle of the prison vent shaft :

With Vulkan/opengl present method set to Auto = No stutter at all, fps (depending on which way I turn my space suit) 79-89
With Vulkan/opengl present method set to Prefer layered on DXGI Swapchain = No stutter at all, fps (depending on which way I turn my space suit) 80-91

Not a big enough difference to be conclusive in that scenario, and while swinging my attitude in space around I cant be certain I did exactly the same manoeuvres in both cases, but it was close.
My desktop and game screen res are both 1366 x 768
Other settings for both instances of the small test above - https://i.imgur.com/KThjvzs.png
Its an Optimus setup laptop, uses NVidia 3060 DGPU for the game, but still outputs to the screen through the I7's IGPU (See signature).
So I keep things mostly low to prevent heat build up in the confined laptop internal space.

So maybe I am keeping something low enough to surpress any potential stuttering there?, idk.

Edit : Forgot to mention I did stay in the vent shaft for 2 minutes each time.
Edit 2 : I use the in-game FPS counter (set in the key mapping configuration, its off by default), no third party software used for this.

Edit 3 : I just tried again with Vulkan/opengl present method set to Auto, just to see if I can make the stuttering you experience start at all. I was going in and out of the airlocks and back into the vent shaft middle for about ten minutes, then went and got the weapon and continued on to traverse the tunnels .. No stutter during all that time. Sorry but cant confirm.
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.

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4764
Joined: Fri, 21. Dec 18, 18:23
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Imperial Good » Sat, 26. Aug 23, 09:21

My theory for the stutter people are talking about is that some background application is trying to display something to the screen, such as an overlay or notification popup or even just the ability to show one. Since such applications now are all designed for borderless windowed applications running with fullscreen optimisation they might not like it when an application uses exclusive fullscreen, preventing their access to the screen. The resulting confusion either interferes with X4's present, or bogs down the driver for an extended period preventing normal timely present.
Daemonjax wrote:
Thu, 24. Aug 23, 16:41
1) This game doesn't offer a fullscreen exclusive mode (fullscreen and borderless windows options are both just borderless windows)
X4 does offer a fullscreen exclusive mode (fullscreen) as far as I can tell. However the way the driver handles it likely causes it to use fullscreen optimisation on Windows 10/11 so ideally perform similar to borderless windows.

Just because modern Windows does not support exclusive fullscreen does not mean other platforms might not. As such the option might still make sense for Vulkan applications.
Daemonjax wrote:
Thu, 24. Aug 23, 16:41
2) On win10 and win11, if the os detects a dx12 app running borderless windowed, it engages “Independent Flip” present mode.
On Windows 10 and 11 fullscreen optimisation has completely replaced fullscreen exclusive present mode. As such all applications are displayed using borderless windowed mode. APIs that used to allow exclusive fullscreen mode now use fullscreen optimisation to be presented when set into such a mode.

For older applications this might still result in better performance than their own borderless windows implementation, depending how well that was implemented. If older applications have issues with fullscreen optimisation it can also be turned off in compatibility settings.

DirectX12 applications only support borderless windowed for fullscreen display. The API does not support a fullscreen exclusive present mode. Any game that shows such an option is out right lying.
Daemonjax wrote:
Thu, 24. Aug 23, 16:41
3) this nvidia option (prefer layered on DXGI swap chain for vulkan/opengl) triggers #2 for this game*, completely bypassing whatever vulkan is trying to do to get the frame on the screen
This Nvidia setting seems quite new. Reading what Nvidia describes the different settings as doing it should be left on auto unless something is not working. Otherwise the recommended default setting would be layered on DXGI swapchain as that provides maximum compatibility between Windows and Vulkan features. Native should only be used if an application has compatibility problems with layered on DXGI swapchain due to unusual or incorrect use of APIs. Native is listed as using less memory and performance, but I am not sure if that even matters on modern gaming focused hardware.

It is possible that auto for X4 means to use native. If this is the case then changing it to layered on DXGI swapchain might be recommended.

Daemonjax
Posts: 95
Joined: Tue, 27. May 14, 01:54
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Daemonjax » Sat, 26. Aug 23, 15:53

@alt3rn1ty Thanks for testing. Oh well, dunno why I was getting that stutter and you're not.
Imperial Good wrote:
Sat, 26. Aug 23, 09:21
X4 does offer a fullscreen exclusive mode (fullscreen) as far as I can tell. However the way the driver handles it likely causes it to use fullscreen optimisation on Windows 10/11 so ideally perform similar to borderless windows.
I don't think so (Update: see bottom of this post). On my Windows 7 machine, there was also no difference between borderless and fullscreen in this game -- both were just borderless windowed. The only difference was fullscreen would minimize to the taskbar on alt-tab (which is preferable, imo, because it lets you access the taskbar). But I could tell both were simply borderless because alt-tab was instantaneous (on all fse games there would be like a half second delay between alt-tabbing).

Another way I could tell on win7 that this game's "fullscreen" graphics options was not actually fse was to switch to a non-aero theme (a "basic" theme) -- that completely disables vsync on borderless windowed apps no matter what ingame settings are or what is forced in the drivers because it prevents DWM from doing the vsync -- but vsync would still work on fullscreen exclusive apps because it bypasses DWM (i.e. this game needed an aero theme for vsync to work).
Imperial Good wrote:
Sat, 26. Aug 23, 09:21
On Windows 10 and 11 fullscreen optimisation has completely replaced fullscreen exclusive present mode.
I don't think that's true for non-dx12 games. But I could be wrong. Testing now... Yes, it looks like you're right (EDIT: See Update1)... On win7, I could get 7 Days to Die (a dx11 title) to switch to fse mode by hitting alt-enter a couple times... it would cycle between 3 mode -- borderless windowed, windowed, and fullscreen exclusive. On win10 (wether fullscreen optimization is disabled or not for the .exe), it only cycles between 2 settings -- borderless, and windowed. It can also run using in opengl or vulkan -- I tried them, and same behavior for those. GravityMark (A 3d benchmark app for opengl, vulkan, dx11, and dx12) also seems to use borderless when the fullscreen mode is used.

Update1: Oh, hey, disabling fullscreen optimizations in .exe properties starting working in 7 days to die (I get the expected split second delay with alt-tabbing). I wonder if just doing that removes the stutters for me in X4?
Update2: Probably not because I don't get that expected delay in X4 when alt-tabbing... seems to be just borderless no matter what (just like when on win7). But I'll test the start of Stranded anyways...
Update3: No, I still get the stutter when vulkan/opengl present mode is set to either Auto or prefer Native.
Update4: Trying the alt-enter trick in this game... sets my display resolution to 1920x1080 -- which is wrong, it should be 1920x1200... maybe that's the cause of all my problems?
Update5: Nope... That seems to be a completely separate issue (and the maybe the source of my "confusion" as to how this game handles fullscreen mode)...

No matter what combination of things I try, I still need to force enable DXGI present mode for this game to prevent the weird stuttering...

BUT, I can get the game to act like it's using fse mode (at least as much as other games do on win10 -- I get that split second delay when alt-tabbing) but ONLY IF I set my desktop resolution 1920x1080 -- my native res is 1920x1200. The game seems to think 1920x1200 is a non-native resolution, and so runs in borderless mode, except with the added behavior where it minimizes to the taskbar. It did the same thing on win7 -- but I never tried setting my desktop resolution to 1920x1080 on win7. However, none of that seems to have any impact on performance one way or the other for me. It just seems like a weird quirk in this game engine which caused me some confusion (I'll need to update the thread I made on that issue)... 1920x1200 res isn't common (16:10 aspect ratio)... but it's not super rare, either.

Ok, I'm done with this :D Hope something here helps someone else.
Last edited by Daemonjax on Tue, 29. Aug 23, 16:36, edited 3 times in total.

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4764
Joined: Fri, 21. Dec 18, 18:23
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Imperial Good » Sat, 26. Aug 23, 22:49

Daemonjax wrote:
Sat, 26. Aug 23, 15:53
I don't think so (Update: see bottom of this post). On my Windows 7 machine, there was also no difference between borderless and fullscreen in this game -- both were just borderless windowed. The only difference was fullscreen would minimize to the taskbar on alt-tab (which is preferable, imo, because it lets you access the taskbar). But I could tell both were simply borderless because alt-tab was instantaneous (on all fse games there would be like a half second delay between alt-tabbing).

Another way I could tell on win7 that this game's "fullscreen" graphics options was not actually fse was to switch to a non-aero theme (a "basic" theme) -- that completely disables vsync on borderless windowed apps no matter what ingame settings are or what is forced in the drivers because it prevents DWM from doing the vsync -- but vsync would still work on fullscreen exclusive apps because it bypasses DWM (i.e. this game needed an aero theme for vsync to work).
It is my understanding that Windows 7 does not have fullscreen optimisation which is why some of those issues exist and a difference is visible at all. It should not happen on Windows 10 and 11 since the only really supported present mode is borderless windows via fullscreen optimisation. The compatibility setting should only be used in extreme circumstances when an application does something that just does not work with fullscreen optimisation, and chances are it will perform worse as a result due to having to take a work around path.
Daemonjax wrote:
Sat, 26. Aug 23, 15:53
I don't think that's true for non-dx12 games. But I could be wrong. Testing now... Yes, it looks like you're right (EDIT: See Update1)... On win7, I could get 7 Days to Die (a dx11 title) to switch to fse mode by hitting alt-enter a couple times... it would cycle between 3 mode -- borderless windowed, windowed, and fullscreen exclusive. On win10 (wether fullscreen optimization is disabled or not for the .exe), it only cycles between 2 settings -- borderless, and windowed. It can also run using in opengl or vulkan -- I tried them, and same behavior for those. GravityMark (A 3d benchmark app for opengl, vulkan, dx11, and dx12) also seems to use borderless when the fullscreen mode is used.
Exclusive fullscreen should act as borderless windowed on Windows 10 and 11 due to fullscreen optimisation. This is the technology working correctly, it converts exclusive fullscreen into borderless windowed which should still perform as good as exclusive fullscreen but without the interoperability drawbacks.
Daemonjax wrote:
Sat, 26. Aug 23, 15:53
I wonder if just doing that removes the stutters for me in X4?
On Windows 10 and 11 you probably want to run X4 in borderless fullscreen.

On Windows 7 you want to run X4 on exclusive fullscreen. This should work as expected but might not due to Windows 7 being unsupported by graphic drivers and the like which optimised their drivers for fullscreen optimisation on Windows 10 and 11. If this is the case I strongly recommend upgrading to Windows 10 if possible.
Daemonjax wrote:
Sat, 26. Aug 23, 15:53
Update3: No, I still get the stutter when vulkan/opengl present mode is set to either Auto or prefer Native.
As mentioned, the ideal setting would be layered on DXGI swapchain on Windows 10 and 11. Windows 7 might just have issues due to its age and lack of support which is why I would recommend upgrading to Windows 10. Borderless windowed should perform well on Windows 10/11 regardless.
Daemonjax wrote:
Sat, 26. Aug 23, 15:53
Update4: Trying the alt-enter trick in this game... sets my display resolution to 1920x1080 -- which is wrong, it should be 1920x1200... maybe that's the cause of all my problems?
Quite possibly. Traditionally exclusive fullscreen mode required both a resolution and colour output change when alt-tabbing, which added to the multi-second latency people experienced. If the in game and desktop resolutions are different this effect could be further exagurated because the display itself would need to re-adjust for the new input. Since modern games do not usually set the resolution due to fullscreen optimisation, it is possible that resolution set methods are missing or being skipped which is causing issues between the desktop and in game fullscreen resolutions. Try setting them to be the same.

lolol
Posts: 44
Joined: Thu, 17. Apr 08, 19:17
x3ap

Re: X4 Performance Troubleshooting Suggestions

Post by lolol » Thu, 7. Sep 23, 16:25

I am experiencing massive performance problems on some systems/stations. Especially on stations like Hatikvvahs Choice (Trading Station) FPS gow below 15. CPU = 5800X3d, GPU 4080, 3200MhZ DDR4 Memory (XMP).

I am running some mods from this collection, but not all of them (new added secotrs mostly disabled)
Reshade is not enabled.

https://steamcommunity.com/sharedfiles/ ... 3024829392

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4764
Joined: Fri, 21. Dec 18, 18:23
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Imperial Good » Sat, 9. Sep 23, 23:54

lolol wrote:
Thu, 7. Sep 23, 16:25
I am running some mods from this collection, but not all of them (new added secotrs mostly disabled)
Reshade is not enabled.
Try a playthrough without mods. If the performance is a lot better, one or more of the mods you are using must be very resource intensive. Especially given that the mod pack literally opens with "Requires all DLC and a beefy PC."

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

Re: X4 Performance Troubleshooting Suggestions

Post by Scoob » Sun, 10. Sep 23, 13:47

lolol wrote:
Thu, 7. Sep 23, 16:25
I am experiencing massive performance problems on some systems/stations. Especially on stations like Hatikvvahs Choice (Trading Station) FPS gow below 15. CPU = 5800X3d, GPU 4080, 3200MhZ DDR4 Memory (XMP).

I am running some mods from this collection, but not all of them (new added secotrs mostly disabled)
Reshade is not enabled.

https://steamcommunity.com/sharedfiles/ ... 3024829392
Better Piracy hasn't worked properly in a while, and Reaction Force no longer works as of v6.20. I'm still testing Reaction Force, but it either instantly cancels any attack order, or it'll falsely say it cannot attack a given target, or it'll wander off to other sectors when asked to Patrol. It's pretty broken. I removed Better Piracy from my mod list, as it's not been updated in ages, and has multiple incompatibilities. IIRC it can just be removed from a game in progress without issue.

With the other mods, there's no way you should have performance issues with a 5800X3d. I don't use KUDA AI (I don't know if you installed it), but I understand that aspects of it are incorporated into the base game now. However, when I did previously use KUDA AI I had issues... issues I'm seeing again in Vanilla v6.2. This collection appears to have been created for an older game version, as there are several mods that simply don't work properly any more. This might lead to weird performance issues.

Dipluz
Posts: 4
Joined: Thu, 21. Nov 13, 12:57

Re: X4 Performance Troubleshooting Suggestions

Post by Dipluz » Wed, 4. Oct 23, 13:16

I must first say thank you for creating this amazing game.

I started my now 300hour game (windows 11) on my old Intel 9900k, 2080rtx, 32gb ddr4, which did a good job for quite some time (with mods), though in the end it started to struggle at 64-99% cpu.
I bought a new computer two weeks ago, Windows 11, AMD Ryzen 9 7950x3d, 4090rtx, 64gb ddr5, SSD m2, and the same savegame ran significantly faster, but as I added Faction Enhancer it started to run more and more slowly, though CPU load never went above 14%, which I found odd in comparison, why dosent the game just utilize more of the CPU when it has all that free resources at its disposal? Ive been reading a little bit about optimizing my game. though lets be clear my lag/stutter is in map mode not when I am flying around/and or fighting, so I set map filter only to other and only to display my own ships orders not everyone who is allied with me, etc. GPU also runs nicely. Got any tips?

edit: I have ofcourse enabled, high performance power mode in Windows.
Last edited by Dipluz on Wed, 4. Oct 23, 13:31, edited 1 time in total.

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

Re: X4 Performance Troubleshooting Suggestions

Post by CBJ » Wed, 4. Oct 23, 13:24

Looking at the total figure across all your CPU cores isn't really a useful metric. Like most games (and indeed most real-world applications), it is not possible to just magically use more CPU cores to perform tightly integrated tasks. The game uses one CPU core as much as it possibly can for core tasks, and where possible distributes other tasks to other cores. As a game that doesn't introduce artificial limits on the size of your in-game empire, or how much can be going on in any given location, there will always be times when those core tasks reach the limits of what the CPU core they are running on can achieve. You've already discovered that the map contributes quite a bit to this, and that filtering the map can help with this. What we cannot offer is much in the way of advice for "optimising" your game with third party mods, because they were not written by us.

-=SiR KiLLaLoT=-
Posts: 2578
Joined: Sat, 3. Mar 12, 19:58
x4

Re: X4 Performance Troubleshooting Suggestions

Post by -=SiR KiLLaLoT=- » Wed, 4. Oct 23, 14:27

Dipluz wrote:
Wed, 4. Oct 23, 13:16
I must first say thank you for creating this amazing game.

I started my now 300hour game (windows 11) on my old Intel 9900k, 2080rtx, 32gb ddr4, which did a good job for quite some time (with mods), though in the end it started to struggle at 64-99% cpu.
I bought a new computer two weeks ago, Windows 11, AMD Ryzen 9 7950x3d, 4090rtx, 64gb ddr5, SSD m2, and the same savegame ran significantly faster, but as I added Faction Enhancer it started to run more and more slowly, though CPU load never went above 14%, which I found odd in comparison, why dosent the game just utilize more of the CPU when it has all that free resources at its disposal? Ive been reading a little bit about optimizing my game. though lets be clear my lag/stutter is in map mode not when I am flying around/and or fighting, so I set map filter only to other and only to display my own ships orders not everyone who is allied with me, etc. GPU also runs nicely. Got any tips?

edit: I have ofcourse enabled, high performance power mode in Windows.
Disabling satellites that are no longer used can significantly increase speed in map mode.
My pc is very similar to your old pc and in a 700+ hour game turning off all positioned satellites got me like 20fps on map view.
Use the property list and then filter by deployable devices and give it a try.
HW Spec:
CPU: Core i9 9900k @ 5.0Ghz - MOBO: MSI Z390-A PRO - RAM: 2x8GB Crucial Ballistix MAX DDR4 4400Mhz CL19 - GPU: nVidia RTX 3070 FE - M.2: Samsung 980 512GB - SSD: Samsung 840 Pro 256GB - Samsung 850 EVO 250GB - Sandisk Plus 240GB – HDD: WD Caviar Black 1TB – WD Caviar Blue 1TB – WD Caviar Black 2TB - PSU: Enermax Liberty 82+ PRO 620w - CASE: iTek Iron Soldier - MONITOR: 27” Acer ED270UP - Windows 10 Pro 64-Bit - KEYBOARD: Logitech G11 – MOUSE: Red Dragon Perdition
My X4 Steam screenshots.

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4764
Joined: Fri, 21. Dec 18, 18:23
x4

Re: X4 Performance Troubleshooting Suggestions

Post by Imperial Good » Wed, 4. Oct 23, 17:10

Dipluz wrote:
Wed, 4. Oct 23, 13:16
I bought a new computer two weeks ago, Windows 11, AMD Ryzen 9 7950x3d, 4090rtx, 64gb ddr5, SSD m2, and the same savegame ran significantly faster, but as I added Faction Enhancer it started to run more and more slowly, though CPU load never went above 14%, which I found odd in comparison, why dosent the game just utilize more of the CPU when it has all that free resources at its disposal? Ive been reading a little bit about optimizing my game. though lets be clear my lag/stutter is in map mode not when I am flying around/and or fighting, so I set map filter only to other and only to display my own ships orders not everyone who is allied with me, etc. GPU also runs nicely. Got any tips?
Try making it so X4 is only using the high cache cores. The regular Zen 4 core die can drag down performance in some applications which is why the R7 7800X3D with only 3D cache cores has been known to outperform the R9 7950X3D in some games.

You might want to contact mod authors about the performance. All it would take is 1 buggy mod that creates a high workload and even the best CPUs from the future might still struggle.

Be aware that with HT/SMT, most core resources are used at 50% total CPU utilisation because the virtual core pairs share the same functional units. At 100% utilisation each core is running at ~50% of the performance as at 50% utilisation so total performance remains similar. HT/SMT does give a little extra performance by reducing wasted cycles due to pipeline stalls, but in most game like applications this usually is under a 5% performance increase.

Making an application "just utilize more of the CPU" is not that easy. Some tasks just do not provide opportunity to be split for execution on multiple cores, and even if they do the scaling might not be anywhere close to linear due to other bottlenecks. To make matters more complex, the more you load a CPU past a certain point, the slower each core becomes due to the CPU hitting thermal, power or current limits which can slow down other running tasks that do not scale well with multiple cores.

You can think of it as assigning 10 people to cook a small breakfast for 1 person. Despite there being 10 people chances are the breakfast will still take as long to prepare as if only 2 or even just 1 person was cooking it as most of the 10 people will be standing around with nothing to do. This is because certain tasks when making the breakfast, such as toasting the bread and cooking an egg, do not give the opportunity to scale well with people count. Maybe 2 people could benefit the speed of the process such as having 1 person put the toast on while the other goes off to cook the egg, but this sort of parallelisation is very limited. You can think of each frame of X4 kind of being like that breakfast, no matter how many extra cores you throw at it, there are only so many tasks that can be run in parallel to run on them. Of course if you needed to make 10 breakfasts suddenly the 10 people can do the job ~10 times as fast as 1 person, but that would be like running 10 separate game applications at the same time.
Dipluz wrote:
Wed, 4. Oct 23, 13:16
edit: I have ofcourse enabled, high performance power mode in Windows.
Usually balanced is good enough. High performance does not give any additional peek performance, only lowers the latency until peek performance by encouraging the CPU to remain at a higher clock speed state than is required for the current utilisation.

Dipluz
Posts: 4
Joined: Thu, 21. Nov 13, 12:57

Re: X4 Performance Troubleshooting Suggestions

Post by Dipluz » Thu, 5. Oct 23, 10:19

Imperial Good wrote:
Wed, 4. Oct 23, 17:10
Dipluz wrote:
Wed, 4. Oct 23, 13:16
I bought a new computer two weeks ago, Windows 11, AMD Ryzen 9 7950x3d, 4090rtx, 64gb ddr5, SSD m2, and the same savegame ran significantly faster, but as I added Faction Enhancer it started to run more and more slowly, though CPU load never went above 14%, which I found odd in comparison, why dosent the game just utilize more of the CPU when it has all that free resources at its disposal? Ive been reading a little bit about optimizing my game. though lets be clear my lag/stutter is in map mode not when I am flying around/and or fighting, so I set map filter only to other and only to display my own ships orders not everyone who is allied with me, etc. GPU also runs nicely. Got any tips?
Try making it so X4 is only using the high cache cores. The regular Zen 4 core die can drag down performance in some applications which is why the R7 7800X3D with only 3D cache cores has been known to outperform the R9 7950X3D in some games.

You might want to contact mod authors about the performance. All it would take is 1 buggy mod that creates a high workload and even the best CPUs from the future might still struggle.

Be aware that with HT/SMT, most core resources are used at 50% total CPU utilisation because the virtual core pairs share the same functional units. At 100% utilisation each core is running at ~50% of the performance as at 50% utilisation so total performance remains similar. HT/SMT does give a little extra performance by reducing wasted cycles due to pipeline stalls, but in most game like applications this usually is under a 5% performance increase.

Making an application "just utilize more of the CPU" is not that easy. Some tasks just do not provide opportunity to be split for execution on multiple cores, and even if they do the scaling might not be anywhere close to linear due to other bottlenecks. To make matters more complex, the more you load a CPU past a certain point, the slower each core becomes due to the CPU hitting thermal, power or current limits which can slow down other running tasks that do not scale well with multiple cores.

You can think of it as assigning 10 people to cook a small breakfast for 1 person. Despite there being 10 people chances are the breakfast will still take as long to prepare as if only 2 or even just 1 person was cooking it as most of the 10 people will be standing around with nothing to do. This is because certain tasks when making the breakfast, such as toasting the bread and cooking an egg, do not give the opportunity to scale well with people count. Maybe 2 people could benefit the speed of the process such as having 1 person put the toast on while the other goes off to cook the egg, but this sort of parallelisation is very limited. You can think of each frame of X4 kind of being like that breakfast, no matter how many extra cores you throw at it, there are only so many tasks that can be run in parallel to run on them. Of course if you needed to make 10 breakfasts suddenly the 10 people can do the job ~10 times as fast as 1 person, but that would be like running 10 separate game applications at the same time.
Dipluz wrote:
Wed, 4. Oct 23, 13:16
edit: I have ofcourse enabled, high performance power mode in Windows.
Usually balanced is good enough. High performance does not give any additional peek performance, only lowers the latency until peek performance by encouraging the CPU to remain at a higher clock speed state than is required for the current utilisation.
Hi,

After my post, I did some more research and this is exactly what I did, in Windows after X4 is started I set CPU affinity in task manager for x4.exe to core 0-15, and that fixed everything.

Even with all my mods in late game with thousands of ships, I have literally 0 lag or stutter and that is also with my game running on Ultra graphics on 1440p@144hz.
I have read online its AMD that makes these CPU affinity drivers for each game.
Could Egosoft contact AMD to ask if they can add a default CPU affinity for X4? so that we do not have to do this task manually or figure out some way to add the CPU affinity through registry or a shortcut ourselves?

If you can't do this Id suggest making a pinned AMD Ryzen 9 7950x/7950X3D guide on the Egosoft forum and Steam discussions, as ive read the CPU latency between CCD0 and CCD1 is also high and can cause lag/stutter, since the latency between Core 0 and Core 34 is a whooping 88ns. Though what I have not tested yet, which I will do after work today is test and measure FPS on Core 0-15 and Core 16-31, and compare the results and user experience.

Post Reply

Return to “X4: Foundations - Technical Support”