Jump to content

The Linux Thread!


Recommended Posts

Kmarti, can you re-install, the log looks like it's missing a file.

[EXC 20:19:56.057] NullReferenceException

UnityEngine.Component.get_gameObject ()

GenericAppFrame.OnDestroy ()

Also please try without optimus.

jtaylor996 can you post your game logs please, pop your KSP and Player log on hastebin.com and I'll have a look.

Link to comment
Share on other sites

how do I use this LC_ALL=C ./KSP.x86? I tried do paste the full path of the KSP and even that dont work.

this linux ubintu is really frustrating, please, explain like I'm a dumb

edit: it says "no such file or directory"

Edited by Ricardo.b
Link to comment
Share on other sites

Getting a crash randomly in editor logs. From what i can see it has something to do with using the edge highlighting?

Edge highlighting is broken (or at least with regard to fglrx, says your log), is it turned off as it should be?

how do I use this LC_ALL=C ./KSP.x86? I tried do paste the full path of the KSP and even that dont work.

this linux ubintu is really frustrating, please, explain like I'm a dumb

edit: it says "no such file or directory"

You "tried do paste the full path of the KSP" into what, exactly? a console?

What directory are you in when you execute that command: pwd

If you are in a terminal/shell opened from the desktop menu etc. you'll probably be in /home/<username>, you want: cd <where KSP is installed> first. Or set "working directory" on your shortcut thingy / in a script.

Funny things happen if you run KSP.x86[_64] from outside the installation directory, i.e. from home with full path to the executable.

Edited by steve_v
Link to comment
Share on other sites

It shouldn't be needed anymore for KSP.x86, as it's built-in now, but it's not built into the KSP.x86_64

Opening a terminal in the KSP game folder is probably easiest, as the full path will be there, try right clicking the space around the files in your file browser, some browsers have the option to open a terminal in the "File" options, I can't remember what version of Linux you went for so can't look up the exact method.

Another really easy way is with a script in your KSP folder, you need a text file containing lines like this:


#!/bin/bash
LC_ALL=C ./KSP.x86_64

Or if you want your script elsewhere, add a line to set the path just as steve_v says, like this:


#!/bin/bash
cd "/home/user/.local/share/Steam/SteamApps/common/Kerbal Space Program/"
LC_ALL=C ./KSP.x86_64

You'll have to edit that cd line to the path to your game.

Right click the file and edit the properties, find the "Permissions" tab and click the box where it says to make the file executable.

Link to comment
Share on other sites

It shouldn't be needed anymore for KSP.x86, as it's built-in now, but it's not built into the KSP.x86_64

Opening a terminal in the KSP game folder is probably easiest, as the full path will be there, try right clicking the space around the files in your file browser, some browsers have the option to open a terminal in the "File" options, I can't remember what version of Linux you went for so can't look up the exact method.

Another really easy way is with a script in your KSP folder, you need a text file containing lines like this:


#!/bin/bash
LC_ALL=C ./KSP.x86_64

Or if you want your script elsewhere, add a line to set the path just as steve_v says, like this:


#!/bin/bash
cd "/home/user/.local/share/Steam/SteamApps/common/Kerbal Space Program/"
LC_ALL=C ./KSP.x86_64

You'll have to edit that cd line to the path to your game.

Right click the file and edit the properties, find the "Permissions" tab and click the box where it says to make the file executable.

Thanks! but, this text file you say is just a .txt? I must run from there so? sorry to be so stupid, but I never touched linux before and I'm goin into this just for KSP.

my full path is this: /home/ricardo/Documentos/KSP/KSP_Linux_1.0.4

and I currently running this configuration:

Ubuntu 14.04 LTS

Memory 15.6Gib

processor: Intel® Core™ i7-4770 CPU @ 3.40GHz × 8

graphics: GeForce GTX 660/PCIe/SSE2

Os type: 64-bit

take a look:

h3pBWuh.png

I'm not familiar with this command (and basically all linux commands), but I suspect that C is for C drive and my OS is not installed in C:/

Link to comment
Share on other sites

The executable is not in "/home/ricardo/Documentos/KSP/", as the error message states. Again: 'LC_ALL=C ./KSP.x86_64' must be run from the directory containing the KSP.x86_64 binary, Try /home/ricardo/Documentos/KSP/KSP_Linux_1.0.4.

There is no "C:\" in *nix, there is only "/". Forget everything you know from Windows.

Link to comment
Share on other sites

The executable is not in "/home/ricardo/Documentos/KSP/", as the error message states. Again: 'LC_ALL=C ./KSP.x86_64' must be run from the directory containing the KSP.x86_64 binary, Try /home/ricardo/Documentos/KSP/KSP_Linux_1.0.4.

There is no "C:\" in *nix, there is only "/". Forget everything you know from Windows.

LOL, I told you I'm stupid. forgetting the last folder. working now, thanks!!!

- - - Updated - - -

the ls command will get you a directory listing, that will help you know if a file is where you expect.

nice tip, thanks

Link to comment
Share on other sites

I was getting sick of having to manually clear the ram cache every time KSP crashed.

adding this line to the KSP.sh script does it automatically before starting KSP:

sync && echo 3 | sudo tee /proc/sys/vm/drop_caches

:)

#!/bin/sh

sync && echo 3 | sudo tee /proc/sys/vm/drop_caches


export LC_ALL=C
export LD_PRELOAD="libpthread.so.0 libGL.so.1"
export __GL_THREADED_OPTIMIZATIONS=1
exec taskset -c 2-3 ./KSP.x86_64

Link to comment
Share on other sites

And you would want to drop the filesystem cache (thereby increasing load times) why?

Disk cache is freed as needed, you should be able to leave it alone.

It seems to create more stability. When the game starts out using 8gb and crashes at 16gb, then leaves 7gb in the cache it seems that crashes happen much faster without clearing the cache.

Link to comment
Share on other sites

It seems to create more stability. When the game starts out using 8gb and crashes at 16gb, then leaves 7gb in the cache it seems that crashes happen much faster without clearing the cache.
You're referring to the CTD with "Attempting to use memory addresses from more than 16GB" (or something to that effect), no?

That's an odd one, I have no idea what's causing it as there's nothing special about addresses >16GB as far as the OS is concerned.

Also, going from 8GB -> 16GB over what period? that's a pretty big memory leak to me. ;)

As for dropping the disk cache, got anything (data) beyond "seems to create more stability"? KSP shouldn't even be aware of what the kernel does with it's memory allocations. Then again, Unity is a strange beast, if it's truly the case that the amount of free physical RAM impacts stability that could be an interesting lead.

Edited by steve_v
Link to comment
Share on other sites

You're referring to the CTD with "Attempting to use memory addresses from more than 16GB" (or something to that effect), no?

That's an odd one, I have no idea what's causing it as there's nothing special about addresses >16GB as far as the OS is concerned.

Also, going from 8GB -> 16GB over what period? that's a pretty big memory leak to me. ;)

As for dropping the disk cache, got anything (data) beyond "seems to create more stability"? KSP shouldn't even be aware of what the kernel does with it's memory allocations. Then again, Unity is a strange beast, if it's truly the case that the amount of free physical RAM impacts stability that could be an interesting lead.

That is what I am referring to. To be honest, it might be more like 8GB -> 12GB then CTD. Either way I am always getting the "Attempting ... 16GB". I don't have any data to verify that freeing the memory makes KSP more stable. It could very well be my imagination. However, once KSP starts to CTD it keeps doing it more and more frequently until I free the memory. That usually gives me a longer time between CTDs. As for that time period it is variable, anywhere from a few minutes to an hour.

Link to comment
Share on other sites

  • 3 weeks later...

So this code posted in post #271, it seems this is written for 0.90 so can anyone rewrite it for 1.0.4?

I see some things obviously not needed anymore in my view, but I'm not totally sure about it so I'd rather let somebody who has a better idea handle it for me.

I seem to be getting this issue written in the post (entire virtual machine crashes while loading) so I want to try out this fix.

Although it's not exactly as described in that post, as I get some other strange issues than just crashing to desktop too. Which is,

1. The text in the loading screen suddenly turns into boxes filled in with the text's original color (this happens mid loading, before it starts happening the text is normal) and entire KSP window glitching out into black and white.

2. Entire desktop overlay disappearing leaving only the windows open and the desktop wallpaper in the background. When the text glitch occurs, they also had texture glitches with Valentina's helm interior going all white.

I also had once the whole virtual machine's screen go white and eventually crash the virtual machine itself. While that was happening, the cursor was showing properly and changing to KSP cursor when I mouse overed the KSP window's position, so it seemed the machine was still running in the background until it finally crashed.

I'll have a picture representing the issue below.

d2albdgkekn6wbi6g.jpg

Now the issue is getting even weirder as I'm trying to reproduce and capture it in screenshots. Previously in the KSP main menu I had the same boxes as I had in the loading screen, in the positions where text is usually located. Now it's gone completely...

I'll have that pic posted too.

381w8kxekg3v18j6g.jpg

mwc0ndk24l55lo06g.jpg

Also before the desktop toolbar disappears, the KSP icon has some texture issues too.

m5qyz6c5jcycq6q6g.jpg

For reference, I'm using Ubuntu14.04LTS on VMware Player. I launched KSP through clicking on the KSP.x86_64 icon.

It might be the same issue as post #271, it might not be. Whichever it is, I want to try out the fix and see.

Also if anyone has any other idea about what this issue might be all about, please give me some advice. I'm new to Linux and don't know much about it...

Link to comment
Share on other sites

So this code posted in post #271, it seems this is written for 0.90 so can anyone rewrite it for 1.0.4?

if [ $PATCH_090 -eq 1 ]; then
echo "0099e747: 00" | xxd -r - KSP.x86_64
echo "0099e74c: 00" | xxd -r - KSP.x86_64
fi

This bit probably isn't needed any more, and since it directly modifies the binary I'd advise caution with it. I don't have any issues without that patch so just comment it out.

Everything else in that script is pretty generic, and should work fine with the current version.

I've never mucked with VMware, as it's not open-source and I dislike VMware for... other reasons.

That said, your problems are most likely due to the virtualised GPU in the VM - this is what the forced disable of AA in that script is intended to fix, so give it a shot.

You'll probably want to set up your guest OS with a window manager/DE that doesn't use OpenGL (e.g. XFCE) too.

Link to comment
Share on other sites

Okay, I'll try that out. Thanks :)

And one more, you said you don't like VM ware so if you use something else that's better in your perspective, please tell me what that is. I'm just using VM cuz I don't know anything else.

EDIT: If you could tell me how to make this script runnable via double click, that would be nice. I can paste it inside a newly created file and check make executable, but it still just opens the content when I double click, and the file type remains shell script...

Edited by ebigunso
Link to comment
Share on other sites

I use VirtualBox and QEMU about 50/50. But not for games, as games in any VM suck hard, IME.

Running the script via "double click" - dunno, depends entirely on your desktop environment / file manager. I don't use Ubuntu (And I tend to run everything from a terminal anyway ;)) but:

"Allow executing file as program" on the permissions tab at the properties window.
Is from Ubuntu 14.04... so maybe?

You could perhaps change the file association to open with '/bin/sh'... but again, depends on your DE.

- - - Updated - - -

OTOH, quick use of a search engine reveals the likes of this.

Edited by steve_v
Link to comment
Share on other sites

Okay, now I've got the script set up and set to executable, selected ask every time for executable script also.

I double click on the script file and click run, then nothing happens. No matter how many times I try.

I don't see whats wrong here... I have KSP folder located in Desktop so that isn't the problem.

I'll post the modified script I'm trying to run right now.

#!/bin/bash


# Set the following to the directory where the game executable is in
KSPDIR=“~/Desktop/KSP_linuxâ€Â


# Set the following to 1 to disable antialiasing in the file before running the game. 0 to leave the
# setting as is
FORCE_DISABLE_ANTIALIASES=1


# If set to 1, try to run the 64 bit version, if not set to 1, will run the 32 bit version
TRY_64_BIT=1


### Don't change anything below here ###


exe=KSP.x86


uname -a | grep x86_64 >/dev/null
rc=$?
[ $rc -eq 0 -a $TRY_64_BIT -eq 1 ] && exe=${exe}_64
cd $KSPDIR
[ $FORCE_DISABLE_ANTIALIASES -eq 1 ] && sed -i '/^ANTI_ALIASING/c ANTI_ALIASING = False' settings.cfg



./${exe}

I've got rid of the texture bugs by manually setting Anti alias in the settings.cfg to False, but I'm still bugged the script is not working.

Also if there's any possible way to get KSP running properly with Anti alias enabled, that would be nice. Does anyone have an idea if I can do this or not?

Link to comment
Share on other sites

I'm no expert with scripts, but I pasted your script in a new file on Ubuntu, edited the path, made it executable and clicked it...

It works!.....mostly.

I think the line disabling anti-aliasing breaks the settings.cfg, the in-game graphics tab was blank even after a restart without using the script, I deleted my settings.cfg to fix it.

The default for anti-aliasing is "ANTI_ALIASING = 2" and turning it off would be "ANTI_ALIASING = 0", I guess the game does not check for the string "False" and convert it to an integer, I should have just tried editing the file to fix it instead.

Editing your script again to "ANTI_ALIASING = 0" worked fine, with no settings screen corruption and AA was off.

As to why your script won't start, don't forget chmod :)

Edit:

As for making KSP run with anti-aliasing, the only method I know is to force FSAA at the graphics driver level, I do this on a per application basis using Nvidia Settings, as can be seen here.

Edited by sal_vager
Link to comment
Share on other sites

KSP loaded up fine with the manual edit, but now the KSC texture is bugged and not loading. I've disabled Anti-alias and PPFX by manual edits to the settings.cfg but it's not helping.

Any ideas?

EDIT: chmod? whats that?

I've tried changing the Anti-alias to 0 inside the settings.cfg and that goes on to crash the VM for some reason, while False doesn't. I'm confused :S

Edited by ebigunso
Link to comment
Share on other sites

It might be the VM, I never managed to get KSP to work in a VM due to the graphics drivers simply not being good enough, though things may have improved.

If you're not seeing the ground loading around the KSC that'll be anti-aliasing, usually it needs turning off, but I leave mine on as it works on Nvidia and PPFX doesn't work if it detects that AA is off in the settings.cfg

chmod is a Linux command to set the ownership of a folder or file, and also set whether the file is executable, a script like yours will not be executable by default, you can find more info here.

"chmod 777 yourscriptname" in a terminal would make the file readable, writable and runnable by everyone.

You can also right click the file, click properties and then the permissions tab, then click to make the file executable in most desktop environments.

No idea on the crash though, if anything only KSP should crash, though again as it's doing something graphics related it could be the graphics driver, maybe it says what's going on in your VM's log.

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