Friday, May 2, 2014

How to play 64-bit Kerbal Space Program in Linux

So you want more mods but you are already reaching the limit of just under 4GB RAM running the 32bit version of KSP? Tough luck, KSP doesnt support 64bit right? Wrong. The Linux version has 64 bit support but it isnt the easiest thing in the world to set up so I thought I should go ahead and make a guide to help others enjoy the wonders of 64 bit KSP.

What You Will Need
1. A 64 bit Processor (Most if not all new ones are)
2. More Than 4 GB of RAM (otherwise this would be pointless)
3. Nvidia Graphics(unfortunately ATI's Linux support sucks. It might work with some ATI cards but not the one I tried)
4. A USB flash drive (if you do not already have a 64 bit Linux distro installed)
5. 20GB Free on your HDD or SSD
Installing Linux

WARNING: BACK-UP ALL IMPORTANT DATA ON YOUR COMPUTER BEFORE STARTING. IF THIS IS DONE INCORRECTLY YOU COULD LOSE EVERYTHING!!!

If you dont already have Linux installed you will need to get that going.

First, make sure you have enough harddrive space to install Linux, Steam, and KSP. 20 GB should be enough but I would suggest more in case you want to do other stuff in Linux.

Next, we need to decide which Linux distro to use. I recommend Kubuntu. It is what I use and it seems to have one of the largest user bases and the most support for people new to Linux. Make sure you download the 64-bit version!!!

Once you have chosen which Linux distro you will use you will need to download Universal USB Installer.
For instructions on how to use it create a bootable USB device click here.

Now you have a bootable USB drive with Linux on it. Plug that sucker in and reboot.

Some computers will automatically ask if you want to boot from the USB drive but others may require you to hit a key to go to a boot menu or if your computer is like mine you will need to go into the bios and tell it to use the USB drive as the primary boot device. For help with this try googling your motherboard model along with "boot from usb".

Just follow the on screen instructions. If you already have windows installed and dont want to get rid of it then the process from here will differ based on your machine and the Linux distro you are trying to install. Do a google search for "(Your Linux Distro) dual boot with (You Windows Version)".

So hopefully now you have 64-bit Linux installed. The following steps may differ from distro to distro I will be giving instructions on Kubuntu.
Installing Kerbal Space Program

1. Install Proprietary Graphics Drivers
Application Launcher>Settings>System Settings>Driver Manager
Select the recommended proprietary driver and click apply. Once the install is complete go ahead and reboot.

2. Fix the stupid default alt+click functions
Application Launcher>Settings>System Settings>Window Behavior>Window Behavior (again)>Window Actions
Here in the Inner Window, Titlebar & Frame section go ahead and change the modifier key to meta or change the Left click and right click options to nothing. This will allow you to alt click things in KSP without fucking shit up.

3. Install Steam
 Application Launcher> System>Konsole(Terminal)
Type: sudo apt-get install steam
This will start the process of installing Steam.
Once it is done do this to launch steam
Type: steam

4. Install KSP
Just launch steam and install KSP like you normally would.

5. Install mods and transfer save games
Right click Kerbal Space Program in Steam
Properties>Local Files>Browse Local Files
This will open the KSP directory
Just copy over your Game Data, and Save Game folders from your windows install.

6. Fix the 64 bit version of KSP.
The 64 bit version of KSP comes horribly broken and will not work properly unless you fix it.
This fix is for version .23.5. The fix for previous versions will be different but can be found on the google.
The easy way is to download this binary that I already fixed and replace the one in your KSP folder with it.

The hard way:
Right click in the background of your KSP folder and go to actions and then open terminal here
Enter the following commands (If anything different happens than what I say here then do the easy way)
Should look like this before you start:

you@yourcomputer:~/.steam/steam/SteamApps/common/Kerbal Space Program$ 

Type: xxd -s "0x90f377" -l 1 KSP.x86_64
Press enter.
This will return: 090f377: 01

Type: echo "90f377: 00" | xxd -r - KSP.x86_64
Press enter.
This will not return anything.

Type: xxd -s "0x90f37c" -l 1 KSP.x86_64
Press enter.
This will return: 090f37c: 01

Type: echo "90f37c: 00" | xxd -r - KSP.x86_64
Press enter.
This will not return anything.

7. Make the 64 bit binary executable (Linux wont run it until you tell it that it is something that it can run)
Right click in the background of your KSP folder and go to actions and then open terminal here
Enter the following command
Should look like this before you start:

you@yourcomputer:~/.steam/steam/SteamApps/common/Kerbal Space Program$ 

Type: sudo chmod +x KSP.x86_64
Press enter.
This will not return anything.

8. Tell Steam you want it to run the 64 bit version and not the 32 bit one.
Right click on Kerbal Space Program in Steam and go to Properties.
Click Set Launch Options...
Enter: LC_ALL=C %command%_64
Click OK

9. Launch KSP from Steam


If everything went right you should now be playing KSP 64-bit and no longer be plagued by the memory limits of 32-bit.

I hope this guide helped you. Good luck, have fun and keep flying.

1 comment:

  1. Thank you very much for the fixes you provided in step 6, they seem to have improved my game's stability by a lot! Just out of curiosity, what do they do?

    ReplyDelete