Linux74656 / SpaceEngineersLinuxPatches

A place to find some fixes to get Space Engineers running in Linux
140 stars 12 forks source link

Unable to initialize game #19

Closed jorgegomzar closed 4 years ago

jorgegomzar commented 4 years ago

Hi, I followed the Python script way, but when I click "Play" in Steam it appears the image below. I'm sure winetricks is in its final version (I installed it today, from the original git repo).

ASUS TUF GAMING FX505-DD, Ubuntu 18.04 with kernel 5.1.3-050103-generic. error_se

Installed Wine packages: imagen

Wine version: imagen

Please help. Thanks.

Linux74656 commented 4 years ago

Let's try manually creating the prefix. I assume you have the game installed in the default steam directory (for Ubuntu 18.04 it should be /home/USERNAME/.local/share/Steam/steamapps/common/SpaceEngineers/) Delete the prefix it one already exist at /home/jorge/.local/share/Steam/steamapps/compatdata/244850/pfx (just rename the entire pfx folder to pfxBAK)

So run the following command from your terminal: WINETRICKS=/home/jorge/.local/share/Steam/steamapps/compatdata/244850/pfx winetricks --force -q dotnet48 faudio vcrun2015 d3dcompiler_47

If that works and gets you into the game then follow the step 3 instructions here: to solve the stutter issue.

If this does not solve the issue, could you please post the game error logs (SpaceEngineers.log and VRageRender-DirectX11.log) found at /home/jorge/.local/share/Steam/steamapps/compatdata/244850/pfx/drive_c/users/steamuser/Application Data/SpaceEngineers/ (Or wherever you have the game installed)

jorgegomzar commented 4 years ago

I tried creating the prefix manually as you said but at the end it returned this: imagen

Even so, after I click "Play" in Steam, it starts to install some libraries and crashes before entering the game. SpaceEngineers.log and VRageRender-DirectX11.log do not exist, I presume it is because the game is never started.

I'm going to reinstall the game and try the manual approach of the prefix again.

UPDATE: Even with a fresh install it keeps failing.

Linux74656 commented 4 years ago

Try adding PROTON_LOG=1 %command% to your steam launch options(right click space engineers in steam, click properties, then under the general tab click set launch options.)

Then run the game one more time. there should be a log called steam-244850.log in your home directory, post that one.

jorgegomzar commented 4 years ago

steam-244850.log

Linux74656 commented 4 years ago

Is the game installed at /games/steamapps/common//SpaceEngineers/ ? If so then try running this:

WINEPREFIX=/games/steamapps/compatdata/244850/pfx/ winetricks --force -q dotnet48 faudio d3dcompiler_47 vcrun2015

jorgegomzar commented 4 years ago

@Linux74656 I did that the first time you told me, I was careful.

I created the Steam library there since is an M.2 drive

Linux74656 commented 4 years ago

Just making sure.

It seems the prefix is being created properly... let's try checking your graphics driver version. The AMD Ryzen5 3550H has built in graphics... and the laptop has an NVIDIA 1050. It may be using one over the other. Which version of the nvidia and amd drivers do you have installed?

jorgegomzar commented 4 years ago

I'm currently using the Nvidia GTX 1650 for gaming purposes: imagen

Linux74656 commented 4 years ago

Ok... the drivers check out. Does the game start if you add PROTON_USE_WINED3D=1 %command% to the steam launch options? (Make sure if you are adding it to other things they are before the %command% IE. PROTON_USE_WINED3D=1 PROTON_LOG=1 %command%)

jorgegomzar commented 4 years ago

Nothing happens

Linux74656 commented 4 years ago

Leave that command in the launch options and add the following to your existing prefix: winetricks --force -q d3dx11_42 d3dcompiler_47 If it does not work see if the game created the logs SpaceEngineers.log and VRageRender-DirectX11.log.

jorgegomzar commented 4 years ago

Ok, after executing the command I got an error saying that cabextract wasn't installed, so I installed It and tried again. This time I got no error but the game didn't start, and the log files are nowhere to be found...

Linux74656 commented 4 years ago

Remove PROTON_USE_WINED3D=1 and try running the game again. If it crashes post the steam-244850.log, and I will see if anything changed behind the scenes.

jorgegomzar commented 4 years ago

steam-244850.log

Linux74656 commented 4 years ago

Well the crash reports are the same... so let's try a fresh prefix install. Delete your prefix and reinstall each of the following components one at a time. Let me know if there are any errors on the installs. winetricks --force -q dotnet472 winetricks --force -q d3dcompiler_47 winetricks --force -q xact winetricks --force -q vcrun2015

jorgegomzar commented 4 years ago

I appended WINEPREFIX=/games/steamapps/compatdata/244852/pfx before each command.

Here is the output of each installation, maybe you can understand better if I share it. dotnet472 -- NOT OK d3dcompiler_47 -- OK xact -- OK vcrun2015 -- NOT OK

Should I not execute the game before creating the prefix? I tried both, executing it once and not, but it does not work in either way. Thanks for your patience.

Linux74656 commented 4 years ago

I have not noticed a difference in starting the game before hand... it should be fine either way.

It appears it fails to install dotnet461 i have had this problem in the past and have gotten around it by using dotnet48. Try that instead of installing dotnet472.

As for vcrun2015, if i remember correctly other have had issues with it as well. Some people reported it working without installing vcrun2015(as steam will try to install it when you launch the game.)

One more thing, set the prefix to run as windows xp. I as well as others have issues starting and running the game in windows 7 mode. winetricks --force -q xact d3dcompiler_47 winetricks --force -q dotnet48 winetricks winxp

jorgegomzar commented 4 years ago

After running each command and starting the game this is what shows up: error_se

And a new error log is generated by proton: steam-244850.log

Although, this time SpaceEngineers.log and VRageRender-DirectX11.log are created: SpaceEngineers.log VRageRender-DirectX11.log

It looks like SpaceEngineers is detecting my GPU as "NVIDIA GeForce GTX 470"... May this be related?

P.D.: I noticed some errors during the dotnet48 installation, just in case here is the complete output of that installation.

Linux74656 commented 4 years ago

Let's see if dotnet is causing the real issues... backup your old prefix(Name it pfxDOTNET) create a new prefix with just vcrun2015 faudio d3dcompiler_47 winxp

Then download and install the latest mono package here: https://github.com/madewokherd/wine-mono/releases and install it in the prefix with

wine msiexec -i /wine-mono-4.9.4.msi

If you get into the game and a screen like below appears then dotnet is the issue: image

If the game still does not start... try running the game with your integrated amd graphics. (Both with mono and dotnet.)

jorgegomzar commented 4 years ago

Well... Having mono installed wasn't enough to at least start the game, so I began trying different things like installing each library without the "--force -q" parameters, but I ended up getting the same error: imagen

So, I decided to try with the AMD GPU with a fresh prefix and it worked. The problem is the AMD GPU not being powerful enough to run Space Engineers... Just so you can see what I talk about: pain

It's the reason I left the AMD GPU for the "last chance". This means it has to do with my NVIDIA graphics. But I don't get it, with the NVIDIA GTX 1650 I can play games like ARK in high...

Linux74656 commented 4 years ago

Alright that is a start. Try setting all of the games graphics setting to minimum and disable all the cehck boxes. Then switch over to the Nvidia card and see if it will start.

If not you may try purging you existing driver install and reinstalling the nvidia drivers and see if it works. you can find the ppa information here: https://github.com/ValveSoftware/Proton/wiki/Requirements#nvidia

If that fails... as a last resort you may also try installing directx11 into your prefix. I have found it usually breaks more games that it fixes, but in some rare cases (Like STALKER Anomaly) it is the only way to get games to start... even with dxvk installed and enabled. You can download the redist from Microsoft here: https://www.microsoft.com/en-us/download/details.aspx?id=8109

and install it with: WINEPREFIX=/games/steamapps/compatdata/244850/pfx" wine directx_Jun2010_redist.exe

jorgegomzar commented 4 years ago

Sorry for the wait. I've tried everything you told me to, but it keeps showing the same "update windows or your gpu drivers" dialog...

Maybe it's not relevant, but I remember that in order to be able to use my Nvidia GPU I had to make some adjustments in some xorg config files... It had something to do with some AMD corrupt driver I think. It's best if I post the guide I followed: https://devtalk.nvidia.com/default/topic/1064147/linux/linux-machine-not-using-my-gpu-ryzen-7-3750h-gtx-1650-/

This is not my first time with Linux, but it is my first "complete immersion without Windows as fallback". I'm still learning. Again, thanks for your patience.

Linux74656 commented 4 years ago

It could be a configuration issue, but i assume since other games you play work with the nvidia card (as you stated that native ARK will run on high settings) it is unlikely to be a graphics driver configuration issue. Question: Have you played other, non-native games with your NVIDIA card? since ark can run natively in Linux, it may have somthing to do with your systems interactions with proton/wine...

Also do you have any modules blacklisted here: /lib/modprobe.d/blacklist-nvidia.conf

Lastly does the game create new logs if you try to run it with the Nvidia card now that it was started with the builtin amd graphics? If so could you post the new logs?

jorgegomzar commented 4 years ago

Yes, I have played non native games. I can play The Walking Dead: Season Two, but not Batman - The Telltale Series (to put an example of two "similar" games).

/lib/modprobe.d/blacklist-nvidia.conf does not exist in my system, but these do: imagen

The SE logs using the NVIDIA GPU: SpaceEngineers.log VRageRender-DirectX11.log


From SpaceEngineers.log:

NVIDIA GeForce GTX 470

It keeps getting wrong the NVIDIA GPU...

Linux74656 commented 4 years ago

Nouveau is disable, that is good. I have noticed that with amd only graphics cards the game will display the wrong graphics card name... but the game usually starts without issue. However my gtx 960 has always showed up as a 960... so it misidentifying the card could be related to the issue.

Try this, put this config file in the same place where you got the space engineer logs(the .../Application Data/SpaceEngineers/ folder), overwrite the exisiting file and try to start the game and see if it works:

SpaceEngineers.cfg.zip

jorgegomzar commented 4 years ago

It does not work. As usual the same dialog shows up but nothing else

Linux74656 commented 4 years ago

If you do not use the vega graphics for gaming you may try removing the mesa drivers(including the mesa-vulkan-drivers) if they are installed.

The only other idea I have is to try the nvidia short lived branch of drivers, version 435. These are the same ones i have installed, and perhaps it will solve the issue.

jorgegomzar commented 4 years ago

I downgraded the NVIDIA drivers: imagen

But it's the same result: imagen

Logs: VRageRender-DirectX11.log SpaceEngineers.log

Linux74656 commented 4 years ago

It seems some windows 7 users were having issues with the game at some point... they fixed it by installing a specific windows update file here: (you'll need the x64 version) https://www.microsoft.com/en-us/download/details.aspx?id=36805 I have no idea if wine is even capable of utilizing these kinds of updates, but i did install it myself and it did not seem to break the space engineers prefix... so you try installing it into the prefix with wine msiexec -i Windows6.1-KB2670838-x64.msu

Also did you try removing your mesa drivers?

jorgegomzar commented 4 years ago

Yes, I removed the mesa drivers before downgrading the NVIDIA ones. Should I prepend "WINEPREFIX=/.../.../pfx" to the command?

Linux74656 commented 4 years ago

yes use your space engineers prefix... and also ignore the /home/d2/Desktop/ from the original post, and point it to where you downloaded the file.

jorgegomzar commented 4 years ago

I just did. Nothing new, the same update error.

Linux74656 commented 4 years ago

It was a long shot... I am out of ideas. What I can recommend though, is posting your issue over here: https://github.com/ValveSoftware/Proton/issues/1792 There are a lot of very talented people that are far more knowledgeable than me. Post your latest logs and a description of the issue(preferably with a screenshot of the error message) and hopefully they will be able to figure this out. I'll keep an eye out on the thread to see how things progress. Good luck, and sorry I was unable to figure it out.

jorgegomzar commented 4 years ago

I will post it there, maybe in some future update of proton this is easier.

And thank you very much, I know this is a rare case and I appreciate the time you've spent trying to help me.

jorgegomzar commented 4 years ago

Hi, I managed to install DXVK in the prefix. The idea came to me while searching for maybe other way to get the game to work, specifically after watching this video.

It looks like the game goes a little farther, but keeps failing. This is the new error: imagen

Have you seen this error before or have an idea about how to solve it?

Linux74656 commented 4 years ago

I have seen this before specifically while trying to get the game to run in directx11 mode. Make sure you have removed all of the PROTON_USE_WINED3D=1 launch options from steam and see if it will start.

jorgegomzar commented 4 years ago

I just had PROTON_LOG=1, maybe DXVK is not compatible with d3dcompiler. I honestly don't get the difference between them.

Linux74656 commented 4 years ago

Effectively DXVK translates DirectX API calls into Vulkan calls, since Linux cannot read or execute DirectX. My current understanding is that DXVK does not know how to do everything that DirectX 10/11 can do so in some circumstances it relies on other DirectX libraries(such as the d3d_compiler) to fill in the gaps and get a close approximation of what should be done.

I created a prefix with DirectX installed and ran it with space engineers and PROTON_USE_WINED3D=1 . The game popped up with the same error in your previous post.

This is the new error: imagen

When i removed it the game ran normally with no issue. So that could mean that your version proton is corrupt. Try using an older version of proton... like 4.2 or 3.16. You can do this by right clicking space engineers in steam and at the bottom of the general tab their should be an option for Force the use of a specific Steam Play compatibility tool. you can then change the version in to drop down menu that appears below.

Also you could try installing and using a custom proton version like gloriuseggroll https://github.com/GloriousEggroll/proton-ge-custom it is for more specific fixes for games that have issues in proton, and to my knowledge space engineers is not one of them, however I use it for Fallout 4 and it fixes quite a bit.

You can install and use it by: Downloading https://github.com/GloriousEggroll/proton-ge-custom/releases/tag/4.15-GE-1 (SEE EDIT BELOW!) Finding your ~/.steam/root/ folder. Usually /home/USERNAME/.steam/root/ Create a folder called compatibilitytools.d inside of the root folder. Extract the downloaded archive to the compatibilitytools.d/ Close steam, make sure you actually exit and don't just close the window (top of the steam window click steam>exit) Reopen steam and change the proton version the game uses by following the same steps i described above to use and older version of proton.

EDIT: I just realized i tried Space Engineers with GloriousEggrolls 4.15-ge-1 version (the same one I use for fallout 4) i tried it with 4.21-ge-2 and it shows a file not found error. so use version 4.15-GE-1 here https://github.com/GloriousEggroll/proton-ge-custom/releases/tag/4.15-GE-1 You also may need to recreate your prefix with xact vcrun2015 dotnet48 d3dcompiler_47 winxp EDIT 2: Also you can try creating the prefix without d3dcompiler_47, as it works on my system without it. d3dcompiler was just a precaution as it solved some issues other users were having with starting and running the game.

jorgegomzar commented 4 years ago

Using Proton 4.2/3.16 didn't work, but when I used Proton GloriousEggrolls 4.15-ge-1 the same error of "apply windows updates..." appeared without the splash screen that usually comes with it.

Aside from that, when I checked the SpaceEngineers.log, realized that now the game is correctly detecting my GPU. It's a little win. VRageRender seems to be causing the problem, so I am going to start from that.

Here is the VRageRender-DirectX11.log

Linux74656 commented 4 years ago

Alright... verify the integrity of your game files and do not apply the stutter patch... delete your prefix and recreate it with faudio vcrun2015 dotnet472 win7 Keep using gloriuoseggrolls version of proton: start the game and see if DXGI_ERROR_UNSUPPORTED is in the VRageRender-DirectX11.log file. If so change your wine prefix to winxp... and see if DXGI_ERROR_UNSUPPORTED is still there.

jorgegomzar commented 4 years ago

With win7 prefix: SpaceEngineers.log VRageRender-DirectX11.log

With winxp prefix: SpaceEngineers.log VRageRender-DirectX11.log

In both cases the game crashed, and "DXGI_ERROR_UNSUPPORTED" was present. I will try now using d3dcompiler first, and DXVK second. I'll update here if anything happens.

UPDATE: "DXGI_ERROR_UNSUPPORTED" was present as well in each case. UPDATE 2: I'm going to reinstall the NVIDIA GPU drivers from the nvidia web, instead of the "Additional drivers" or "ubuntu-drivers autoinstall" ways.

Linux74656 commented 4 years ago

If that does not work... try adding this to your steam launch options: __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only %command%

jorgegomzar commented 4 years ago

Using the NVIDIA drivers and the launch options didn't work. The game produced the same logs as before.

Linux74656 commented 4 years ago

Remove those and try this one instead. WINEDLLOVERRIDES="dxgi=n" %command%

If that does not work could you post the file created by running this command: sudo vulkan-info > vulkan.txt it should show, amoung otherthings, the information on the vulkan compatible devices on your computer. If it is not installed you can install it with sudo apt-get install vulkan-utils

jorgegomzar commented 4 years ago

Prefix with faudio vcrun2015 dotnet472 winxp, Proton 4.15 GE 1. The parameter did not get the game to work, resulting in the same logs as before. The vulkaninfo command returned: vulkan.txt

Linux74656 commented 4 years ago

Remove everything from your steam launch options except PROTON_LOG=1 %command% then try DXVK_FILTER_DEVICE_NAME="AMD" It should run the game with you integrated graphics, confirm this then, try: DXVK_FILTER_DEVICE_NAME="GeForce" and see if it works with you nvidia graphics.

jorgegomzar commented 4 years ago

Using the parameter with AMD didn't work, but I guess this is because a few days ago we said to uninstall the AMD GPU drivers. Now, here comes the roller coaster: using the parameter with GeForce DID START THE GAME, I could navigate the menu but when selecting a scenario to start playing the game crashes. (Maybe should I install, now that we know that it works, d3dcompiler_47?)

UPDATE: It didn't work with d3dcompiler_47 neither did with DXVK

Linux74656 commented 4 years ago

That is a great start. Post the most recent logs, and we will see what is going on now.

jorgegomzar commented 4 years ago

My actual prefix contains: faudio vcrun2015 dotnet472 winxp Using Proton 4.15-GE-1 Steam parameters: DXVK_FILTER_DEVICE_NAME="GeForce" PROTON_LOG=1 Logs: steam-244850.log SpaceEngineers.log VRageRender-DirectX11.log

Linux74656 commented 4 years ago

OK switch back to normal proton 4.11-12. And create your prefix one more time with, faudio vcrun2015 dotnet48 d3dcompiler_47

If it fails to run the a game scenario, try adding msvcr120.dll to your prefix configuration. You can do this by opening the prefix configuration menu: WINEPREFIX=/PATH/TO/YOUR/PREFIX/ winecfg then click to libraries tab. In this tab find New override for library: drop down box, and manually type msvcr120.dll into it. Then click the add button next to it and close the window. Start the game and see if you can get into a world/scenario.