Basic setup guide for linux.

ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
edited March 2014 in Technical Support
Hey everyone,

I finally got around to updating this post 258 roll out. I decided that the obvious choice was to move it to the wiki. That way if I get hit by a bus some one else can update the thing.

Wiki Link

Please help me keep this up to date.


Important excerpts:

As of version 258 Mesa Drivers will not work with NS 2. You have to use either nVidia or AMD binary drivers.

You can run the game from the steam client which is recommended or via the command line as follows:

steam steam://rungameid/4920

Max says: You can run NS2 outside the Steam environment by using the Steam runtime. This is what we do for development. This readme describes more https://github.com/ValveSoftware/steam-runtime/blob/master/sdk/README.txt

here is how this goes down:
$cd ~/path/steam-runtime/sdk
$./shell-i386.sh
$ cd ~/.local/share/Steam/SteamApps/common/Natural\ Selection\ 2/
$ run.sh ~/.local/share/Steam/SteamApps/common/Natural\ Selection\ 2/ns2_linux32

Known bugs (updated March 7, 2014)
  • Some ATI users are having issues compiling shaders.
  • NS2 is not compatible with any mesa drivers before version 9.0.x (3.1 Core profile required)
  • For many users using high texture quality causes an out of memory crash nearly immediately (32 bit memory limit)

Legacy google docs link

Comments

  • DarkflameQDarkflameQ Join Date: 2013-02-28 Member: 183451Members
  • tuxatortuxator Join Date: 2010-01-07 Member: 69958Members, Reinforced - Gold
    edited August 2013
    some more things you should do/know about:

    If you have an AMD graphic card, deactivate the 'Catalyst A.I.', after that my FPS went from ~ 10 to 40 FPS.

    For starting steam with LANG=en_US steam, it's better to add a & directly after 'steam', that will prevent Steam from spamming your console with mostly useless information, it'll put Steam into the 'background' so that you could do other things in the console.
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    I will add that note thanks tuxator
  • tuxatortuxator Join Date: 2010-01-07 Member: 69958Members, Reinforced - Gold
    ah, change that. The & doesn't work with steam. Use '>/dev/null 2&>1' instead of just &
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    Well, I actually didn't put the bit about routing around the errors in because I'm lazy and error spam in my mind console isn't really a big deal.

  • appletalkappletalk Join Date: 2013-06-16 Member: 185577Members, Reinforced - Shadow
    Hello fellow Linux users,

    I hope this is an appropriate place to post this.

    I'm running NS2 under Fedora 19 64 bit. Gnome Shell 3.8 is my window manager.
    I encountered terrible FPS issues during almost all play tests, even under lowest settings.

    I found that this fix HUGELY improved all round performance of NS2 under Linux.

    Keep in mind to revert the window manager replacement you will have to restart X. Either "sudo init 3; sudo init 5" or restarting your computer.

    1) From your Gnome desktop, make sure Steam is running
    2) Open a terminal and run "metacity --replace" This will replace Gnome shell.
    3) Launch NS2 from the currently open Steam window.
    4) Enjoy your improved framerate.

    I am not sure why Gnome performance is so much worse than metacity, but I know I have used this fix for other games (ie. Planetary Annihilation)

    Also for some reason enabling bloom effects caused graphical distortion during this mode.

    I'd be curious if anyone has any further insight into this fix or issue.
  • tuxatortuxator Join Date: 2010-01-07 Member: 69958Members, Reinforced - Gold
    What's your GPU/driver combination?
  • appletalkappletalk Join Date: 2013-06-16 Member: 185577Members, Reinforced - Shadow
    NVIDIA Beta driver 325.15
    Zotac Geforce 560 Ti
    Intel i7 3770k cpu @ 4.4GHz
    32GB Ram
    Fedora 19 64-bit
    Kernel 3.10.9-200.fc19.x86_64
  • Jones108Jones108 Join Date: 2012-12-10 Member: 174670Members
    edited September 2013
    Thanks alot, but im still getting file match errors (yes i did verfiy chache+reinstall) and black screens when i start a game. Linux Mint 15 Cin, 310.44, GTX 660.
    Main menu works fine. Settings are minimal.

    TF2 on the other hand runs pretty much flawless, but i want NS2.
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    As mentioned in the thread you opened, please use the locale fix in the document, until UWE can patch this issue.
  • Jones108Jones108 Join Date: 2012-12-10 Member: 174670Members
    edited September 2013
    Confused wrote: »
    As mentioned in the thread you opened, please use the locale fix in the document, until UWE can patch this issue.
    I ran "LANG=en_US.UTF-8 steam" via terminal, but the same issue still persists.

    Btw there is no info in the document where or how to run this for newcomers. All you get are the commands. Maybe you wanna add that for those that are........confused.
    Cheers. ;)
  • rkfgrkfg Russia Join Date: 2013-09-03 Member: 187744Members, Reinforced - Supporter, Reinforced - Silver, Reinforced - Gold, Reinforced - Diamond, Reinforced - Shadow
    You can also try just LANG=en_US without UTF-8 suffix. There are other encodings like ISO.
  • ninjinninjin Join Date: 2013-04-16 Member: 184854Members, Reinforced - Diamond
    Thanks for the guide. I have seen a bunch of posts by people trying to play using their Intel graphics cards and I thought that I would mention that you won't be playing under Linux for now. Although Wikipedia lists for example the Intel HD Graphics 4000 drivers for Linux to be OpenGL 3.1 capable, I did not find this to be the case with the latest official Intel drivers from their website 01.org:
    > glxinfo | grep OpenGL
    OpenGL vendor string: Intel Open Source Technology Center
    OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile 
    OpenGL version string: 3.0 Mesa 9.1.4
    OpenGL shading language version string: 1.30
    OpenGL extensions:
    

    What you need to do is whine at Intel for not updating their Linux drivers (the device should be capable since the drivers support OpenGL 4.0 under Windows). Until then, unless I am mistaken, you are stuck with DirectX/OpenGL under Windows. I would love to be proven wrong, but I think my research is accurate as of late September 2013.
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    @ninjin,

    It looks like the latest mesa driver might work, since they support OpenGL 3.1 and GLSL 1.4. But, and this is a big but, they don't seem to actually succeed at running the game. This is super sad as they ought to really work. But apparently some thing seems to go horribly wrong .

    That said it would be a big win if some one could come up with a working mesa configuration.
  • ninjinninjin Join Date: 2013-04-16 Member: 184854Members, Reinforced - Diamond
    @Confused:

    I think the but is the following (from the Mesa 9.0 release notes):
    Mesa 9.0 implements the OpenGL 3.1 API, but the version reported by glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used. Some drivers don't support all the features required in OpenGL 3.1. OpenGL 3.1 is only available if requested at context creation because GL_ARB_compatibility is not supported.
    
  • PurgePurge Join Date: 2013-08-29 Member: 187172Members, Reinforced - Shadow
    edited September 2013
    My FPS are still not good :

    low Settings :30-40 fps
    medium-high settings 20-30 fps

    on windows ns runs fine and smooth with high settings ;(

    Is the catalyst driver so bad or why i am getting so low fps ?

    My PC
    Intel Xeon v2 1230
    AMD Sapphire 7870 GHZ Edition
    8 GB DDR 3 Ram
    Intel 120 SSD
    OS : Chakra Linux
    Linux Kernel 3.10.10-1
    catalyst-13.4-4

    any tip to get a fps boost with linux ?
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    @purge It's a combination of the two ns2 on linux and amd hardware don't get along, and historically fglrx has been bad. I got, at best, half my windows performance on linux on amd hardware.

    Max is working on getting the ns2 part of things under control a bit.

    For now, try a non 3d window manager(MATE, Gnome2d), run at desktop resolution those sorts of things seemed to make a difference for me.

    @ninjin, I heard a rumor that mesa will soon support 3.3 so we can always hope for it:)
  • ZaggyZaggy NullPointerException The Netherlands Join Date: 2003-12-10 Member: 24214Forum Moderators, NS2 Playtester, Reinforced - Onos, Subnautica Playtester
    I haven't been able to use the Steam-runtime (does this require Steam running or not?)
    It either requests Steam to be running or segfaults with Steam running.

    Following the wiki: http:/wiki.unknownworlds.com/ns2/Linux_Guide#Running_the_client
    I've downloaded and extracted https:/github.com/ValveSoftware/steam-runtime/archive/master.zip
    ran sdk/setup.sh
    ran shell-i386.sh

    ran ./run.sh /path/to/ns2_linux32

    [zaggynl@nexusi5 runtime-release]$ ./run.sh /path/to/ns2_linux32
    GetInstanceCount currently unimplemented
    Build 259
    Manjaro Linux x86_64
    LaunchProcess: failed to execvp:
    /path/to/NS2/system/awesomium/awesomium_process
    Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
    Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
    Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 78: saw unknown, expected number
    [S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
    [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
    Error: Steam must be running to play Natural Selection 2
    Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
    Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
    Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 78: saw unknown, expected number
    [zaggynl@nexusi5 runtime-release]$ ./run.sh /path/to/ns2_linux32
    GetInstanceCount currently unimplemented
    Build 259
    Manjaro Linux x86_64
    Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: LaunchProcess: failed to execvp:
    /path/to/NS2/system/awesomium/awesomium_process
    non-double matrix element
    Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
    Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 78: saw unknown, expected number
    Setting breakpad minidump AppID = 4920
    Steam_SetMinidumpSteamID: Caching Steam ID: 76561197963227945 [API loaded no]
    Steam initialized
    Num displays: 2
    OpenGL 4.2.12217 Compatibility Profile Context 13.20.11 initialized (ATI Technologies Inc. AMD Radeon HD 7900 Series)
    GLSL version 4.20
    ARB_texture_storage extension present
    Error: Couldn't load 'renderer/Drawer.shader' (file not found)
    Error: SoundSystem::GetDeviceByGuid - failed to find device by GUID
    Error: SoundSystem::Initialize - failed to set number of FMOD channels
    Error: SoundSystem::GetDeviceByGuid - failed to find device by GUID
    Sound Device: disabled stereo
    Record Device: disabled
    Error: Local mod 'tutorial' doesn't exist
    warning: The VAD has been replaced by a hack pending a complete rewrite
    Error: Couldn't load 'game_setup.xml'
    Error: Attempting to set watchdog callback on NULL Lua state
    Segmentation fault (core dumped)
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    so zaggy some what confusingly, you gotta change to your ns2 dir before you use run.sh

    The errors you are getting are becasue it is trying to load ns2 files from teh steam directory.

    met me make sure that the wiki look like it expect it to on that one.


  • gquigsgquigs Join Date: 2013-12-05 Member: 189802Members
    I noticed that in the wiki you mention OpenGL3.1 needing, EXT_copy_buffer, but mesa provides GL_ARB_copy_buffer. As for the other OpenGL 3.1 things on the list it has them all...

    In the event it's not something easy like the above can the error message be made more useful so we can report it to the Mesa devs?
  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    Sadly, I don't have any more access to the code base than you do really, but From comments max, the guy who builds the engine, has made it basically looks like the issue is that mesa supports 3.1 core and not 3.1 compatibility. He has stated that when he finds the time we should get things running on 3.1 core and it should then start working on mesa. There is no time line on this change presently.

    Either that or mesa starts supporting 3.1 compatibility .

  • gquigsgquigs Join Date: 2013-12-05 Member: 189802Members
    Ah.. after reading this page I think I understand: https://www.opengl.org/wiki/Core_And_Compatibility_in_Contexts

    And it doesn't appear that Mesa will support this: http://www.phoronix.com/scan.php?page=news_item&px=MTE3MzA

    It's very messy and it appears the OpenGL spec people weren't quite sure how they wanted to handle it.. :/
  • OslegOsleg Ukrain... for now Join Date: 2014-01-23 Member: 193445Members
    Tried to edit the wiki directly but failed so I'll post here.
    There is an issue with running NS2 on some 64bit linux systems, the core issue is related to kernel. Any kernel version higher than 3.10.* will fail.
    So as a temporary (well i hope UW will fix it someday) workaround players have to install kernel version 3.10 or lower.
    For example Arch Linux users with nvidia GFX can do:
    pacman -S linux-lts nvidia-lts
    Edit grub/syslinux to use this kernel and reboot.

    Happy gaming!
  • tuxatortuxator Join Date: 2010-01-07 Member: 69958Members, Reinforced - Gold
    edited March 2014
    > NS2 is not compatible with any released mesa drivers up to and including mesa 10.x

    uhhh and why is the game runnig for me? Aside from not seeing certain effects/alien night vision it works perfectly fine on Mesa 10.1.
  • gquigsgquigs Join Date: 2013-12-05 Member: 189802Members
    tuxator wrote: »
    >
    uhhh and why is the game runnig for me? Aside from not seeing certain effects/alien night vision it works perfectly fine on Mesa 10.1.

    It fails to launch for me and I'm running the latest dev drivers. What's your video card? Maybe attach your glxinfo:
    glxinfo > glxinfofile

  • ConfusedConfused Wait. What? Join Date: 2003-01-28 Member: 12904Members, Constellation, NS2 Playtester, Squad Five Blue, Subnautica Playtester
    Ahh, the joys of me updating things.

    One of the more recent builds (263?) UWE went to a 3.1 core profile since then mesa >9.0 will support the game. I will fix the op.

    gquigs, if you are having issues make a thread. try to include ~/.config/Natural Selection 2/log.txt
  • chemicalfanchemicalfan UK Join Date: 2014-03-26 Member: 194979Members
    edited March 2014
  • GarveGarve Doitsu Join Date: 2014-03-22 Member: 194903Members
    Meeting all the requirements, but the game doesn't start :/ log says

    Build 264
    Linux
    Steam initialized
    Error: Attempted to load remote options from a file that does not exist.
    Error: Loading of cloud user settings failed

    What can I do about this? Thanks!
  • paupavpaupav Croatia Join Date: 2014-04-10 Member: 195295Members
    Is there solution for problem with compiling shaders?
  • fanafana Join Date: 2015-05-14 Member: 204472Members
    Hey,
    thanks for the guidem unfortunately it is outdated.

    There is no SDK folder nor i386.sh file....

    Maybe the devs (if there are any linux devs left..) or some linux expert could shed some light on this...
Sign In or Register to comment.