Horrible performance on Linux

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

Moderator: Moderators for English X Forum

jug007
Posts: 39
Joined: Sat, 12. Jun 10, 21:37
x4

Horrible performance on Linux

Post by jug007 »

I just got the new Kingdoms End expansion only to find out that the game is barely playable for me right now.

Last time I played was January 2022, and while I remember the game not running amazingly smooth, it did run a lot better.

Some info about my system:
Debian Testing amd64 with Cinnamon (X11)
Intel i7-7800x (turboing to 4 GHz on all cores)
64 GB of RAM
Nvidia GTX 1080
Installed on a ridiculously fast Samsung NVMe drive

This seems to be some sort of CPU bottleneck, because my GPU is barely doing anything, and even enabling AMD FSR Performance mode doesn't improve framerate at all.

~~I don't remember if I played on Windows before or not.~~
EDIT: I just checked the Windows version (on Linux) and it has different savegames, so no I played on Linux before as well and it definitely ran better.

Could it be something simple like you guys not enabling compiler optimization on Linux (speaking from experience there).
You could also enable pretty strong platform optimizations since according to viewtopic.php?f=180&t=420952 you need a ridiculously strong CPU anyways.

Just for reference what sort of performance I am talking about:
25 FPS at my Headquarters in Grand Exhange
Between *7* and 15 FPS on the map
20 FPS in True Sight
up to 55 FPS in the title screen
Last edited by jug007 on Fri, 14. Apr 23, 17:15, edited 1 time in total.
CBJ
EGOSOFT
EGOSOFT
Posts: 54309
Joined: Tue, 29. Apr 03, 00:56
x4

Re: Horrible performance on Linux

Post by CBJ »

What you're experiencing doesn't match up with other people's feedback on performance under Linux. In fact the general consensus is that performance is the same, or even marginally better, than on Windows.

Performance will depend on quite a number of factors, so we are going to need a lot more information to be able to offer you any relevant advice. The sticky thread at the top of the forum tells you the information we need. The only thing you can ignore in that list is the DXDiag, for obvious reasons. A savegame might also be helpful.
jug007
Posts: 39
Joined: Sat, 12. Jun 10, 21:37
x4

Re: Horrible performance on Linux

Post by jug007 »

CBJ wrote: Fri, 14. Apr 23, 17:08 Performance will depend on quite a number of factors, so we are going to need a lot more information to be able to offer you any relevant advice. The sticky thread at the top of the forum tells you the information we need. The only thing you can ignore in that list is the DXDiag, for obvious reasons. A savegame might also be helpful.
Here is some additional information then:
- Version: 6.0 English (though it doesn't say how to actually check this)
- Mods: none
- Game start: Split
- Nvidia driver version: 525.89.02
- Savegame and settings: https://data.moto9000.moe/X4_save_and_settings.tar.xz

Possibly relevant changes include:
- Switching from Linux Mint 19.2 (Ubuntu 18.04 based) to Debian Testing
- Nvidia pushing terrible broken driver updates, though I haven't had any issues on Vulkan yet, only with OpenGL
- I might or might not have been running an overclock (~4,7 GHz) before, but I noticed that I get calculation errors in mprime with that


Do you guys have any performance metrics for a similar CPU? Could it just have been the overclock that I might have been running back when I last played, or should my CPU perform much better than it does right now even at stock speeds?
CBJ
EGOSOFT
EGOSOFT
Posts: 54309
Joined: Tue, 29. Apr 03, 00:56
x4

Re: Horrible performance on Linux

Post by CBJ »

There is no way of giving meaningful "performance metrics" for this kind of game. Performance will vary depending on where you are, what's happening around you, how many ships and stations you (or the NPC factions) have built, and many other factors, even with similar hardware.

However, I would strongly suggest testing on a stable OS build with the most up to date drivers you can, and with nothing overclocked.
jug007
Posts: 39
Joined: Sat, 12. Jun 10, 21:37
x4

Re: Horrible performance on Linux

Post by jug007 »

Performance is still pretty low, but I think I know what the difference between now and January 2022 is now.

So I was streaming the game (using MPEG1) and even though that only uses 50% of a single thread, the framerate improved by 5-10 FPS.
I get ~13 FPS with the map open now.

I assume that the rest comes from the overclock that I probably had back then. So that would explain the performance difference.


On another note it still feels like it underperforms a lot, but seeing that pretty much any amount of extra CPU usage slows the game down certainly suggests that the game would run much better on a bigger CPU.
CBJ
EGOSOFT
EGOSOFT
Posts: 54309
Joined: Tue, 29. Apr 03, 00:56
x4

Re: Horrible performance on Linux

Post by CBJ »

The game is CPU-bound a lot more often than it is GPU-bound, certainly.
preema
Posts: 4
Joined: Fri, 14. Apr 23, 20:09

Re: Horrible performance on Linux

Post by preema »

Hi,

something must be horribly wrong on linux. Before update, i have cleaned Zyarth Dominion X and other sectors around and keep them clean from xenos. Then I have started building a defence platform in ZD X. Everything was ok, plenty fps. After this update, in the same position, i have got only about 6 fps and graphics card is utilized only about 25 %. But when I activate menu screen, Utilizing of graphic card go to around 80 % and fps get back to normal, performance in this mode is very good. Closing menu cause drop of fps and load of the graphics card.
Change of graphics settings has no effect. Game with the high settings (4k), or custom settings with everything off or low and HD resolution behaves equal. Average processor cores utilization is about 60 %.
Disabling of the Kingdom End expansion has no effect.

os: openSUSE tumbleweed
gc: AMD RX580 (8 GB)
memory: 16 GB
processor: AMD Phenom II X6
gc driver: xf86-video-amdgpu (22.0.0-3.3)

mods never installed/used
only windows version with proton 7 is played
(steam linux version of all application just ignore a half of the keyboard, but windows versions + proton work perfectly.)

(Update should transform the game from single thread to multithread, so it was supposed to improve performace, but it cause the opposite.)
CBJ
EGOSOFT
EGOSOFT
Posts: 54309
Joined: Tue, 29. Apr 03, 00:56
x4

Re: Horrible performance on Linux

Post by CBJ »

Something must be wrong with the game as it is set up on your system. None of what you describe is normal, nor does it correspond particularly closely to the OP's report other than very superficially. Please start your own thread and provide the information requested at the top of the forum, as per my previous post.
User avatar
beko
Posts: 81
Joined: Thu, 11. Jun 20, 21:14
x4

Re: Horrible performance on Linux

Post by beko »

Are you by chance running this on the iGPU of the Intel?
preema
Posts: 4
Joined: Fri, 14. Apr 23, 20:09

Re: Horrible performance on Linux

Post by preema »

No, there is no integrated graphic card on the main board of my computer. Only dedicated graphics card (AMD RX580)
babalas
Posts: 1
Joined: Sat, 15. Apr 23, 08:12

Re: Horrible performance on Linux

Post by babalas »

Ok I'm getting the same thing. Performance maxes out at 60fps and gets locked there while my gpu is doing 50% and cpu is barely used. Noticed in combat it drops to 30fps and sound begins crackling. Changing from ultra to low makes no difference. None of the options in graphics seem to have any effect. No vsync (also monitor is 144hz so isn't what it's locked to). Versions < 6 ran fine for me and would only start slowing down in massive battles.

*edit* ok more investigation and changing the settings does drop the GPU usage. Can get it down to 27% gpu and 7% cpu but fps remains fluctuating between 30 and 60
jug007
Posts: 39
Joined: Sat, 12. Jun 10, 21:37
x4

Re: Horrible performance on Linux

Post by jug007 »

babalas wrote: Sat, 15. Apr 23, 08:19 Ok I'm getting the same thing.
You are having a seemingly completely different issue, so please open a new thread.

On my end the CPU is just too weak (or the game requires too much CPU, however you want to look at it.)
jug007
Posts: 39
Joined: Sat, 12. Jun 10, 21:37
x4

Re: Horrible performance on Linux

Post by jug007 »

A little update:
Upgrading to an Intel i9-14900K and an Intel A770 has the game run a lot better. Worst case scenario (in True Sight) I get more than double the FPS. The map is now butter smooth.
Changing graphics settings has quite the impact now as well, suggesting that the game is now GPU bound instead of CPU bound.

Not sure if this is an amazing revelation, but it is nice to know that the game will run nicely if you just throw enough hardware at it. Plenty of games are so badly optimized that it doesn't matter how much you throw at them.

Return to “X4: Foundations - Technical Support”