I Put Space Engineers on Linux (Again)

Good Morning from my Robotics Lab! This is Shadow_8472, and today I am offloading Space Engineers from Manjaro to EndeavourOS. Let’s get started!

Short Answer

I used Glorious Eggroll’s community version of Proton [1], but the AI update this past week and now requires a blank registry key or two added to its prefix. See the section titled “GAME UPDATE!!!” down below.

EDIT 4-18-2023: The development team just released a Hotfix in update 1.202.067 fixing the issue. 2/3 of my post is out of date only 14 hours after publication.

Background

This is a follow up/update to both last week –where I finish moving into a new EndeavourOS installation– and a post I wrote on January 18, 2021 [2], where I installed Space Engineers on Manjaro Linux and go into some detail about WINE, Proton, and the lengthy struggle I went through to install it there without fully understanding what I was doing. In case the specifics help anyone, I am running Space Engineers 1.201.014 default (Most Wanted update) on Glorious Eggroll GE-Proton7-54 on EndeavourOS with an Nvidia Geforce 970 graphics card.

I know what I’m doing a little better this time around. I even got it working first try. But that doesn’t mean I understand how everything works inside. There was an update to Space Engineers some time after my 2021 post that introduced a bug related to the audio system that would crash the game after anywhere between 5 minutes to 2 hours (ballpark average of half an hour). I was never able to diagnose it beyond a since-forgotten Discord post noting that the crash is an audio-related bug, and that it can be fixed by ripping open the .exe to kill the sound system. I happen to like sounds, so I accepted it until I gradually stopped playing.

The Dotnet Tradeoff

In more recent days, a member of the community going by G3ckobot on the developers’ Discord (Keen Software House) identified this crash as related to dotnet48, which I was quite possibly using as it showed up in a guide I linked to on GitHub I tried to follow. In my new installation, I went straight for Glorious Eggroll, and while the trade-off, as G3ckobot put it, is worse performance, the improved stability using the default wine-mono is worth it. He also suggested disabling progression in world settings to fix some lag related to the “G menu” for selecting blocks for your hotbar.

Crashes aren’t the only change I’ve noticed improvements with. The main menu plays videos like it’s supposed to. “Inventory Full” doesn’t self-overlap or cut off. Even “Exit to Windows” doesn’t throw a crash anymore. On the topic of miscellaneous bugs, there’s a new hint of static sometimes when I finish welding something.

A Note About Ship Blueprints

I’ve had one long-term goal while playing Space Engineers, and that is to perform a grand tour of the Solar System map before doing much else. I want to visit every planetary body once – even if just for a touch and go. My first attempt had a worker ship I was quite fond of designing, so I went to fetch it from my old save.

Like with any long-file path file transfer, my first move was to explore the destination directory.

/home/shadow/.steam/steam/steamapps/compatdata/244850/pfx/drive_c/users/steamuser/AppData/Roaming/SpaceEngineers/Blueprints/local/

When I navigated to the counterpart on Manjaro, I found myself in the exact, same place. I even made a file using the touch command in one place and it showed up in the other! A closer inspection of my file path showed that ~/.steam/steam is actually a symbolic link. Symbolic links have no concept of being mounted into another file system, so when I followed it, I landed right back in EndeavourOS’s copy of Space Engineers. It pointed to /home/shadow/.local/share/Steam, which I had to manually follow. I had to look around to find ../steamuser/Application\ Data/SpaceEngineers/, but in the end, it imported just fine.

GAME UPDATE!!!

The AI update arrived this week, and my installation broke after I was all but done writing.

Missing prerequisites
There is missing required C++ package.
You have to accept elevation dialogs from the
Steam to install prerequisites.

Within 20 minutes, I was the first one reporting it on Discord. The server went into a flurry of activity as community members pooled skills over the next four hours. A few facts were soon apparent: there are a lot of C++ packages, no logs were of help narrowing down the missing one, beta builds were working fine with Proton right up until the update dropped. I was busy with more important matters for most of it, but by the time I came back, user opekope2 posted [3]:

HERE'S THE WORKAROUND
1. Install and run protontricks
2. Navigate to SE > default prefix > regedit
3. Under HKLM\SOFTWARE\Classes\Installer\Dependencies, create Microsoft.VS.VC_RuntimeAdditionalVSU_amd64,v14

Community consensus was that an unused dependency was listed last-minute –perhaps accidentally– that wasn’t commonly included in Proton. Since the dependency isn’t actually called, it’s OK to add a fake entry in the prefix’s registry. How to get that fake entry in there can get tricky.

How to use Winetricks instead of Protrontricks

Protontricks is a version of Winetricks geared for managing Proton prefixes instead of Wine prefixes. Protontricks is in AUR but didn’t feel like installing anything from there properly. Instead, I made a symbolic link from ~/.wine to my Proton prefix and told Winetricks to load the “default” prefix. Note: I heard good things about Proton Experimental, so I switched to it from Glorious Eggroll.

AUR: Arch User Repository

cd ~
mv .wine .wineDISABLED
ln -s .steam/steam/steamapps/compatdata/244850/pfx .wine
cd .wine

Errors about .wine and “No such file or directory” can be ignored. It just means you don’t already have a default Wine prefix. If you get an error when trying to cd into .wine, that means you will have to find where Steam puts games on your distribution and change your file path accordingly.

If everything is good so far, It is a very good idea to back up your prefix if you aren’t working with a clean one or wish not to redownload it.

cp ~/Full/Proton/Path ~/.SEbackup

Ensure both Space Engineers and Steam are closed. Start Winetricks. Select “Select the default wineprefix.” The link you created and tested earlier will fool Winetricks into looking at Space Engineers’ prefix. Click OK.

Next, select “Run regedit” and hit OK.

Navigate in the registry editor to HKEY_LOCAL_MACHINE\Software\Classes\Installer\Dependencies.

You the Classes folder is long. Once you scroll down to Installer and find Dependencies, you should see two keys with the folder icon (my screenshot already has the extra key). Bring up your context menu and make a New Key and name it Microsoft.VS.VC_RuntimeAdditionalVSU_amd64,v14. Do not worry about adding a value.

Space Engineers should start up now, but you may have to try a few times before you start/load a game. My record is 4. After you confirm Space Engineers is working, be sure to remove ~/.wine link and replace your original default wine prefix if you had one before!

rm .wine
mv .wineDISABLED .wine


Takeaway

I’m no stranger to easy projects expanding on me, but this was dramatic! I tried to keep up with developments in this story until the night before publication. Opekope2’s original workaround post is pinned and has been edited to include instructions for importing two keys* that will do the same job as editing the registry manually as demonstrated. As a personal experiment starting around the time this goes live, I’m adding the other key manually. I don’t expect anything to change, but as opekope2 pointed out to me, “Because that’s how it is on Windows,” [3].

* Microsoft.VS.VC_RuntimeAdditionalVSU_amd64,v14 and Microsoft.VS.VC_RuntimeMinimumVSU_amd64,v14

Final Question

Have you gotten whatever latest update of Space Engineers running on Linux? If not, I highly recommend you engage with the community on Discord [3].

As always, I look forward to hearing about your experience.

Works Cited

[1]. GloriousEggroll, “proton-ge-custom,” github.com, [Online]. Available: https://github.com/GloriousEggroll/proton-ge-custom [Accessed Apr. 17, 2023].

[2]. Shadow_8472, “Space Engineers: WINE Is Not an Emulator” letsbuildroboticswithshadow8472 Jan. 18, 2021. [Online]. Available: https://letsbuildroboticswithshadow8472.com/index.php/2021/01/18/space-engineers-wine-is-not-an-emulator/ [Accessed Apr. 17, 2023].

[3]. Keen Software House, “Linux” [Discord]. Available: https://discord.gg/keenswh [Accessed Apr. 17, 2023].

Leave a Reply