Jump to content

1.1+Linux+Steam: immediate crash at startup


Recommended Posts

Issue: At startup, a window with just a black background, approx 1024x768, is shown for a couple of seconds, then the programme just shuts down. This issue is rather similar to this one, but at least in my case it does not affect the X session.

Tried: 32 bit version, 64 bit version (by changing progr. properties in Steam client), both from Steam client and from terminal: same result. Executables in Steam KSP folder have x permission enabled.

My system:

*) KSP: 1.1.0 Steam version, fresh install, no mod, run under Linux (no previous version ever installed, just bought it!).

*) HW: 4-core i5 3.33 GHz, 12GB memory, ATI HD 5770 1GB mem, 2 x 1280x1024 displays. hardinfo report can be found at here.

*) SW: Linux Mint 17.3 (based on Ubuntu 14.04 LTS), latest available Catalyst driver.

*) Player.log can be found here. No KSP.log generated (or I could not find it).

I had great expectations from this programme and I am rather disappointed by this unfortunate start. I am a developer myself (of other kinds of sw) and I know too well bugs do happen; this seems a very basic issue, though. I also understand it might be rooted in Unity3D, rather than in KSP code: another example of how Unity3D multi-platform support sucks!

Thanks for any help,

M.

Link to comment
Share on other sites

Hi @Miwarre, there is a known issue with AMD proprietry graphics drivers and Unity5 multi-threaded rendering.

Please try starting KSP using the -force-gfx-direct command line argument.

%command& -force-gfx-direct

You can add that line to the Steam command box in the Properties for KSP in the Steam client.

(props to soulsource again for finding this works)

Link to comment
Share on other sites

Thanks to all the peoples for their suggestions. :)

@Harry Rhodan: thanks for the pointer; while looking for a solution, I did find that Linux thread, but I failed to notice how it was relevant to my specific issue; never assume anything!

For future record and for anybody else with similar problems, after a few attempts, I found I needed two fixes:

  1. For my ATI, I needed to add -force-gfx-direct to KSP "Properties | Set Launch Options"
  2. For the PulseAudio mess (not KSP fault, but a mess anyway!), among the many solutions proposed in the link suggested by @HebaruSan , I decided for this one (the one with the symlink for libpulse-simple.so.0), which seemed the less intrusive (and it did work!).

Eventually, after the symlinking, the "Set launch options" of my KSP looks like:

LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH %command% -force-gfx-direct

Now, KSP does work! Thanks!

M.

Aside P.S.: The first time it run, KSP started at a resolution of 640 x 480 in which the UI was almost unusable (eventually, I got a better window size by editing settings.cfg). However, before being able to do anything else, I had to accept a dialogue box only a small part of which fitted in the window; I could read nothing meaningful and I could not interact with its controls. As far as I could understand, it has to do with privacy and/or sending home info. Can anybody tell me what I have been kind of forced to accept? Thanks, m.

Link to comment
Share on other sites

I had the exact same issue, figured out how to fix it myself...

I believe the problem lies on how Unity 1.1 detects dual screen setup on Linux.

Basically, on first start, it generates its configuration and saves it to a file. Then on next start, instead of re-detecting the resolution (like it SHOULD do), it just blindly use the configuration file. If the configuration is wrong or if your system changed so that the old resolution is no longer compatible then the game will fail to start...  I had the very same issue in another game (Cities: Skylines) based on unity 1.1 as well.
I've got to say, I am not impressed by Unity 1.1 AT ALL. This should be basic stuff: hardcoding resolution to a file is a very stupid idea and it WILL generate tons of issues on your users. I hope the rest of their codebase is better :huh:

 


Anyway, the bug looked like this for me.

In steam, when I clicked "Play", the game status would go from "Running" back to nothing in half a second. Nothing ever happen.

I tried reinstalling the game (by using "delete local content" then installing it again) but nothing would work because by doing so Unity buggy configuration file is left untouched.

By looking at the logs (that I was able to find thanks to this thread) I could see this in ~/.config/unity3d/Squad/Kerbal\ Space\ Program/Player.log :

...more stuff above...
Desktop is 1600 x 900 @ 60 Hz
Invalid resolution: 1 x 65290
Failed to initialize ScreenManager

If I check into the ~/.config/unity3d/Squad/Kerbal\ Space\ Program/prefs , I have :

<unity_prefs version_major="1" version_minor="1">
        <pref name="Screenmanager Is Fullscreen mode" type="int"></pref>
        <pref name="Screenmanager Resolution Height" type="int">65290</pref>
        <pref name="Screenmanager Resolution Width" type="int">1</pref>
        <pref name="UnityGraphicsQuality" type="int"></pref>
        <pref name="UnitySelectMonitor" type="int">-1</pref>
</unity_prefs>

So Unity expects a resolution of 65290x1. Why, that make perfect sense! Thank you unity for validating your input against my actual resolution!
Of course, ScreenManager failed to start using that buggy resolution.

 

So I edited the file and changed the resolution to something that actually make sense (make sure to use something that is compatible with your system!):

<unity_prefs version_major="1" version_minor="1">
        <pref name="Screenmanager Is Fullscreen mode" type="int"></pref>
        <pref name="Screenmanager Resolution Height" type="int">1600</pref>
        <pref name="Screenmanager Resolution Width" type="int">900</pref>
        <pref name="UnityGraphicsQuality" type="int"></pref>
        <pref name="UnitySelectMonitor" type="int">-1</pref>
</unity_prefs>

Having done that, I was able to start the game again.

Link to comment
Share on other sites

By the way guys, -adapter N works on Linux, but only if KSP is fullscreen.

The prefs file is a Unity thing, not KSP, and existed in 1.0.5 and earlier, and also exists for other Unity games, just take a look in your ~/.config/unity3d/ folder.

It's causing trouble on my other Unity5 games as well, Satellite Reign and Pulsar Lost Colony, in the latter case I can't even change the screen resolution or mode without editing or deleting the prefs file as it overrides any settings changes made in Pulsars settings screen.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...