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].

Space Engineers: WINE Is Not an Emulator

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am forcing a Windows game to run on Linux. Let’s get started!

WINE Is Not an Emulator

Gaming on Linux hasn’t always had the best reputation. Software written with one operating system in mind may require the presence of libraries only found in that system, and for the past few decades, that’s meant Microsoft Windows has become the standard for PC gaming.

WINE is a compatibility layer. Their mission is to replace the proprietary Windows libraries with their own open source ones that anyone can freely use. Using WINE, Windows exclusive titles run in “Wine bottles” (or Wine prefixes) that make the correct system calls to either Linux or Mac.

Due to copyright reasons, WINE isn’t allowed to copy-paste any code they look at. Imperfections in execution are an inevitability. Some programs work no questions asked, while others refuse to work all together rated from platinum to garbage.

Steam Proton

I remember seeing someone play Portal 1 on Linux about ten years ago. It one of the earliest titles Steam had running on Linux, but all the walls were blackened like some sort of dark mode. It’s been fixed by now, and Steam will now happily run thousands of titles through Proton, their custom version of WINE. For tech savvy users, they have an option to let any game try to run with no promises provided.

Space Engineers: A Pain to Run

The first time I successfully beat a game into running on Linux with no promises given was Among Us. That game only needed an environment variable or something Proton couldn’t find on its own. Space Engineers, though… it’s something else. ProtonDB lists the game as Silver meaning “[A program] works excellently for normal use, but has some problems for which there are no workarounds” according to WINE’s online database, WINEHQ.

I don’t fully understand what I did in my success. No, Space Engineers will not run easily. My journey started in this community thread on Steam, though the GitHub page they link to is referenced several times over. Just follow the instructions there, and you have a portable black box solution.

But it wasn’t so easy for me. I believe I kept having trouble in creating my WINE prefix. I tried the usual black box rites like rebooting, reinstalling the program, and trying multiple solutions. It wasn’t until I slowed down to find some process hanging in the log that Engineer Man user jeffz instructed me in how to kill the process. Prior to this, I was just using Ctrl+C to kill the process directly in the WINE setup terminal and it would appear to work without the actual game going. I think I managed to rack up a total of 8 to 10 minutes of “play time” in Steam while debugging because not every attempt closed itself.

Followup Work Potential

I pretty much called it good as soon as the game started. Linux discussions kept mentioning “flying grass,” so I was prepared when I saw that, though I have it from a fellow player that there are many bugs even when running it in its native Windows. The only bug I keep running into is an early audio cutoff, usually between the words “Inventory Full.”

My computer is barely fast enough to run Space Engineers smoothly. One of my usual optimizations is ditching the Steam client and running whatever game directly. For a WINE game, though, I’m guessing I’d need to go through the whole process again with another setup, avoiding Proton (I’m using a custom Proton fork by Glorious Eggroll, a recommendation from the ProtonDB page). Unless there’s a DRM requirement where I must use Steam, I’m fine not getting the achievements or other end-user visible hooks. I expect I’ll first try getting Among Us to run from Lutris before tackling Space Engineers.

Takeaway

It is my belief that nothing is impossible to get running on Linux given enough time, talent, and compatible hardware are involved. It is also not unheard of for some games to run better on Linux/WINE than on their native Windows due to the lower overhead from the operating system.

I’ve also noticed a discrepancy where WINEHQ has Space Engineers as low as Bronze or Garbage. Looking at both the age and source of available reports, one needs to not draw conclusions about the runability of a particular piece of software in WINE. ProtonDB had reports near both extremes; most reports are summed up as, “It doesn’t work!” but there are more than a few people who gave detailed specifications on how they got it running. I have a working assembly through a lot of hammering until I found the right spot.

Final Question

If you could run any game on a platform it has no buisness running on, what game would you get running on what system?