You can sign up to get a daily email of our articles, see the Mailing List page!
Support us on Patreon to keep GamingOnLinux alive. This ensures we have no timed articles and no paywalls. Just good, fresh content! Alternatively, you can donate through Paypal!

Tweaking Performance in XCOM 2

Posted by , | Views: 26,101
When Firaxis chose to use Unreal Engine to power their latest title, XCOM 2, they chose to stay on the older version 3 of the engine instead of the latest, and fully Linux-compatible, version 4. It seems that when they brought XCOM: Enemy Unknown to the masses, they'd hacked that version 3 engine so much, it was practically an entirely new fork. Porting all their customisations to the newer engine would have been daunting, so they decided to stick with that customised engine for XCOM2.

However, this has brought some hangovers from that earlier version with it, hangovers that Feral left in place during the porting. In particular, many titles using UE3 suffer from an extremely low default memory allocation. In fact, the default PoolSize is set at just 10Mb, and I suspect that Feral have to leave it that way to ensure maximum compatibility. In fact, besides Poolsize, you can tweak quite a few settings in your game's ini file, but as usual, it appears that PoolSize is the primary factor in smoothing out the performance. Original credit to this tester for Unreal Engine 3 here from 2013, regarding the original XCOM game.

Having tried these changes myself, I can report that performance leapt from "frustrating and shoddy" to "entirely playable". There is still a little stutter evident in the loading transitions while in the dropship, but in-game performance is definitely a huge improvement. I'd go as far as to use the phrase "buttery smooth". No more slide-show explosions, or missed action-shots.

Here's what you can do.

Important Note: We suggest reverting these changes for any patches that come, as it could affect them. Always revert changes like this when a patch is released.

Before making any changes, you might want to make a copy of your file, then you'll need to open it for editing:

cd ~/.local/share/feral-interactive/XCOM2/VFS/Local/my\ games/XCOM2/XComGame/Config
cp XComEngine.ini XComEngine.ini.original
gedit XComEngine.ini


And then find the PoolSize=10 line and change it to something more reasonable, such as 256.

If you just want the quick fix, you can skip this section, however as the more detailed article points out, you might want to change the following lines too. I did, but it's not entirely clear how much they contribute. Feel free to experiment!


MipFadeInSpeed0=0
MipFadeOutSpeed0=0
MipFadeInSpeed1=0
MipFadeOutSpeed1=0
MinSmoothedFrameRate=30
MaxSmoothedFrameRate=400
bInitializeShadersOnDemand=True
DisableATITextureFilterOptimizationChecks=False
UseMinimalNVIDIADriverShaderOptimization=False
PoolSize=256 (or VideoRAM/4, up to 768 max)
bAllowMultiThreadedShaderCompile=True
ThreadedShaderCompileThreshold=4 (match your CPU cores, so an i3=2, while i5 or i7=4)
OnlyStreamInTextures=True


Having made the changes, the first thing that XCOM 2 tries to do is set it all back to default values again, so you'll need to mark that file read-only:


chattr +i XComEngine.ini


(actually, you might want to make that change with sudo so that root owns the file, preventing XCOM 2 from changing it back - some users reported that XCOM 2 does indeed "undo" the read-only flag!)

And that should be the game fixed up for immediate play!

As always, there are a lot of systems out there that will handle these changes differently, so your mileage may vary. Remember to mark the file read-only before playing and if you still don't see a change, try the "reset to defaults" trick mentioned in the original source article.

For reference, my system specs are:

O/S: Ubuntu 14.04 64bit
GPU: Nvidia GTX670, 2Gb
Chip: Intel i7 2600k
RAM: 16Gb

I used the 256Mb PoolSize as shown above, but could have gone 512Mb, as the original source article suggested "GPU memory divided by four". I used the ShaderThreshold 4 as shown above.

If you don't know your video memory, you have two options. If you're using Nvidia, you can simply run the Nvidia XServer Settings GUI (and I think Catalyst drivers might have a similar option actually). Otherwise, you can run:


dmesg | grep VRAM


That will hopefully show you how much RAM your computer detected on start up.

Good luck, Commander!
0 Likes
We do often include affiliate links to earn us some pennies. We are currently affiliated with GOG and Humble Store. See more information here.
The comments on this article are closed.
30 comments
Page: 1/3»
  Go to:

Xpander 9 February 2016 at 3:52 pm UTC
ha.. it actually made perf worse for me.
dropped from 30 fps to 20 in the mothership (command hub)

AMD FX8320@4,4ghz, GTX 970.

didn't check into battle because was turned off by the perf drop in the command hub.

so i probably wont need this tweak, for me it runs solid 40-70 without those tweaks also, everything set to high, AO tiled, depth of field off, bloom off, 1080p


Last edited by Xpander at 9 February 2016 at 3:57 pm UTC
bollox83 9 February 2016 at 4:03 pm UTC
View PC info
  • Supporter
Really noticeable improvement here. I haven't measured frame rates, but the stuttering is almost entirely gone with these changes.

Ubuntu 15.10
Intel i5 2500k
GTX 970
Renzatic Gear 9 February 2016 at 5:23 pm UTC
I found this a couple days back, and it made a MASSIVE amount of difference for me, from unplayable, to perfectly fine with everything up, save texture detail, which I have to set to Medium to prevent stutter, even with the .ini tweaks.

According to the ingame FPS counter, which you can access from the Feral launcher by going to the Advanced tab, entering -showtestpanel, then enabling it in the new tab that shows up immediately to the right of it, I'm getting a consistent 45-50 FPS in mission
liamdawe 9 February 2016 at 5:49 pm UTC
@xpander, you're using a beta though arent you frome what I saw in the IRC?
harleywastaken 9 February 2016 at 6:09 pm UTC
in-mission the engine tweaks helped a great deal; the beta patch helped to a lesser degree (with engine tweaks off). i'd love patch notes for the beta patch. performance outside missions is still atrocious, along with the abysmal after-mission load times and OpenVPN/networking launch issues. i saw no "performance regression" with the 361.18 drivers compared to 35x.xx.

i'd also like to know why MSAA is missing from the Linux version completely, and i'd love more info on Windows vs Linux graphics/driver issues/differences, but that's mostly because i'm a nerd, not to complain about it.

that being said, the fact that Feral has a beta performance patch out before the Windows version is... i don't even know the right word to use. their support is (still) great; i remember working with them when EU/EW came out to get the (same as XCOM2, sigh) networking issue fixed.

great job so far (again), Feral!


Last edited by harleywastaken at 9 February 2016 at 6:10 pm UTC
linux_gamer 9 February 2016 at 6:43 pm UTC
scaineAnd then find the PoolSize=10 line and change it to something more reasonable, such as 256.
Poolsize issues are quite common with the Feral ports (Spec Ops: The Line eg.), though it is not too hard to get appropriate values by the command line, as described above. Why are the sizes set to values which don't even come near to the minimum settings (1024/4=256>>10) ?
liamdawe 9 February 2016 at 7:00 pm UTC
linuxgamer
scaineAnd then find the PoolSize=10 line and change it to something more reasonable, such as 256.
Poolsize issues are quite common with the Feral ports (Spec Ops: The Line eg.), though it is not too hard to get appropriate values by the command line, as described above. Why are the sizes set to values which don't even come near to the minimum settings (1024/4=256>>10) ?

Spec Ops is VP, not Feral.
nocri 9 February 2016 at 7:18 pm UTC
Really nice ! Although the game crashes on my i5 with 4 threads, but with 2 works just fine thanks.
Teodosio 9 February 2016 at 7:25 pm UTC
20FPS -> 40FPS

Thanks!!!!
Uncleivan 9 February 2016 at 8:03 pm UTC
Heck where can i get the beta patch? Feral software has no patches released still


Last edited by Uncleivan at 9 February 2016 at 8:04 pm UTC
  Go to:
While you're here, please consider supporting GamingOnLinux on Patreon or Liberapay. We have no adverts, no paywalls, no timed exclusive articles. Just good, fresh content. Without your continued support, we simply could not continue!

We also accept Paypal donations and subscriptions! If you already are, thank you!
Livestreams & Videos
Community Livestreams
See more!
Popular this week
View by Category
Contact
Latest Comments
Latest Forum Posts