Linux Performance Tips

Discussion in 'Hardware, Software, Tech' started by fooBrew, Sep 29, 2019.

Thread Status:
Not open for further replies.
  1. fooBrew

    fooBrew Avatar

    Messages:
    34
    Likes Received:
    31
    Trophy Points:
    8
    Gender:
    Male
    Location:
    San Diego, CA
    The intent of this post is just to document my own experience at getting the game to run as fast and smooth as possible under Linux given my hardware. I'm also hoping it will help others struggling to increase fps under Linux. It would be great if others could post their own experiences, especially if using different hardware or Linux flavors. My focus is on Ubuntu Bionic and AMD Radeon since that's what I'm using but I have some Nvidia info here also. Most of the info towards the end under SotA Client is GPU and OS agnostic.

    These are the specs for my current system (taken from /bug in the chat console):

    OS: Linux 5.0 Ubuntu 18.04 64bit
    CPU: AMD Ryzen 5 2600 Six-Core Processor (12) System RAM: 32162
    GPU: Radeon RX 590 Series GPU RAM: 8192

    My GPU is specifically a PowerColor Red Devil RX-590. It's about a $230 card as of 9/2019 so, not bad but not amazing either. This card has a hardware switch on the card itself to enable "OC mode" which enables built-in overclocking settings. I leave this feature enabled. Other than that, I do no overclocking or tweaking of my BIOS for CPU, RAM, etc. I leave everything at stock or "auto" settings.

    System RAM is DDR4 3000.

    Drivers
    Whether you're using an AMD or Nvidia GPU, you'll want to make sure you have the latest vendor supplied drivers. These may or may not be the drivers your system is using with an initial installation of the OS. You'll need to do a little footwork to obtain the right ones and get them installed but it's fairly painless. I'm assuming a basic knowledge of Linux commands here so feel free to ask questions if you're not sure about something.

    AMD
    A couple points up front:
    • AMD Catalyst, AMD Radeon Software and fglrx are all obsolete. Do not use these. Unfortunately, there are still a lot of pages out there mentioning these, even Ubuntu's own website. Actually, "Radeon Software" generally refers to the AMDGPU drivers but the terminology isn't really used anymore as far as I know.
    • AMD provides two alternate driver packages: AMDGPU and AMDGPU-PRO. They're very similar but the Portalarium devs use and recommend the AMDGPU-PRO drivers so you should use them too.
    • It's not a bad idea to do a 'dpkg -l > all_packages' first to have a reference of what was installed on your system before you start making modifications.

    Start by going to the AMD support site, select 'Drivers & Support' at the top and then enter your GPU info. That should take you to a page where you can select your OS and then download the driver package (.tar.gz). Like Nvidia, AMD uses a 'unified' driver which is the same for all of their cards.

    Here are the official installation instructions. Just follow those and make sure you install the drivers with the 'amdgpu-pro-install' script and not the 'amd-install' one. A number of packages will be installed including the following:

    xserver-xorg-hwe-amdgpu-video-amdgpu
    mesa-amdgpu-va-drivers
    mesa-amdgpu-vdpau-drivers

    After installing everything and rebooting, you may want to purge the old drivers to make sure there's no confusion about which ones are active. I found two xserver drivers on my system which I removed with the following command:

    $ sudo apt-get purge xserver-xorg-video-amdgpu-hwe-18.04 xserver-xorg-video-radeon-hwe-18.04

    I also found some old mesa- and vulkan packages I removed. The AMD package will include it's own Vulcan drivers so those from Ubuntu aren't required.

    If you want to force a reinstallation of the drivers after removing all the old stuff, you can do that with the --reinstall option:

    $ sudo amdgpu-pro-install --reinstall

    Nvidia
    To install the latest Nvidia proprietary drivers, I recommend using the PPA here. Once you add that PPA (instructions are on that page), you can install the latest drivers with the following commands (assuming 435 is the latest version in this example):

    $ sudo apt-get update
    $ sudo apt-get install nvidia-driver-435 libnvidia-gl-435

    Vulkan
    Both AMD and Nvidia install their own Vulkan drivers so, just like the xserver and mesa drivers, you should only use these and not the ones installed by default from Ubuntu. This is the one from the AMDGPU-PRO package:

    vulkan-amdgpu-pro

    In addition to the Vulkan driver, there's also a Vulkan runtime. A default version is installed from Ubuntu named 'libvulkan1'. You can see what version your running with either of the following commands:

    $ dpkg -s libvulkan1
    $ vulkaninfo | grep "Instance Version"

    The GPU drivers do not provide this package. You can either stay with the one provided by Ubuntu or upgrade it from the main Vulkan website to get the latest version (this is what I did). The upgrade process is easy and instructions are provided on the site.

    SotA Client
    Assuming you have all the "right" drivers installed now, this is where (significant) variations in performance emerge depending on which client your using and how you're invoking it. I've tried just about every significant permutation I can think of as far as how to run each one and you can see my results below. All testing was done standing in the middle of Soltown, waiting 60 secs for assets to finish loading and then monitoring FPS via the /debug console. Video settings were consistent across all tests.

    Native Linux via Steam - About 10fps with little to no stuttering. This was the worst performing of all the tests.

    Native Linux via Steam using the -force-vulcan client option - Surprisingly, no difference from running without the -force-vulcan option which leads me to believe it's not actually getting enabled for some reason. About 10fps.

    Windows client under Steam with Proton 3.16-9 - Frame rate was a little better than native Linux via Steam but some serious stuttering was present. Forgot to get the fps on this one but it was between 10 and 20.

    Windows client under Steam with Proton 4.11-5 - About 20fps but too much stuttering to be playable.

    Native Linux client via stand-alone .deb package installation - Broken. I have bug report open for this.

    Native Linux client via stand-alone .tar.gz package installation and -force-vulkan option - Best of the bunch. Frames stay around 20fps with no stuttering. Very stable. I did perform this same test without -force-vulkan but it looks like I forgot to document it. I just remember fps was lower.

    In addition to the above, it's been discovered that enabling "load time graphics batching" via the /batchit chat command will increase fps by 5-7. Note that this is called Load Time Baking in the Video settings but is currently broken and doesn't actually enable the feature (there's already a bug open for this). You'll need to enter this chat command every time you change a scene as it doesn't appear to persist.

    Disabling Cloth Simulation can also help boost a few more fps, more so than most other video settings. They're still having issues with this feature anyways so it's probably best to just leave it off for now.

    I'd love to hear from others if you have any more tips or observations regarding performance under Linux.
     
    Sentinel2 and Gia2 like this.
Thread Status:
Not open for further replies.