Jump to content

[Linux][1.2] Game freezes


Recommended Posts

I'm experiencing game freezes since 1.2. I can play for about 5 to 30 minutes and suddenly the game freezes. I can still move the mouse around, but cannot do any action in game. I can switch windows to my OS and the system is working normally. The only way to exit KSP is to kill the process.

I'm thinking that maybe it is related to run it under XWayland.

My system is:

  • KSP x86_64 1.2.0 Build ID 01586 running from Steam.
  • OS: Fedora 25 x86_64
  • Radeon HD 6870 with radeon driver.
  • Gnome wayland session.

These are the logs of a vanilla KSP installation, playing the scenario of Jool aerobreaking. When the ship exploded in the Jool atmosphere, the game freezed:

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

Link to comment
Share on other sites

Hi @miceliux, according to the Unity3D roadmap there has been no progress so far on supporting alternative display managers, "Standalone: Support for alternative display managers Wayland and Mir on desktop Linux." probably also includes XWayland as it is an X server running as a Wayland client, and its status is grey (not started), though it was the focus of a hackweek in May, that is different to mainline development.

Until we hear otherwise we have to assume only X11 is supported at this time.

Your logs look normal except for multiple attempts to change the screen resolution to 1920 x 1016, then resorting to 1920 x 1080, I assume due to your taskbar(s) leaving less vertical space for the KSP window.

You might have to run KSP in a true X11 environment for the time being.

Link to comment
Share on other sites

It should work, it's working here on Xubuntu 16.04, though some window managers have trouble with Unity requesting bad sizes and crashing X when KSP starts, and as you didn't mention it I assume that didn't occur with XWayland.

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

Hi,

it seems that I have the same behavior. I've just installed KSP on Linux through Steam and noticed the exact same thing (freeze with mouse still moving). Running through strace I can see a syscall to futex() blocking. It *seems* that toggling “sync to vblank” to off fixes the issue for me. Unfortunately, it seems that this setting is never saved, I need to re-set it everytime. It might be related to the fact that KSP segfaults at exit, so maybe the settings aren't properly saved (although SYNC_VBL is set to False in settings.cfg).

Here are the information on my setup:

  • KSP 1.2.2.1622(LinuxPlayer) installed through Steam
  • Linux Debian (sid) x86_64 (doesn't matter if I run KSP.x86 through Steam or KSP.x86_64 through Steam or directly)
  • Intel graphics with i915 module and modesetting X11 driver
  • Xfce desktop environment (sync to vblank enabled in xfwm4 settings)

If you need something more, please ask.

In the end it looks to me like a vblank issue

  • it'd be nice to fix it but maybe there's not much which can be done in KSP (might depend on Unity3D or the graphics stack)
  • in any case, beeing able to save the setting and have it correctly applied would be nice
Link to comment
Share on other sites

3 hours ago, Corsac said:

In the end it looks to me like a vblank issue

  • it'd be nice to fix it but maybe there's not much which can be done in KSP (might depend on Unity3D or the graphics stack)
  • in any case, beeing able to save the setting and have it correctly applied would be nice

I'm not sure where it is in the Steam install (from the store it is in the KSP_linux folder), but find your settings.cfg and first make a backup of it somewhere safe. Next open it in a text editor and find the line SYNC_VBL = 1 and change it to SYNC_VBL = 0 then save. Hopefully this will "stick."

Edit: as a non-scientific side note I have a much better experience in Linux running KSP in fullscreen mode. Windowed mode has been a little less flaky in recent versions, but I stick to fullscreen and have had a very stable game.

Edited by Waxing_Kibbous
Link to comment
Share on other sites

Thanks everyone for your inputs

9 hours ago, Waxing_Kibbous said:

I'm not sure where it is in the Steam install (from the store it is in the KSP_linux folder), but find your settings.cfg and first make a backup of it somewhere safe. Next open it in a text editor and find the line SYNC_VBL = 1 and change it to SYNC_VBL = 0 then save. Hopefully this will "stick."

Edit: as a non-scientific side note I have a much better experience in Linux running KSP in fullscreen mode. Windowed mode has been a little less flaky in recent versions, but I stick to fullscreen and have had a very stable game.

I run in fullscreen. Under steam, the settings.cfg file is located in ~/.local/share/Steam/SteamApps/common/Kerbal Space Program/settings.cfg but as I said in my initial post, SYNC_VBL is already set to 0 in that file, but in-game it's apparently reset to true in the UI.

4 hours ago, Veeyawn said:

I did find another thread on another forum that suggested adding this to the Launch Options: LIBGL_DRI3_DISABLE=1 %command%_64 -force-glcore 

So far, this has solved it for me!

V

I'll try that and report back, thanks.

1 hour ago, sal_vager said:

@Veeyawn, @Corsac, is your OS set to a language other than English?

KSP runs in english, but current locales are a bit convoluted (everything French except the UI set to English):

LANG=fr_FR.utf8
LANGUAGE=
LC_CTYPE="fr_FR.utf8"
LC_NUMERIC="fr_FR.utf8"
LC_TIME="fr_FR.utf8"
LC_COLLATE="fr_FR.utf8"
LC_MONETARY="fr_FR.utf8"
LC_MESSAGES=en_US.UTF-8
LC_PAPER="fr_FR.utf8"
LC_NAME="fr_FR.utf8"
LC_ADDRESS="fr_FR.utf8"
LC_TELEPHONE="fr_FR.utf8"
LC_MEASUREMENT="fr_FR.utf8"
LC_IDENTIFICATION="fr_FR.utf8"
LC_ALL=

I can try running with LANG=C in case KSP is confused with a different locale for LANG and LC_MESSAGE.

Link to comment
Share on other sites

10 minutes ago, Corsac said:

I can try running with LANG=C in case KSP is confused with a different locale for LANG and LC_MESSAGE.

That is likely the case, it seems that a Unity update has broken the locale settings, it's meant to ignore the OS localization, so we need to force KSP to use English or the Posix standard again.

That would also explain why your settings are not saving.

Link to comment
Share on other sites

42 minutes ago, sal_vager said:

That is likely the case, it seems that a Unity update has broken the locale settings, it's meant to ignore the OS localization, so we need to force KSP to use English or the Posix standard again.

That would also explain why your settings are not saving.

I've just tried running with updated locales:

LANG=C KSP.x86_64

With only LANG set (and thus LC_MESSAGES=fr_FR.UTF-8) the settings are not correctly loaded (vblank is enabled in the settings UI even if SYNC_VBL=0) and I can't even apply the settings in the UI, so there's definitely something fishy. KSP still crashes at exit

LANG=C LC_MESSAGES= KSP.x86_64

With LANG=C and LC_MESSAGES reset, it seems that the settings are correctly loaded (vblank is disabled in the settings UI). KSP still crashes at exit.

Thanks for the help about the settings, I'll update the launch command in Steam. I'll also investigate the other leads (enabling sync to blank with LIBGL_DRI3_DISABLE). By the way is there some place where the environment variable and command lines options are documented?

Link to comment
Share on other sites

You might have more luck with LC_ALL=C as that will also handle the inversion of comma and period in the settings file.

You can find all the documented command line options here, the environment variables should be the same for all Linux distros.

Link to comment
Share on other sites

8 minutes ago, Veeyawn said:

@sal_vager nope, I'm in the US and OS is set to English.

Okay it sounds like your issues are not related, the Unity engine can misdetect your version of OpenGL though which is why using -force-glcore helps (forces re-detection), if this happens again please upload your Player and KSP logs for me.

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