owned this note
owned this note
Published
Linked with GitHub
# [GUIDE] Speedrunning Souls Games on Linux
This document serves as a guide on how to speedrun "Souls" games on Linux, what needs to be done in preparation and what does or does not work.
It is intended that you go through this whole guide in order. Most of the text is simply explaining what you have to do and why you have to do it.
If you have any questions, feel free to DM me via Discord (`virazy`) or join the SoulsSpeedruns Discord server: https://discord.soulsspeedruns.com/
## Basics
We'll start with the basics. First of all, with "Souls games", I mean Dark Souls 1-3, Sekiro and Elden Ring, however the overall process of setting everything up and installing/running tools is generally similar between all games.
I also primarily use Elden Ring as an example in this guide, however the steps are the same between all games and you usually just have to use the appropriate folder paths and Steam AppIDs.
With that out of the way, how does speedrunning, or even playing, those games on Linux work? None of the games have a native Linux port, so a piece of software called "Proton" is used, which is a heavily customized version of "Wine". It is a translation layer that's built into Steam and makes Windows games run on Linux. It is what's used to power the Steam Deck too, for example, and works extremely well.
Since they are still Windows games, Proton needs to "emulate" a Windows C-Drive environment, called a "prefix". Those prefixes are specific for each games and can be found in `~/.steam/steam/steamapps/compatdata/(appid)`, where `~` is your home directory and `(appid)` is the Steam AppID of the specific game.
For reference, here is a list of relevant Steam AppIDs for this guide:
| Game | Steam AppID |
| - | - |
| Dark Souls 1 | 211420 |
| Dark Souls 1 (Remastered) | 570940 |
| Dark Souls 2 | 236430 |
| Dark Souls 2 (SOTFS) | 335300 |
| Dark Souls 3 | 374320 |
| Sekiro | 814380 |
| Elden Ring | 1245620 |
Whenever you want to run a Windows program alongside a Windows game on Linux, you need both of them to use the same Proton version and run inside the same prefix. In some cases, there are also additional Proton options that need to be set to the same thing for both programs.
Something else that needs to be kept in mind is that Steam checks if a (Proton) game is running by seeing if there are any programs running inside the prefix of the game, so you need to make sure you always launch the game first before any tools, otherwise Steam won't let you launch it.
Many programs also need dependencies, such as .NET, which are usually not installed inside prefixes by default. For all of that, a helper program will be used, called "protontricks". That helper program will also be used to make launching programs inside the games prefix easier. The installation and usage of it will be explained below.
So, now that the overall idea has been explained, here is an overview of what will be covered in this guide:
- Step 1: Installing native Linux tools
- Step 2: Preparing the Proton prefix and installing dependencies
- Step 3: Installing and setting up Proton tools
- Step 4: (Speed)running the game
## Native Linux Tools
Before doing anything, you'll have to install all the necessary Linux tools.
First of all, this guide assumes that you've installed Steam on your OS natively and not as a flatpak. If you are using flatpak (or snap or any other non-native installation), I would highly recommend you switch it, since many tools might not work well and have not been tested for this configuration. If you are using a Linux distro with a graphical "app store", there are often multiple versions or install options of Steam you can choose, otherwise you can usually find it in your package manager, for example `sudo apt install steam` (Debian/Ubuntu-based) or `sudo pacman -S steam` (Arch-based).
Let's start with Proton and related tools. Open up Steam and search for "Proton" in your library. Install the latest stable Proton version available, which at the time of writing is 8. You may find that online guides sometimes recommend "Experimental" or "GE" versions, although they often tend to be unstable and generally provide very specific tweaks that are either unnecessary or negligible for the games covered in this guide, so it's best to stick to the latest stable version.
Next is protontricks, a Proton helper program, which will be used to set up and install dependencies inside prefixes, as well as to run programs inside specific prefixes. Follow the install instructions for your distro here (try the recommended methods in order): https://github.com/Matoking/protontricks?tab=readme-ov-file#installation
Lastly, you will want to download the save file organizer made by Kahmul: https://github.com/Kahmul/SoulsSpeedruns-Save-Organizer/releases
Since it's made with java, make sure you install openjdk (8 or newer) on your system. You might also encounter an issue where the program is completely blank, with no UI elements visible. In that case, you will have to set the `_JAVA_AWT_WM_NONREPARENTING` env var to `1`. Check your distro or desktop environment specific instructions for where to best set it globally, since that env var is required to fix the same issue for a lot of java programs. Alternatively, you can also just run it via the terminal using the following command: `_JAVA_AWT_WM_NONREPARENTING=1 java -jar "SoulsSpeedruns - Save Organizer.jar"`
Do not configure it yet, since the prefix needs to be set up first.
## Proton prefix
With all the Linux tools installed, the prefix is next. If you ever launched the game before, make sure to rename (recommended for backup purposes) or delete the currrent prefix, just to have a fresh start. As mentioned above, it's found at `~/.steam/steam/steamapps/compatdata/(appid)`.
Now open up Steam, right click the game and go to properties. In the compatibility tab, manually set the Proton version to the latest stable one you just installed. This way, changes to the global default version will not affect the game, since stability and stuff not breaking is preferred for this.
Next, launch the game once. You can configure the settings or create a save file if you want, but it's not required. You just have to launch it once and then close it, which creates the fresh prefix.
Now with the prefix in place, you'll have to install some generic dependencies using protontricks. They might not be all required for what you are doing, but it's best to have a good set of base dependencies installed, just so they are there when you need them for certain tools.
To do that, run the following command in a terminal, with `(appid)` replaced by your games Steam AppID: `protontricks (appid) -q vcrun2022 corefonts d3dcompiler_47 dotnetdesktop7`
This installs Visual Studio Redistributable 2015-2022 (`vcrun2022`), various base fonts (`corefonts`), additional DirectX DLLs (`d3dcompiler_47`) and .NET (`dotnetdesktop7`) into the prefix quietly without popup/install windows (`-q`).
## Proton tools
Now that the prefix is set up and ready, it's time to install and set up the various speedrun tools you'll want.
### Save organizer
Start with the save organizer, which is technically a native tool, but needs the prefix set up to work properly, since otherwise there are no save folders. If you have old backup saves somewhere, either in the prefix you backed up before you created a fresh one or from a previous Windows install, copy them into `~/.steam/steam/steamapps/compatdata/(appid)/pfx/drive_c/users/steamuser/AppData/Roaming/(gamename)` or `~/.steam/steam/steamapps/compatdata/(appid)/pfx/drive_c/users/steamuser/Documents/NBGI/(gamename)`, depending on the game.
Start the save organizer, click on "Edit Games" in the top-right and select the correct game in the list. In there, click the "Browse" button and make sure it correctly went to the save file location, not your home directory. If it went to the home directory, you might have to point it to the save file manually from the paths above (and please DM me, so we can figure out what went wrong, since it should auto-detect the path). I would recommend using a custom profiles directory outside of the prefix, so you can just delete the prefix if necessary without having to worry about losing your old saves, but it's up to you. From there, you can start creating profiles, save states etc..
### Standalone timer
Now that that the save organizer is set up, it's time for the timer. Livesplit can be unreliable in wine, so I would recommend using the more standalone CLI timer, which is a small text-based frontend for the autosplitter + blackscreen remover. You can download it here (`CliTimer.X.X.X.zip`): https://github.com/FrankvdStam/SoulSplitter/releases
To run programs inside the prefix, you'll also use protontricks. For now, extract the .zip file and open the folder in a terminal. Make sure your game is running in the background and then run the timer using the following command: `WINEDEBUG="-all" protontricks-launch --no-runtime --appid (appid) CliTimer.exe`
Let's break it down:
- `WINEDEBUG="-all"` disables all wine debug messages, which would simply get in the way and cause issues here, but isn't necessary for any other tools.
- `protontricks-launch` is the actual protontricks command to run a EXE inside a prefix.
- `--no-runtime` is a launch argument to disable the Steam runtime for the program, which causes issues here.
- `--appid (appid)` specifies the Steam AppID of the game you want to run the program for. This has to be correct, otherwise the game and program will behave as if you run them on different PCs.
- `CliTimer.exe` is the program you want to run. This can be a full path too.
Once it's running, select the appropriate game and it should change to the timer. This does not have any controls or splits like livesplit and is purely to see the time and make use of the blackscreen removal patches.
### Livesplit
The standalone timer is nice and all, but it's not *livesplit* with all the neat features. It exists to not have to deal with the mess that livesplit can be in wine and still not miss out on a proper timer, but livesplit can also work fine and not cause any issues if you are lucky. If you want to give it a try, it's fairly simple.
Download the latest version of livesplit from here and extract the .zip file: https://livesplit.org/downloads/
Next, start the game and then open the livesplit folder in a terminal and run the following command, similar to the one used for the standalone timer: `protontricks-launch --no-runtime --appid (appid) LiveSplit.exe`
From there, just configure it like you would on Windows. For information about the autosplitter and how to activate it, see the github page: https://github.com/FrankvdStam/SoulSplitter
Again, you might encounter issues such as it crashing, flickering or simply not working. In that case, it's best to use the standalone timer.
### Practice tool
With the timer out of the way, it's time to deal with tools for testing and practice. Let's start with the practice tool, in particular the one made by JohnDiSanDonato. As of the time of writing, only the ones for Elden Ring and Dark Souls 3 have been updated to work in wine. The Sekiro version does not work yet.
Just like with the other tools, download and extract the appropriate version:
Elden Ring (v1.5.0 or newer): https://github.com/veeenu/eldenring-practice-tool/releases
Dark Souls 3 (v1.6.0 or newer): https://github.com/veeenu/darksoulsiii-practice-tool/releases
After that, just like before, start the game and then run the following command via a terminal from within the practice tool folder, with `(tool.exe)` replaced by the appropriate .exe file: `protontricks-launch --no-runtime --appid (appid) (tool.exe)`
If everything went well, you should see it in-game.
### Cheat Engine
Next is Cheat Engine, which is another essential tool for testing and practice.
Download the installer from here: https://www.cheatengine.org/downloads.php
Run it using the same command as before, with `XX` replaced by the version number: `protontricks-launch --no-runtime --appid (appid) CheatEngineXX.exe`
Keep in mind that it will ask you to install optional crap, so make sure you decline that whenever it asks for it. It will install the program into the prefix, which by default will be under `~/.steam/steam/steamapps/compatdata/(appid)/pfx/drive_c/Program Files/Cheat Engine X.X`, with `X.X` replaced by the version number. From there, it is again the same command as before: `protontricks-launch --no-runtime --appid (appid) "Cheat Engine.exe"`
Notice that the .exe name is in quotation marks this time. This is due to there being a space in the name, which would otherwise count as 2 separate files/arguments for the command. You can also optionally add the path to a .CT file afterwards, if you want to launch a specific practice script right away, for example.
### Helper scripts
In general, I recommend you create simple bash scripts for all needed tools, so you can simply double-click them, instead of having to run commands from the terminal every time. I like to organize my tools like this, for example:
```
er-stuff
|--> programs
| |--> jdsd_practice_tool
| | |--> (practice tool files)
| |--> clitimer
| |--> (standalone timer files)
|--> practice_tool.sh
|--> clitimer.sh
```
With that, a simple launch script, let's say `practice_tool.sh`, would look like this:
```
#!/bin/bash
protontricks-launch --no-runtime --appid 1245620 programs/jdsd_practice_tool/jdsd_er_practice_tool.exe
```
Don't forget to make it executable, either via the properties window of your file manager, or by using the following command: `chmod +x practice_tool.sh`
## (Speed)running the game
Now that everything should be set up and installed, it's time to (speed)run the game. This is generally as simple as launching the game via Steam first and then running the timer (+ other tools if you are testing/practicing/routing) as described above.
### Downpatching
In some cases, you might have to downpatch the game. You can follow any other guide for that, since the procedure is the same, however if you want to run the game from a different folder, you obviously can't just run it through Steam as-is. There are multiple methods for that, however the most convenient in my opinion is by changing the Steam launch options of the game to point to a different folder.
To do that, first make sure your downpatched game folder is next to the original game folder, but with a different name. For example, in `~/.steam/steam/steamapps/common`, with Elden Ring you would have `ELDEN RING` for the updated version and `ER_1.04.1` for version 1.04.1. Then set the launch options of the game in Steam to the following: `echo "%command%" | sed 's/ELDEN RING/ER_1.04.1/' | sh`
This works due to the launch options field on Linux effectively being a single-line terminal, with `%command%` as a replacement for the original launch command. This just outputs the original command first `echo "%command%"`, passes it to `sed`, where all instances of `ELDEN RING` are replaced with `ER_1.04.1` and then that is passed to `sh`, which simply executes it. If you had other things in there before, such as `gamemoderun %command%` or `mangohud %command%`, you can simply add those in the quotation marks of the first part, so `echo "%command%"` becomes `echo "mangohud %command%"`, for example.
Another thing to note is that for Elden Ring, you need to bypass EAC. On Windows, you would do that by creating a text file in the game folder and running `eldenring.exe` manually. On Linux, due to the trick mentioned above, it's even simpler. Just set the launch options to the following: `echo "%command%" | sed 's/start_protected_game.exe/eldenring.exe/' | sh`
That way, running Elden Ring via Steam just launches the non-EAC version and it's bypassed. If you are using a downpatched version, simply chain those two `sed` parts together, like so: `echo "%command%" | sed 's/ELDEN RING/ER_1.04.1/' | sed 's/start_protected_game.exe/eldenring.exe/' | sh`
Alternatively, you can add any other version or non-EAC exe as a "Non-Steam Game" to your Steam library. To do that, click on the "Add a Game" button in the top left of your Steam library and select "Add a Non-Steam Game...". A window with a list of various programs should open, where you need to click on "Browse..." in the bottom left, after which you'll have to navigate to the game exe you want to add.
Once that is done, right click the added game in your library and open the properties. There, you need to go to compatibility tab and set the same Proton version as the normal game. After that, go back to the shortcut tab and add the following to the launch options (don't forget to instead the correct appid): `STEAM_COMPAT_DATA_PATH=~/.steam/steam/steamapps/compatdata/(appid) %command%`
You can optionally rename the game in your library, for example to "ELDEN RING (1.04.1)". Once that is all done, you can close the properties window and just run that version like that.