RimWorld
Sem avaliações suficientes
How to optimise RimWorld (and other games) for Linux
Por Triumph
Optimises RimWorld (and other games) for Linux systems, to prevent common issues when gaming on Linux.
   
Premiar
Adic. a Favoritos
Nos Favoritos
Desfavoritar
Introduction
In this guide we will be fixing a common issue with RimWorld on Linux systems, which fixes CPU pegging, as well as optimising the game so it runs perfectly on your Hardware. This guide also helps in eliminating other Linux gaming problems.

Any derivatives like Mint, PopOS etc. should work with this guide unless you're running a distro that doesn't support Proton or Multilib.

I recommend you download some system monitors KSysGuard[userbase.kde.org] before you start. KSysGuard is an extremely useful GUI program to monitor performance. As well as PSensor.[launchpad.net] Another great GUI program.

Make sure your GPU Drivers are installed, updated and functional
Although RimWorld is a CPU intensive game, having all the recent GPU drivers for your games on Linux, and other desktops, will prevent most issues. If you have an older GPU, check the NVIDIA website: https://www.nvidia.com/Download/index.aspx?lang=en-us to determine what driver version and number.

If your system uses pacman (Arch Linux, Manjaro etc.) install the latest drivers by going into your terminal
For recent NVIDIA cards
sudo pacman -S nvidia nvidia-settings nvidia-utils lib32-nvidia-utils lib32-opencl-nvidia opencl-nvidia libvdpau libxnvctrl vulkan-icd-loader lib32-vulkan-icd-loader

For other NVIDIA cards and for the 390 version.
sudo pacman -S nvidia-390xx nvidia-390xx-settings nvidia-390xx-utils lib32-nvidia-390xx-utils lib32-opencl-nvidia-390xx opencl-nvidia-390xx libvdpau libxnvctrl-390xx vulkan-icd-loader lib32-vulkan-icd-loader
For other versions, replace 390 with what version the website gives you.

If you have an AMD card
You only need these packages
sudo pacman -S mesa lib32-mesa mesa-vdpau lib32-mesa-vdpau lib32-vulkan-radeon vulkan-radeon glu lib32-glu vulkan-icd-loader lib32-vulkan-icd-loader

After, update and reboot
sudo pacman -Syu && sudo reboot


For those using Ubuntu, PopOS and Mint
NVIDIA
Add a repository by typing:
sudo add-apt-repository ppa:graphics-drivers/ppa && sudo apt-get upgrade
On the
graphics-drivers
line, you can input
-4xx
the version the NVIDIA website tells you after, just make sure it has a dash separating, otherwise it won't work.
For example
sudo add-apt-repository ppa:graphics-drivers-410/ppa && sudo apt-get upgrade
AMD
Add a repository by typing:
sudo add-apt-repository ppa:oibaf/graphics-drivers && sudo apt-get update && sudo apt-get upgrade

Then install the files by typing:
sudo apt-get install libvulkan1 mesa-vulkan-drivers vulkan-utils

After, reboot
sudo reboot

Make sure your Linux kernel is updated to the latest version
If you use Arch-Linux or an Arch Linux build, you can skip this step
This is the default build.
On Ubuntu, Mint and PopOS
Open terminal and type:
sudo add-apt-repository ppa:teejee2008/ppa && sudo apt-get update && sudo apt-get install ukuu
This will install ukuu[awesomeopensource.com], a program which lets you choose the most recent, stable kernel. Do not remove your old kernel. Having your old kernel I'd recommend in case anything goes wrong, you can revert to the previous build in grub when rebooting.
Libstrangle - a Linux performance tool for framerates and Vsync
Libstrangle[gitlab.com] this is a very useful tool to help control framerates in-game or in menus.

Arch-Linux
In Arch, this is already in the AUR.

For other distros:
make sudo make install

Debian, Ubuntu and derivates may need some or all of these packages:
gcc-multilib g++-multilib libx11-dev mesa-common-dev

Once installed
To use in games not on Steam type in terminal
strangle 60 /path/to/game

Steam use only
To use in Steam, follow these steps: Steam Library > right click specified game > settings > command line and type
strangle <desired_fps> %command%

Laptops
Alternatively, if you use a laptop and play RimWorld on it and would like to set a prerequisite for balance between battery power fps and game fps. Do env-var:
strangle <desired_fps:battery_fps> %command%

VSync
Control Vsync by:
STRANGLE_VSYNC
*OpenGL and Vulkan have different values

OpenGL
  • -1 (Adaptive sync)
  • 0 (Force off)
  • 1 (Force on)
  • 2 Sync to refresh rate /n.

Vulkan
  • 0 (Force off)
  • 1 (Mailbox mode - Vsync with uncapped framerate.)
  • 2 (Traditional vsync with framerate capped to refresh rate.)
  • 3 (Adaptive vsync with tearing at low framerates.)

I use
strangle -v 1 60 %command%
in Rimworld's Steam command line. This enables Vsync OpenGL.
Gamemode - for Hardware performance
Useful for troubleshooting, fixes common problems so you don't have to manually, and puts all your hardware in performance mode.

Arch Linux, Manjaro and others Arch-based systems
It's already in the AUR, so all you need to do is the following command to install:
git clone https://aur.archlinux.org/gamemode.git && cd gamemode && makepkg -si && cd

32-bit systems
git clone https://aur.archlinux.org/lib32-gamemode.git && cd lib32-gamemode && makepkg -si && cd

Ubuntu, PopOS, Mint and others
First add the dependencies
apt install meson libsystemd-dev pkg-config ninja-build git libdbus-1-dev libinih-dev

Then clone the repository

Move it so you know where to find it (this moves it to downloads)
cd gamemode

Change it to the latest build
git checkout 1.6.1

Run the install script
./bootstrap.sh

Now for all distros, including Arch and Ubuntu
To enable run in terminal
systemctl --user enable gamemoded && systemctl --user start gamemoded

To use in RimWorld, do exactly as before and paste this in the launch options
gamemoderun %command%

If gamemode doesn't work for you
If gamemode does not run try to make it executable:
sudo chmod +x /usr/bin/gamemoderun

Failing running it as a executable, try this as a launch command:
LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libgamemodeauto.so.0 %command%

ProtonDB
Check ProtonDB[www.protondb.com] for ratings on optimisation in Linux. It might not be supported whatsoever.
More NVIDIA tools, plus "improvements"
The following commands improve performance in some high demanding games, I've noticed it helping in most games on Linux, particularly triple buffer. You may want to exclude them for bloat reasons though.

Force Full Composition Pipeline avoids screen tearing by letting the GPU do all the scaling.
Triple Buffer avoids stuttering gameplay. It essentailly allows for a constant stream of data instead of massive chunks.
IndirectGLXProtocol forces the game to directly communicate with the NVIDIA drivers.
Coolbits enables your card to be overclocked which gamemode will make use of.

Arch Linux, Manjaro, and so on.

Create a Xorg Config profile
sudo nvidia-xconfig

Then move it to user
sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.d/20-nvidia.conf

Edit the file with the nano command
sudo nano /etc/X11/xorg.conf.d/20-nvidia.conf

Add these lines under "Device" section in-between the other options:
Option "TripleBuffer" "on" Option "Coolbits" "28"

Add in these lines under the "Screen" section between the other options:
Option "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}" Option "AllowIndirectGLXProtocol" "off"

Then at the very bottom of the script, type
Section "Extensions" Option "Composite" "Disable" EndSection

If this profile has little effect, or you start experiencing crashes (blame NVIDIA)
You can remove the profile by typing in terminal
sudo rm /etc/X11/xorg.conf.d/20-nvidia.conf
Conclusion
I recommend rebooting once everything is finished, RimWorld should now be fully optimised. Try this on any other game and it will run perfectly. Thank you for r/RimWorld and other arch users for helping with this guide.

If you have any issues or other things for me to add, comment below this guide.
6 comentários
Pos 4/5 10 set. 2024 às 16:14 
Thank you so much! I heard of the `gamemoderun` command, but never really tried it. Until just now I got a TPS boost from ~700TPS to ~1000, OMG, thank you for this tutorial!
Triumph  [autor] 21 jan. 2022 às 14:37 
Added you to help
Triumph  [autor] 21 jan. 2022 às 14:33 
The uninstall isn't thorough enough - you need to make sure all the RimWorld files are deleted from your system.

Are hidden files enabled? There should be a .local file in your home folder. And that's how you get to your steam directory.
kingsjack123 21 jan. 2022 às 14:23 
sadly there's nothing there im starting to think i have a deeper problem, have you ever heard of a player not being able to click the "new colony" button but could click all the other buttons?
Triumph  [autor] 21 jan. 2022 às 14:12 
Delete local content for RimWorld, then go to .local > share > Steam > Steamapps and just delete whatever's left of the RimWorld file and reinstall.

Also might have to delete what's been saved on the cloud. But if you have a mod conflict, delete the mod file (in steam apps) and it'll be as good as new. (Uninstall the mods from Steam workshop tho). Hope I helped
kingsjack123 21 jan. 2022 às 13:57 
any info on how to get a clean install of rimworld on linux mint and others?