Jump to content

KSP 1.2 under Linux: start-up problems. A solution


Recommended Posts

The Linux install of KSP 1.2 appears to react badly to some configuration data that may be stored elsewhere by earlier versions of KSP. If you get a blank screen rather than the initial menu, this may be a cause

1: The data involved is stored in one or more subfolders of ~/.config/unity3d/ (This is on an Ubuntu-derived Linux, but I would expect it to be universal. This is a hidden folder and you might need to change a setting to be able to see it.)

2: On my system I found ~/.config/unity3d/SQUAD/ and ~/.config/unity3d/Squad/ , timestamped about three weeks apart in June 2016. They contained different sets of files. I made archives of both and deleted them. Both were related to Kerbal Space Program.

3: Deleting these files led to a normal startup of KSP, in a window rather than full-screen.

4: If you have an in-progress career or science game from an earlier version of KSP, I would not be at all surprised if you need to restore from the archives you made so as to run the earlier KSP version.

5: I am told Steam does things differently. I don't even know whether or not Steam supports Linux.

Link to comment
Share on other sites

Not an answer so much as a clarification:

3 minutes ago, Wolf Baginski said:

I am told Steam does things differently. I don't even know whether or not Steam supports Linux.

Steam installs KSP differently. Once installed KSP runs exactly the same, and the Unity config folder is in the same place.

(also, off topic, but of course Steam runs on Linux - that's what the Steam Machine is)

Link to comment
Share on other sites

Both versions, and indeed all Unity3D games, will create a prefs file in .config/unity on Linux.

This file tells the engine the last known good configuration for resolution, screen mode and graphics adapter.

Sometimes it can be incorrect, especially when switching between versions of a game that use different versions of Unity3D, it's a known issue for players who have been playing KSP 1.1.3 as well as KSP 1.2

The prefs file is outside Squads control, but is harmless to delete.

Link to comment
Share on other sites

  • 4 weeks later...

This prefs file in that directory could help to solve alot of problems linux users have, particularly with multiple monitor setups:

To be precise, the file is: ~/.config/unity3d/Squad/Kerbal\ Space\ Program/prefs

Since unity is primarily a windows platform, they've thrown away the -geometry argument you normally get with any properly written X11 program. That means for most people with multi-monitor setups, they have to start KSP in a window, move it around to the correct position and then select fullscreen mode.

This worked as a hack previously, but since 1.2, selecting fullscreen in game just maximises the window. If you run your 2d desktop as high as it can go (like I do), this causes 3d KSP to crawl to a snails pace as it tries to render over 6MB of data every frame on a display area that's constantly checking for occlusions. Unacceptable!

The solution is in this file; you have to start the display area rendering the correct way, and don't let KSP try to change it.

Unfortunately, none of this will work for those using xinerama, probably. Then again, if you are using xinerama, you clearly don't care about 3d framerate. For those with proprietry Screen setups (nvidia twinview, ATI equivalent, or multple graphics boards), this value determines on which monitor the game starts:

 <pref name="UnitySelectMonitor" type="int">1</pref>

where:

  • 0 = primary monitor
  • 1 = secondary monitor

I guess -1 would be a monitor "LeftOf" in xorg.conf? It could also be bus order related/random. i.e. 2. I don't have enough monitors to test this.

Also in that file are geometries of the initial screen, and a fullscreen setting. If the initial window appears (always +0+0, unity ignores window manager hints completely) on a monitor that has a smaller display size than what is set here, it will be forced into windowed mode. If the monitor it starts on can't switch to the resolution in this file, it will be forced into windowed mode. Both are bad.

Therefore, if you want proper fullscreen with a realistic resolution, you have to make sure the fullscreen setting is on here AND in KSP's settings.cfg, AND the unity prefs geometry is set to something the monitor it will appear on can handle.

I'm not sure yet if what KSP's idea of what resolution you want has to be the same in settings.cfg. It may just accept what unity gave it.

However, non-Ubuntu  proficient users will be able to create start scripts to force these values to be acceptable as needed. As an example, I use something like this (by simply overwriting the unity prefs file):
 

Spoiler

#!/bin/sh

sed -i 's/^FULLSCREEN[ ]=[ ]False/FULLSCREEN = True/' settings.cfg

cat > "~/.config/unity3d/Squad/Kerbal Space Program/prefs" <<EOF
<unity_prefs version_major="1" version_minor="1">
        <pref name="Screenmanager Is Fullscreen mode" type="int">1</pref>
        <pref name="Screenmanager Resolution Height" type="int">720</pref>
        <pref name="Screenmanager Resolution Width" type="int">1280</pref>
        <pref name="UnitySelectMonitor" type="int">1</pref>
</unity_prefs>
EOF

./KSP.x86_64 $@

 

 

 

Edited by surge
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...