Jump to content

Fully Optimize KSP?


Recommended Posts

Hi,

I run KSP 1.2 prerelease on Ubuntu 14.04. I've followed every guide I can to increase my FPS, lowered every setting to the lowest it can be, (My computer is a lemon. Don't even ask!) and have it running as smooth as I possibly could get it to be. The problem is planet terrain. Say I have a ship in orbit around Kerbin and I rotate my camera to face space. Everything runs great. But say I rotate to face Kerbin. Everything starts to run slow and laggy. I've lowered my Rendering to Fastest, my Textures to Eight Res, and even created a custom Terrain Preset, "Lowest", where all minDistances = 3. I am wondering if the terrain detail is what is screwing with me though. Whenever I restart KSP, it defaults to "High." Stupid question, but could this mean that KSP is possibly rendering terrain using the High Preset even when it is set to Low or Lowest? I've also noticed that KSP still creates a log file, even when I turn on the "Do not create log" option in the launcher. Other than that, if anyone has any tips to increasing my FPS, mainly while at Kerbin, any help would be appreciated. This same problem occurs in older versions of KSP (so it's not just because of 1.2), and I've already tried redownloading the stock files multiple times. I can attach my settings.cfg file if needed.

 

Ty

ETPOF

Edited by ETPOF
Link to comment
Share on other sites

Ah.

For one, yes, perhaps your setup has an OS problem in which KSP is failing to recall the terrain preset and sticking itself on "High." Make sure you have the proper permissions set up for the files in the KSP installation folder. I don't know how it works on Linux (sorry), but on Windows it's common for the OS to mark certain folders for access only by Administrators or certain special programs, in which case a game like KSP might be unable to access the files for reading.

Also, not to be insulting but please double check that you're actually running the KSP executable that corresponds to the settings.cfg you edited. Perhaps you have a shortcut pointing to the wrong place or whatever. It's an easier mistake than it seems (I've done it myself).

And yes, please do post your settings.cfg. I can't speak for the other settings, but it's possible KSP is having trouble if your custom preset has a problem with brackets or something.

Link to comment
Share on other sites

3 hours ago, parameciumkid said:

I don't know how it works on Linux (sorry), but on Windows it's common for the OS to mark certain folders for access only by Administrators or certain special programs, in which case a game like KSP might be unable to access the files for reading.

The entire KSP directory should be owned by, and read/write for, your normal user. The OS won't do it by itself, but If you have executed KSP as root (or some other user) at any point, the settings file may have aquired incorrect permissions.
A quick check would be to do 'find ./ ! -readable -or ! -writable' in your KSP directory - it'll list files you can't read or can't write. Check permissions on the parent 'KSP_linux' folder too.

This is assuming you have KSP in your home directory, and that is on a GNU/Linux native filesystem... things may get funny if you try to run it from, say, an NTFS drive shared with Windows.

 

9 hours ago, ETPOF said:

I can attach my settings.cfg file if needed.

Yeah, do that.
Your Player.log could be useful too, If you have file permission issues you'll see something like 'UnauthorizedAccessException: Access to the path "KSP_linux/settings.cfg" is denied.'
Just in case there's something amiss with the syntax in your settings file, do changes made in the settings menu stick if you move the file out of the way and let KSP create a new one?

Edited by steve_v
Link to comment
Share on other sites

Thanks for the quick replies!

10 hours ago, steve_v said:

The entire KSP directory should be owned by, and read/write for, your normal user. The OS won't do it by itself, but If you have executed KSP as root (or some other user) at any point, the settings file may have aquired incorrect permissions.
A quick check would be to do 'find ./ ! -readable -or ! -writable' in your KSP directory - it'll list files you can't read or can't write. Check permissions on the parent 'KSP_linux' folder too.

This is assuming you have KSP in your home directory, and that is on a GNU/Linux native filesystem... things may get funny if you try to run it from, say, an NTFS drive shared with Windows.

 

Yeah, do that.
Your Player.log could be useful too, If you have file permission issues you'll see something like 'UnauthorizedAccessException: Access to the path "KSP_linux/settings.cfg" is denied.'
Just in case there's something amiss with the syntax in your settings file, do changes made in the settings menu stick if you move the file out of the way and let KSP create a new one?

Both the KSP_linux folder and settings.cfg have permissions to Read and Write/Create and Delete Files for all users (might be a bit overkill, but whatever helps. I'm the only user on this computer anyway).

I ran the commands you suggested and got this:

For find ./ ! -writable:
./.config/google-chrome/SingletonLock
./.config/google-chrome/SingletonCookie
./.config/pulse/default.pa

For find ./ ! -readable:
./.config/google-chrome/SingletonLock
./.config/google-chrome/SingletonCookie

Nothing to do with KSP I assume.

 

I opened KSP after moving the settings.cfg file to my desktop, changed a few settings in the new file for "testing purposes," and attached my KSP.log (I'm guessing that's the same as the Player.log you mentioned? I don't have one of those in my KSP folder) and new settings.cfg file as well as the old settings.cfg file to Dropbox here. I don't use Dropbox much, so I hope I did this right! All changes in both the new and old settings config stick, excepting the terrain detail. I'm also unsure of why KSP is still creating a log, even when I disable it in the launcher.

13 hours ago, parameciumkid said:

Ah.

For one, yes, perhaps your setup has an OS problem in which KSP is failing to recall the terrain preset and sticking itself on "High." Make sure you have the proper permissions set up for the files in the KSP installation folder. I don't know how it works on Linux (sorry), but on Windows it's common for the OS to mark certain folders for access only by Administrators or certain special programs, in which case a game like KSP might be unable to access the files for reading.

Also, not to be insulting but please double check that you're actually running the KSP executable that corresponds to the settings.cfg you edited. Perhaps you have a shortcut pointing to the wrong place or whatever. It's an easier mistake than it seems (I've done it myself).

And yes, please do post your settings.cfg. I can't speak for the other settings, but it's possible KSP is having trouble if your custom preset has a problem with brackets or something.

Not insulted at all! Will listen to anything that might help. I run KSP.x86 instead of the executable because I'm on Linux. I assume that this is linked to my settings.cfg because all other settings do change and stick. This is evident in the game and config file. It's only the terrain detail and "Do not produce log" options that I'm having trouble with. I'm looking to increase my FPS by not creating a log and I want to lower the terrain detail for this same purpose. Instead, KSP resets my terrain detail to high and still creates a log, even when the "Do not produce log" setting is turned on. However, if I, for example, change my rendering from Fantastic to Fastest, it sticks and I can see the change in my FPS and the config file. As for bracket issues, it is very possible, but even the low and default terrain presets end up resetting to high. I've even tried coping the low preset's values and pasting them in place of the high preset values. It still resets to high and also resets the high preset's values.

Just another thought: I've been trying to change the settings manually as well. In my settings.cfg, I've changed the "preset" value under terrain to Low, but KSP resets this on the game's restart. This is evidence that KSP can, in fact, read and write its files, or at least the settings.cfg, correct?

Link to comment
Share on other sites

3 hours ago, ETPOF said:

attached my KSP.log (I'm guessing that's the same as the Player.log you mentioned?

There are 2 log files - KSP.log and the more verbose ~/.config/unity3d/Squad/Kerbal Space Program/Player.log. I usually symlink it to the game directory for convenience.

3 hours ago, ETPOF said:

I'm also unsure of why KSP is still creating a log, even when I disable it in the launcher

That setting should affect Player.log, unsure on KSP.log as I never really look at it.

3 hours ago, ETPOF said:

I run KSP.x86

32bit OS?

3 hours ago, ETPOF said:

I've changed the "preset" value under terrain to Low, but KSP resets this on the game's restart. This is evidence that KSP can, in fact, read and write its files, or at least the settings.cfg, correct?

I'd say it is, not sure why KSP is resetting those... you could perhaps change it in the settings file, write-protect it, and look for a change in in-game detail.
Might have a play with this later, I'm not sure I've ever used the "low" preset myself, but AFAIK it used to work.

Link to comment
Share on other sites

6 hours ago, Kerbal101 said:

Upgrade the GPU. Old outdated hardware may still be powerfull enough to run KSP. Chips like 4850, 4870, 5850, 5870,  nvidia 460, 470 will cost like $30-20 and will run KSP at high.

I'd prefer to use the GPU I have now, only because I know that my computer can handle the game at low settings. It would probably be easier to solve the Terrain Detail problem. I'm not picky about graphics. Just don't make it look like an old arcade game! XD

19 hours ago, steve_v said:

There are 2 log files - KSP.log and the more verbose ~/.config/unity3d/Squad/Kerbal Space Program/Player.log. I usually symlink it to the game directory for convenience.

That setting should affect Player.log, unsure on KSP.log as I never really look at it.

32bit OS?

I'd say it is, not sure why KSP is resetting those... you could perhaps change it in the settings file, write-protect it, and look for a change in in-game detail.
Might have a play with this later, I'm not sure I've ever used the "low" preset myself, but AFAIK it used to work.

Ah. I see it. Assumed you meant the KSP.log because I've never actually noticed it until I changed the log settings. And no, I have a 64 bit OS. Meant to add _64. My bad. Anyway, I think I've actually gotten somewhere. I still have no idea what is causing the problem, but I loaded KSP once with Read Only permissions on the settings.cfg file and looked in the log. Sure enough, it said:

UnauthorizedAccessException: Access to the path "/home/etpof/Desktop/KSP_linux/settings.cfg" is denied.

I changed the permissions back to Read and Write and the changes seemed to stick in the KSP settings menu again. Problem is, its still obviously rendering at high terrain detail. If it helps, I've noticed that the terrain detail setting in the Launcher doesn't stick. For example, when I move the slider down to Low terrain detail, click accept, and look back in the settings, I can see that it automatically reset it to High. I can set it to Default without it being reset, but I'd like to use Low detail if possible. With read and write permissions on, I can't find any UnauthorizedAccessException errors in my Player.log, and enabling Read Only permissions on the settings file denies KSP access. (I guess KSP needs to be able to read AND write in the settings file to access it at all?). This is all I know so far. Will be playing around to see what I can find. Thanks!

Link to comment
Share on other sites

6 minutes ago, Kerbal101 said:

$ chmod u+rw -R /home/etpof/Desktop/KSP_linux

I'm not too advanced in the terminal, but this command recursively changes the permissions to read and write for my KSP files, correct? I ran this and the terrain detail still resets to high, so I'm guessing that the problem is beyond my game files.

Edited by ETPOF
Link to comment
Share on other sites

3 minutes ago, ETPOF said:

I'm not too advanced in the terminal, but this command recursively changes the permissions to read and write for my KSP files, correct? I ran this and the terrain detail still resets to high.

Yes, its $(as user) CHangeMODebits(permissions)   (for)User+(add)Read/Write -Recursive (...path...)

it adds read/write to all files and directories that you own in specified directory and below (recursive).
You might also check and run the same on

~/.config/unity3d

Which contains settings file. These should also be RW for owner.

Link to comment
Share on other sites

2 minutes ago, Kerbal101 said:

Yes, its $(as user) CHangeMODebits(permissions)   (for)User+(add)Read/Write -Recursive (...path...)

it adds read/write to all files and directories that you own in specified directory and below (recursive).
You might also check and run the same on

~/.config/unity3d

Which contains settings file. These should also be RW for owner.

I ran this on my unity3d folder and, unfortunately, my terrain detail is still reset. Now I'm just plain clueless as what to do.

Link to comment
Share on other sites

Just now, ETPOF said:

I ran this on my unity3d folder and, unfortunately, my terrain detail is still reset. Now I'm just plain clueless as what to do.

Oh! OH!
I missed this one: "I run KSP 1.2 prerelease on Ubuntu 14.04"
Prerelease means you are using Steam version?

 

If you run Steam, then KSP is elsewhere:

~/Steam/SteamApps/common/Kerbal Space Program

~/.local/share/Steam/SteamApps/common/Kerbal Space Program

 

feed this into chmod:

chmod u+rw -R "/home/etpof/Steam/SteamApps/common/Kerbal Space Program"

chmod u+rw -R "/home/etpof/.local/share/Steam/SteamApps/common/Kerbal Space Program"

Link to comment
Share on other sites

2 minutes ago, Kerbal101 said:

Oh! OH!
I missed this one: "I run KSP 1.2 prerelease on Ubuntu 14.04"
Prerelease means you are using Steam version?

 

If you run Steam, then KSP is elsewhere:

~/Steam/SteamApps/common/Kerbal Space Program

~/.local/share/Steam/SteamApps/common/Kerbal Space Program

 

feed this into chmod:

chmod u+rw -R "/home/etpof/Steam/SteamApps/common/Kerbal Space Program"

chmod u+rw -R "/home/etpof/.local/share/Steam/SteamApps/common/Kerbal Space Program"

Unfortunately again, I use the prerelease that I downloaded off KSP's website. I wish it was that simple! 

Link to comment
Share on other sites

Why is

"UnauthorizedAccessException: Access to the path "/home/etpof/Desktop/KSP_linux/settings.cfg" is denied."

it searching for settings.cfg in "/Desktop/KSP_linux", when this file should be in "/home/etpof/Steam/SteamApps/common/Kerbal Space Program" if you run Steam?

 

If you purchased the game from Squad Website (I have no idea if they release 1.2pre via that channel, but if they do that), this could be also the issue.

1 minute ago, ETPOF said:

Unfortunately again, I use the prerelease that I downloaded off KSP's website. I wish it was that simple! 

I hereby cast thou the mighty @sal_vager in this thread!

It does seem to be either a bug, or a website 1.2pre problem, or perhaps an issue with your graphics card or even driver (make sure to upgrade to Mesa 12, if you use open driver).

Link to comment
Share on other sites

14 minutes ago, Kerbal101 said:

It does seem to be either a bug, or a website 1.2pre problem, or perhaps an issue with your graphics card or even driver (make sure to upgrade to Mesa 12, if you use open driver).

Will try updating my graphics card. Never actually done that before as I haven't had the need to until now. Where should I start? :P 

It could be a bug, but if so, then it is evident in the past two versions of KSP as well (I tried using those to solve this, but neither worked).

Edited by ETPOF
Link to comment
Share on other sites

46 minutes ago, ETPOF said:

Will try updating my graphics card. Never actually done that before as I haven't had the need to until now. Where should I start? :P 

It could be a bug, but if so, then it is evident in the past two versions of KSP as well (I tried using those to solve this, but neither worked).

Depending on your card, the driver could be quite different. Which card do you use?
Also, which versions do you mean? The 1.0.x and 1.1.0-1.2 are quite different.

Link to comment
Share on other sites

2 minutes ago, Kerbal101 said:

Depending on your card, the driver could be quite different. Which card do you use?
Also, which versions do you mean? The 1.0.x and 1.1.0-1.2 are quite different.

Should be versions 1.0.5 and 1.1.0 if I remember correctly. And it think its an Intel Haswell Mobile card. Least that's what it says under my graphics specifications in "About this Computer," so hopefully that's what we're looking for.

Link to comment
Share on other sites

2 minutes ago, ETPOF said:

Should be versions 1.0.5 and 1.1.0 if I remember correctly. And it think its an Intel Haswell Mobile card. Least that's what it says under my graphics specifications in "About this Computer," so hopefully that's what we're looking for.

Yes, you are using Mesa.

I suggest that you move to 16.04 LTS and make sure to dist-upgrade it to the end, if you prefer to stay within Ubuntu.

You can add Oibaf PPA for cutting edge stack. 14.04 graphics stack is very old.

Link to comment
Share on other sites

14 hours ago, Kerbal101 said:

Why is

"UnauthorizedAccessException: Access to the path "/home/etpof/Desktop/KSP_linux/settings.cfg" is denied."

it searching for settings.cfg in "/Desktop/KSP_linux", when this file should be in "/home/etpof/Steam/SteamApps/common/Kerbal Space Program" if you run Steam?

 

If you purchased the game from Squad Website (I have no idea if they release 1.2pre via that channel, but if they do that), this could be also the issue.

I hereby cast thou the mighty @sal_vager in this thread!

It does seem to be either a bug, or a website 1.2pre problem, or perhaps an issue with your graphics card or even driver (make sure to upgrade to Mesa 12, if you use open driver).

Are you starting KSP from Steam, or from the KSP.x86 directy? As this looks like it's being started via a desktop shortcut that is not setting the working directory.

Link to comment
Share on other sites

15 hours ago, Kerbal101 said:

Yes, you are using Mesa.

I suggest that you move to 16.04 LTS and make sure to dist-upgrade it to the end, if you prefer to stay within Ubuntu.

You can add Oibaf PPA for cutting edge stack. 14.04 graphics stack is very old.

Updated to 16.04 LTS, ran dist-upgrade, and added Oibaf. Seems to be running better now, but Low terrain detail is still being reset to High in the Launcher, so I'm guessing that if it is set to Low, it will render at high still. Right now, I've been using the Default preset (this preset isn't reset to High) and it seems to run better. I still want to figure out what's going on with the Low preset though, in case it's a bug or a problem with my graphics card. I ran glxinfo | grep "OpenGL version" and it said I have OpenGL 3.0 and Mesa 12.1.0, so both of those are updated.

2 hours ago, sal_vager said:

Are you starting KSP from Steam, or from the KSP.x86 directy? As this looks like it's being started via a desktop shortcut that is not setting the working directory.

I'm starting KSP from the KSP.x86_64 file in my KSP_linux folder (not the Steam version), which is on my desktop. Same with the Launcher. I don't have any shortcuts.

Edited by ETPOF
Link to comment
Share on other sites

5 hours ago, ETPOF said:

I'm starting KSP from the KSP.x86_64 file in my KSP_linux folder (not the Steam version), which is on my desktop. Same with the Launcher. I don't have any shortcuts.

Not sure about Linux but in Windows the permissions are weird on the desktop and can cause problems.

Link to comment
Share on other sites

1 hour ago, ETPOF said:

Moved KSP to my home folder and the problem still persists.

If the terrain detail settings is the only thing that resets, the other things in settings do not reset, then its probably has to do with the graphics driver.

You can manually edit the terrain detail profile and just set everything in "high" to same values as "low". http://forum.kerbalspaceprogram.com/index.php?/topic/39814-default-terrain-quality-without-most-of-the-lag/

Link to comment
Share on other sites

On 10/9/2016 at 1:21 PM, Kerbal101 said:

If the terrain detail settings is the only thing that resets, the other things in settings do not reset, then its probably has to do with the graphics driver.

You can manually edit the terrain detail profile and just set everything in "high" to same values as "low". http://forum.kerbalspaceprogram.com/index.php?/topic/39814-default-terrain-quality-without-most-of-the-lag/

I copied everything from "PLANET" (beginning with Kerbin, of course) to the end bracket before the next "PRESET" (Default) and pasted it in the place of the values for Default and High. I'm still not able to change the setting to Low, but after loading KSP, this solution seems to work perfectly. I had actually tried this before, but the values would be reset upon starting KSP. Who knows what happened then. The only difference between when I tried the first time, was that I was in the Unity desktop environment in 14.04. now, I'm running xfce in 16.06. Could've been a combination of bracket and graphics driver issues, or just one of those. If anyone wants to dig into this issue more to find out if not being able to change the detail to "Low" in the first place is a bug or something, I'll be here, but this solution seems to be a good work-around for the moment. Thanks to all who helped!

Link to comment
Share on other sites

@ETPOF
Its important to remark whether - all settings would reset or just terrain.
If all settings reset, then this has to do with permissions, as the KSP folder (with settings.cfg) should be writable to the one who runs KSP (your user).
If just terrain resets, then it has something to do with driver.

There are few things: first, you don't have to replace the values, but just create a new block. You can also backup the file and create your own with only single preset.

Regarding brackets, most of the text editors (kwrite, gedit etc) have extensive syntax highlighting. If you turn it on with something that has brackets, like set it to "Programming languages/C", then you will be able to collapse all the brackets and copy paste them accurately.


Nevertheless, I am glad that you can finally enjoy the game!

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