Jump to content

The Linux Thread!


Recommended Posts

While I understand that this should only work for AMD, I am actually running an Nvidia card (GTX 770), and the

-force-gfx-direct

worked for me. I posted my logs, system data, and command line params here, if anyone is curious. This is an unmodded install, but not for long.

Current issues: Apply/Accept buttons do not seem to work in main menu. I cannot set any settings except for manually in settings.cfg. Resolved on game restart.

Edited by seevee
Link to comment
Share on other sites

I'm getting the failure to start problem.

I've tried the various command line switches suggested without any obvious effect.

I've tried deleting the ./config/unity3d tree without any obvious effect.

My CLI error messages suggest it is a problem with unity failing to load the game controller configs...

~/my games/KSP_linux$ ./KSP.x86_64 -screen-fullscreen
Set current directory to /home/daveb/my games/KSP_linux
Found path: /home/daveb/my games/KSP_linux/KSP.x86_64
Mono path[0] = '/home/daveb/my games/KSP_linux/KSP_Data/Managed'
Mono path[1] = '/home/daveb/my games/KSP_linux/KSP_Data/Mono'
Mono config path = '/home/daveb/my games/KSP_linux/KSP_Data/Mono/etc'
displaymanager : xrandr version warning. 1.5
client has 4 screens
displaymanager screen (0)(DVI-I-1): 1920 x 1200
Using libudev for joystick management


Importing game controller configs
Aborted

There is no settings file in the ./config/unity3d tree or in the KSP tree.

If I copy the backup settings file from ~/KSP/Launcher_Data across to the ./config/unity3d tree the abort still occurs.

Can someone who has got the game started confirm where in the ./config/unity3d tree the settings.cfg file should be ?

In the meantime I'm going to try older versions of KSP to see if it is a system setup issue rather than a KSP problem. Maybe KSP or Unity is being blocked by udev ?

Edit:

Some additional info.

System is Slackware64-14.2rc2

Kernel is 4.4.6

Graphics are NVidia GTX970 using binary blob 361.28

The pulseaudio workaround with pulsenomore has no effect.

Edited by v8Dave
Additional info added
Link to comment
Share on other sites

7 hours ago, Harry Rhodan said:

Still no luck on my Mint 17.3 with a HD 7770. Using the newest catalyst, -force-glcore results in a crash and while -force-gfx-direct works with anti aliasing it still has the old problem of not rendering the terrain until around 50km altitude (album on imgur, log on paste.ee, the pics between 20 and 50km are especially funky).

@Harry Rhodan I had exactly the same problem. Tried with

KSP.x86_64 -force-glcore -force-gfx-direct

and now everything works mostly fine (there are some slight shadow glitches).

My machine:

  • Manjaro Linux, kernel version 4.4.6
  • Amd FX-8320
  • Radeon R9 280x, catalyst driver
  • Desktop resolution: 2820x1600 (1920x1080 + 900x1600), playing windowed at ~1920x1000
Link to comment
Share on other sites

By the way does anyone have any experience of the GCMonitor mod and what the output should look like? I tried it, and it said Mono was using 5GB. Constantly, and from the start. It didn't show the sawtooth wave shape that I was expecting.

UPDATE: I just deleted the ~/.config/unity3d directory completely and started KSP (with no command line options). Seems... to be working fine.

UPDATE 2: Re-added all my mods and still fine. No idea what else was in that directory that was causing the issue, I'd deleted the "Kerbal Space Program/prefs" file.

Edited by Mutex
Link to comment
Share on other sites

13 hours ago, steve_v said:

FWIW, crashes on scene change (esp. with TextureReplacer, dumps pthread trace into head of log file) cured by setting __GL_THREADED_OPTIMIZATIONS=0, so far anyway.

Debian GNU/Linux 8.4 x86_64, Nvidia 364.12.

This seems to have helped me have more stability. I had the value set to 1 in my startup script based off a suggestion from a few versions ago. Thanks for this!

Link to comment
Share on other sites

On 4/23/2016 at 11:42 AM, amo28 said:

Got it.

Well, I think I tracked my crashes to the Editor Extensions mod -- removing that seems to have resolved it for me.
As far as that stacktrace, a bit of Googling led me to add 'echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope' to my KSP startup script.
I didn't see the stacktrace come back the last two launches, but I'll need to keep checking I think.

Thanks for the reply Sal.

The Editor Extensions mod was not compatible with Linux.

I have a beta available for Linux if you'd like to try it: https://github.com/linuxgurugamer/EditorExtensionsRedux/releases/tag/3.2.1.10-beta

Please give feedback

Thanks

 

Link to comment
Share on other sites

14 hours ago, Babalas said:

Ha so that is how the deltav bar is drawn. I think this and the lists have a related wrong render order issue.

This is already reported in the bug tracker. (By me of course :wink:)

Some stencil error, which is a Unity bug. I'm eagerly awaiting an upgrade to Unity 5.3.whatever, where this is hopefully fixed.

Link to comment
Share on other sites

23 hours ago, Babalas said:

Ha so that is how the deltav bar is drawn. I think this and the lists have a related wrong render order issue.

 

Same issue on my Linux Mint 17.3 box. The thrust indicator bug may go away if you set KSP resolution to native display resolution. The rendering issues with the lists (e.g. when selecting craft or selecting flags at the start menu) will also disappear if the resolution is set to native display resolution. At least that's what worked for me regarding this issue.

However, these glitches are so obviuos that I wonder how much tequila the Q&A team has been consuming while running their tests ... :cool:

8 hours ago, Mat2ch said:

This is already reported in the bug tracker. (By me of course :wink:)

Some stencil error, which is a Unity bug. I'm eagerly awaiting an upgrade to Unity 5.3.whatever, where this is hopefully fixed.

If something like this is caused by the underlying framewok (e.g. Unity 5) and it's a known problem, then why release a product (KSP) that suffers from these issues? This is what I don't understand.

Edited by lodger
Link to comment
Share on other sites

On 4/21/2016 at 4:06 PM, sal_vager said:

The Unity5 stencils are broken on Linux when using fullscreen at less than the desktop resolution, windowed mode and fullscreen when matching the desktop works fine.

This results in UI elements failing to be occluded.

There's a strange behavior with my KSP 1.1 install on Ubuntu 16.04.

On my laptop screen I never see any text in the settings menus or any of the symbols in the research tree, regardless of the resolution or fullscreen vs windowed.

On my external (HDMI) screen however I do see text in any resolution while on fullscreen, but never in windowed mode.

Link to comment
Share on other sites

11 hours ago, lodger said:

If something like this is caused by the underlying framewok (e.g. Unity 5) and it's a known problem, then why release a product (KSP) that suffers from these issues? This is what I don't understand.

Well, I have the feeling that linux users are still second class, when it comes to such things. But before I want to blame someone I try to think like they did: They've never experienced the bug themselfs, they thought that this is a minor bug which happens only to a few people and they were working now for over a year on the port to Unity 5. The fix for this problem (and several other) would have been to upgrade to Unity 5.3, which could bring many more problems and there's no guarantee that it's really fixed in a newer version. Also there are workarounds or it may be annoying but still works.

3 hours ago, Fourier said:

There's a strange behavior with my KSP 1.1 install on Ubuntu 16.04.

On my laptop screen I never see any text in the settings menus or any of the symbols in the research tree, regardless of the resolution or fullscreen vs windowed.

On my external (HDMI) screen however I do see text in any resolution while on fullscreen, but never in windowed mode.

Helly Fourier, please read the last few pages of this thread, this has been discussed there.

Link to comment
Share on other sites

My two cents:

Sometimes KSP managed to freeze and crash my X server upon start. This happens because of some rare instant memory leak, so Xorg gets killed by OOM killer. To give it some other target (KSP), I've added a line to my launcher script before KSP exec, like so:

sh -c 'sleep 1 ; echo 15 > "/proc/$(pgrep KSP.x86_64)/oom_adj"' &
exec ./KSP.x86_64 ...

This should make KSP a priority target for OOM killer. Funny thing, no such freak leak happened ever since, so I do not yet know if this can really help X to walk away from it in working order.

Edited by Psycho_zs
Link to comment
Share on other sites

11 hours ago, Mat2ch said:

Well, I have the feeling that linux users are still second class, when it comes to such things. But before I want to blame someone I try to think like they did: They've never experienced the bug themselfs, they thought that this is a minor bug which happens only to a few people and they were working now for over a year on the port to Unity 5. The fix for this problem (and several other) would have been to upgrade to Unity 5.3, which could bring many more problems and there's no guarantee that it's really fixed in a newer version. Also there are workarounds or it may be annoying but still works.

Acknowledged. As I have written, for me the native-display-resoulution workaround fixes these issues so it's not like the game is unplayable for me. But it is a little disappointing that things like this happen after waiting for the new release so long. Not whining though: I'm already playing 1.1 science mode and having lots of fun with it.

Link to comment
Share on other sites

I've already sort of posted this on other threads but this is not intended as a double post !

If you have the startup crash of version 1.1.0 or 1.1.1 and the -force-glcore or similar command line options do not work then try re-installing your video driver.
My nvidia install builds a GL library and as I'd done some other upgrades I had broken the graphics.

I found it because when I tried to run my 1.0.4 install of KSP that was broken too.

Now to unzip 1.1.1 and see if I can get that running......

Link to comment
Share on other sites

My OOM killer tweak has just successfully saved my X session! Yay!

I also have a theory about freak leak: If random resolution glitch (the one which sometimes gives KSP window size around 60000x60000) occurs further in the loading, it instantly sucks all available memory trying to render anything on that behemoth. At least I glimpsed a piece of presumably giant window just after OOM killer successfully killed this thing ending a long freeze.

Edited by Psycho_zs
Link to comment
Share on other sites

Well, I have tried all kinds of fixes posted in the last few pages of this thread, read a few other threads on the issue, and Googled, and spent several hours on this, and I STILL cant get KSP to start... No changes I've tried seem to have ANY visible effects...

I even updated from Lubuntu 15.10 to 16.04 this morning... I also was using Nvidia 361.42 drivers, and I tried reverting to 340.96 in case it was an issue with the latest drivers (I have an older GT630M, and I know some of the older drivers work fine with it)

Here's the latest version of my script (which is copied from different sources above, since I dont know how to write my own):

#!/bin/bash

cd "/home/meelub/.config/unity3d/Squad/Kerbal Space Program/"
if [ -e "prefs" ];
then
  echo "File prefs exist. Deleting."
  rm prefs
fi

cd "/media/meelub/Laptop Storage/KSP/Linux/KSP v1.1.2 Linux Stock/KSP_linux"
./KSP.x86_64 -screen-fullscreen 0 -screen-width 1280 -screen-height 720 -force-glcore -force-gfx-direct
cd /home/meelub/

Here's my Prefs file:

<unity_prefs version_major="1" version_minor="1">
	<pref name="Screenmanager Is Fullscreen mode" type="int"></pref>
</unity_prefs>

And here's my Player.log:

https://drive.google.com/file/d/0B0D_PFGuuyqoNlVsWVEyeGplT0U/view?usp=sharing

Previously, @sal_vager said Xfce wasnt affected by all this? If thats the case, then I might try switching from Lubuntu to Xubuntu...

Thanx for any help anyone can provide... If I cant figure this out soon, I guess I'll just have to be stuck with 1.0.5 until Squad can get this fixed... Hopefully before KSP 2.0 releases... :(

Edited by Stone Blue
Link to comment
Share on other sites

2 hours ago, Stone Blue said:

Previously, @sal_vager said Xfce wasnt affected by all this? If thats the case, then I might try switching from Lubuntu to Xubuntu...

Thanx for any help anyone can provide... If I cant figure this out soon, I guess I'll just have to be stuck with 1.0.5 until Squad can get this fixed... Hopefully before KSP 2.0 releases... :(

Did you see the pulseaudio fix?  It's linked in the OP, but I'll paste it here for you.

Quote

Another cause of KSP failing to start is having PulseAudio installed but disabled, if you have this issue you will see this in your log.

Quote

FMOD failed to get number of drivers ... An error occured that wasn't supposed to. Contact support.

Support in this case is Unity Technologies, but there is a workaround that can be found here.

 

I mention this as guess what's in your log.

Quote

FMOD failed to get number of drivers ... An error occured that wasn't supposed to.  Contact support.

 

So it's likely you need kspflo's fix.

pulsenomore.cs

pulsenomore.x86

pulsenomore.x86_64

Quote

New day, new hack.

pulsenomore checks if Pulseaudio is running, if it is, executes the supplied program directly, otherwise loades the executable into memory, replaces "libpulse-simple.so.0" with "/dev/null", and then executes that.

It requires the memfd_create() syscall introduced in 3.17. I actually tried to provide a fallback (open() with O_TMPFILE), but the file descriptor must not be opened with write permission, or ETXTBSY is returned, when trying to execute it. If needed, one could of course write the patched file to disk, but I'll wait for someone without memfd_create() to come along first.
I disabled Pulseaudio autospawn and KSP crashed as expected. Using pulsenomore, it launches successfully.

No more setuid needed, just make it executable, and run it.

Edit:
Compile with: gcc -std=gnu99 -O2 -o pulsenomore pulsenomore.c -ldl

 

Hope this helps.

Link to comment
Share on other sites

Got another linux issue :/

OK, I'm one lucky guy because my KSP now doesn't crash at startup.

However, I now have the issue that some GUI elements are not shown. This affects the

  • - List of Savegames when clicking "Load Game" in the main menu. The list is just empty.
  • - list of logo's for your flag when starting a new Career is empty
  • - Tech tree is completely empty
  • - contract list is completely empty

This means, all dialogs where you can choose between some options are empty.A few days ago, I've read from some other guy with this issue, however, I cannot find this posting now...
 

Link to comment
Share on other sites

Hi @lugge, the Unity engine seems to be failing to detect the correct OpenGL version on the open source drivers, so uses an incompatible stencilling method.

If you start KSP with the -force-glcore command line argument it forces Unity to re-detect the OpenGL version, and specific versions can be forced with -force-glcoreXX where XX is the version.

Link to comment
Share on other sites

Any known workaround for the random crash due to double free ? It's plaguing me and seems to happen more and more often (or perhaps happen more on certain ships?)

It's really killing my interest in the game and I'd hate that! :/

 

PS: using windows is not considered a fix :wink:

Link to comment
Share on other sites

Guys, if you update to kernel 4.4 do not remove your previous kernel.

Since updating today my USB devices, including wired keyboard and mouse, are being disabled while playing KSP, I can't even toggle capslock or use reisub to reset the computer.

I'm left with no choice but to cycle the power, and so far this has not occurred with my other games or from leaving the PC idle, it has only happened in the KSP VAB/SPH.

I don't know how this is even possible, I've been scouring the Unity docs and forums and there doesn't seem to be any way to cause this, and I've seen no reports of this with Ubuntu 16.04 yet.

But if it happens to you, try using the previous kernel via grub, I did not have this issue before updating.

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