Troubleshooting linux: Difference between revisions

From Spring
Jump to navigationJump to search
Vadi (talk | contribs)
New page: = Troubleshooting = == Ingame == === LuaUI Crash Ingame === LuaUI can crash during game, because some lua script you use has a bug. 0.75 should be resistant to this problem, but 0.74b3 ...
 
Abma (talk | contribs)
No edit summary
 
(35 intermediate revisions by 13 users not shown)
Line 1: Line 1:
= Troubleshooting =
= Linux specific Troubleshooting =


== Ingame ==
== Ingame ==


=== LuaUI Crash Ingame ===
=== Slow Mouse ===
 
LuaUI can crash during game, because some lua script you use has a bug. 0.75 should be resistant to this problem, but 0.74b3 is not. After crash, you won't see the bottom left tooltip box and top right resource bar anymore. Fear not, help is near:
 
<code><pre>
/resbar 1
/tooltip 1
</pre></code>
 
These might not be necessary in 0.75 anymore at all.
 
Also, you won't be able to change the build menu page with mouse anymore, but keys , and . do the trick.
 
LuaUI can also be restarted after it crashed. Often this does the trick and it works fine the rest of the game:
 
<code><pre>
/luaui reload
</pre></code>
 
=== Mouse is slow in fullscreen mode ===


Run:
Run:
<code><pre>
<code><pre>
echo 'export SDL_MOUSE_RELATIVE=0' >> ~/.bash_profile
echo '# Slow fullscreen cursor fix for Spring' >> ~/.xsessionrc
echo 'SDL_MOUSE_RELATIVE=0' >> ~/.xsessionrc
echo 'export SDL_MOUSE_RELATIVE' >> ~/.xsessionrc
</pre></code>
</pre></code>
And log out and log in again.
And log out and log in again.
Line 32: Line 15:
The mouse should now be as fast as in windowed mode.
The mouse should now be as fast as in windowed mode.


=== Rotating Buildings Ingame ===
=== Rotating Buildings ===


You can rotate a building before you give the build order, but the keys that do this don't work in linux by default for some users. Issue the following commands in the beginning of the game:
You can rotate a building before you give the build order, but the keys that do this do not work in Linux by default for some users. Issue the following commands in the beginning of the game:


<code><pre>
<code><pre>
Line 49: Line 32:
And then hit the keys you want to use, and spring prints the keycodes in the message buffer.
And then hit the keys you want to use, and spring prints the keycodes in the message buffer.


TODO: add information on how to save the settings so that they work the next time you start spring.
If you want to save these keys you have to edit the uikeys.txt.
 
=== Map is White ===
 
If the whole map is only shades of white and grey, there is a problem with your display driver. Maybe your gpu is very old and does not support some needed opengl feature. For example I had this problem with matrox g550 but not with some very old geforce.
 
== Startup ==
 
=== Missing Default Cursor ===
 
This or any similar error of not being able to find a specific file are usually because the mod you are using needs ota content, download & install as explained [[SetupGuide#OTA_Content|earlier in this document]].
 
=== could not open file: gamedata/defs.lua ===
 
Make sure your ~/.spring does not contain an outdated version of base/springcontent.sdz because a new version of this file is distributed with spring.
If you do, just remove it.
 
=== sounds/button9.wav "cant find wav file" ===
 
Same problem as above.
 
=== Couldnt find matching GLX visual ===
 
Reduce anti aliasing.
 
=== GL_ARB_texture_compression not found ===
 
This can be an issue with your gpu drivers. The drivers you are using do not support a feature that is required to run spring. You might have better luck with the closed source official drivers of nvidia or amd cards. If your gpu itself is really old, this might not help.
 
If you use the fglrx ati-graphics driver and you are getting this error there might be a chance that still spring work (I use this with ubuntu gusty).
At first we must check that fglrx is installed correctly:
 
<code><pre>
~$ fglrxinfo
display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Mobility Radeon X1400
OpenGL version string: 2.0.6747 (8.40.4)
</pre></code>
 
Then lets check the glx-extention.
 
<code><pre>
~$ glxinfo | grep direct
Xlib:  extension "XFree86-DRI" missing on display ":1.0".
direct rendering: No
</pre></code>
 
If you get this message, notice that glxinfo releates to display ':1' and fglrxinfo to display ':0'!! Lets check the glx-extention on display :0 now.
 
<code><pre>
~$ DISPLAY=:0 glxinfo | grep direct
direct rendering: Yes
</pre></code>
 
This message mean that you can start spring by typing (in a terminal)
 
<code><pre>
~$ DISPLAY=:0 spring
</pre></code>
 
If you use the TASclient with wine and the native linux spring. Start the whole TASclient-start-script by typing.
 
<code><pre>
DISPLAY=:0 TASCLIENT-start-script
</pre></code>
 
But Notice under circumstances is no windowmanager running on screen :0! This means there are NO windowframes at the TASClient window! You can't move it or close it by clicking the closebutton (unless you click at the close button on the terminal-window in witch you startet TAS). You can although close TAS with the keys ALT-F4
 
=== OpenAL Segfault ===
 
If spring crashes with this output:
 
<code><pre>
OpenAL: ALC_EXT_capture AL_EXT_capture AL_EXT_vorbis AL_EXT_MP3
AL_LOKI_quadriphonic AL_LOKI_play_position AL_LOKI_WAVE_format
AL_LOKI_IMA_ADPCM_format AL_LOKI_buffer_data_callback ALC_LOKI_audio_channel
Segmentation fault (core dumped)
</pre></code>
 
Look into this thread on the forums for a fix: http://spring.clan-sy.com/phpbb/viewtopic.php?f=20&t=12568
 
Then bug nemo in #taspring to finish this troubleshooting entry. He knows how to fix it.
 
This is mod-related, ie. it only happens on some mods. Please list here the mod versions that give this error for you.
 
- Star Wars mod, unknown version, by user report
 
The problematic mod contains a sound file that crashes openal. You can try to unzip the mod file that crashed for you, and play each sound file. Please report any sound files that fail to play right, just list them here.
 
- unknown file
 
== Compiletime ==
 
=== make_gamedata_arch.sh not found ===
 
The .zip you downloaded is for windows, you must download a .bz2, instructions [[SetupGuide#Downloading_A_Tarball|earlier in this document]].
 
=== invalid use of ILvoid ===
 
During compiling, if you get a lot of the following errors:
 
<code><pre>
/usr/include/IL/il.h:497: error: '<anonymous>' has incomplete type
/usr/include/IL/il.h:497: error: invalid use of 'ILvoid'
</pre></code>
 
This happens because the version of libdevil-dev you have installed is not compatible with gcc version 4.2 and newer.
 
You should upgrade your libdevil-dev to fix this issue. However, in some distributions (at least gentoo), the fixed package has the SAME version number as the older unfixed package, so you might actually need to remove your current libdevil-dev package completely and reinstall it.
 
TODO: add critical version numbers of libdevil.
 
== Network Setup ==
 
Usually you don't need to do any network setup whatsoever, because the lobbies take care of nat traversal with firewall hole punching, but if you need to know the topology, it goes like this:
 
Host needs to enable incoming udp to port 8452, and outgoing replies to those.
Non-host players need to enable outgoing udp, and incoming replies to those.
So basically only non-host players initiate "connections", and only the server listens on a well-known port.
 
== If You Still Have Problems ==
 
Join to #taspring on Freenode or #sy on QuakeNet and try your luck.
 
However, generic linux problems not really related to installing this should be asked elsewhere.
 
Prepare to list your distribution, which installation method you used, and what exactly is the error. Don't ask if people are around or not, just go straight to business and tell all details, for maximizing your chances of getting help.
 
== IRC ==
 
# #taspring @ FreeNode
# #sy @ QuakeNet
 
== Asking For Help ==
 
Ok so you need human help. This is how '''NOT''' to do it:
 
<code><pre>
15:54 -!- **** [n=****@*] has joined #taspring
15:54 < ****> Hi, i have a problem with compiling spring on debian
15:54 < ****> can anyone help me?
15:57 -!- **** [n=****@*] has quit [Client Quit]
</pre></code>
 
Don't ask to ask, instead go straight to business by stating the exact problem you have, and giving all necessary information. What you were trying to achieve, how did you try to do it, what happened and what did you expect to happen.
 
Then WAIT for someone to notice you.
 
== Configure Options ==
 
If you want to see the configure options, because of a bug in the buildsystem you have to have spring configured first. But if configure fails, you are out of luck. So I have listed the options here:
 
<code><pre>
$ scons --help
scons: Reading SConscript files ...
make: Nothing to be done for `all'.
Succes building streflop!
Updating bitmaps.sdz
Updating springcontent.sdz
scons: done reading SConscript files.
 
platform: Set to linux, freebsd or windows
    default: None
    actual: linux
 
debug: Set to yes to produce a binary with debug information
    default: 0
    actual: 3
 
debugdefines: Set to no to suppress DEBUG and _DEBUG preprocessor #defines \
(use to add symbols to release build)
    default: True
    actual: True
 
syncdebug: Set to yes to enable the sync debugger
    default: False
    actual: False
 
synccheck: Set to yes to enable sync checker & resyncer
    default: True
    actual: True
 
optimize: Enable processor optimizations during compilation
    default: 1
    actual: 2
 
profile: Set to yes to produce a binary with profiling information
    default: False
    actual: False


profile_generate: Set to yes to compile with -fprofile-generate \
=== Problems with Audio ===
to generate profiling information
    default: False
    actual: False


profile_use: Set to yes to compile with -fprofile-use to use \
The engine needs at least OpenAL Soft 1.6 for its sound. If you still have the old openal-0.0.8 installed, you should update it.
profiling information
    default: False
    actual: False


cpppath: Set path to extra header files
Additionally, ''pulseaudio'' causes lots of issues, so try to disable it for spring if you have sound problems.
    default: []
    actual:


libpath: Set path to extra libraries
== Desync in game ==
    default: []
    actual:


fpmath: Set to 387 or SSE on i386 and AMD64 architectures
Spring only send the commands and not the result over the network, so it needs to run all math in a repeatable manner,  so all other clients in a multiplayer match get the same results. So some CPU specific features have to enabled/disabled. If you desync, you either have a CPU that is not SSE1 capable, or you set the wrong -march/-mtune compiler flags. If you compile Spring via CMake, remove ''CMakeCache.txt'', and leave the march flag at the default.
    default: 387
    actual: 387


prefix: Install prefix used at runtime
= See also =
    default: /usr/local
* [[IRC]]
    actual: /usr/local


installprefix: Install prefix used for installion
    default: /usr/local
    actual: /usr/local


datadir: Data directory (relative to prefix)
[[Category:Linux]]
    default: share/games/spring
    actual: share/games/spring
 
bindir: Directory for executables (rel. to prefix)
    default: games
    actual: games
 
libdir: Directory for AI plugin modules (rel. to prefix)
    default: lib/spring
    actual: lib/spring
 
strip: Discard symbols from the executable (only when neither \
debugging nor profiling)
    default: True
    actual: False
 
disable_avi: Set to no to turn on avi support
    default: False on windows, True otherwise
    actual: True
 
use_tcmalloc: Use tcmalloc from goog-perftools for memory allocation
    default: False
    actual: False
 
use_mmgr: Use memory manager
    default: False
    actual: False
 
dc_allowed: Specifies whether FPS mode (Direct Control) is allowed in game
    default: True
    actual: True
 
cachedir: Cache directory (see scons manual)
    default: None
    actual:
 
Use scons -H for help about command-line options.
</pre></code>

Latest revision as of 13:27, 14 June 2014

Linux specific Troubleshooting

Ingame

Slow Mouse

Run:

echo '# Slow fullscreen cursor fix for Spring' >> ~/.xsessionrc
echo 'SDL_MOUSE_RELATIVE=0' >> ~/.xsessionrc
echo 'export SDL_MOUSE_RELATIVE' >> ~/.xsessionrc

And log out and log in again.

The mouse should now be as fast as in windowed mode.

Rotating Buildings

You can rotate a building before you give the build order, but the keys that do this do not work in Linux by default for some users. Issue the following commands in the beginning of the game:

/bind keycodex buildfacing inc
/bind keycodey buildfacing dec

Keycodex and keycodey above are just placeholders. What you want to write depends on which key you want to use. To see what keycodes any keys have, do:

/keydebug yes

And then hit the keys you want to use, and spring prints the keycodes in the message buffer.

If you want to save these keys you have to edit the uikeys.txt.

Problems with Audio

The engine needs at least OpenAL Soft 1.6 for its sound. If you still have the old openal-0.0.8 installed, you should update it.

Additionally, pulseaudio causes lots of issues, so try to disable it for spring if you have sound problems.

Desync in game

Spring only send the commands and not the result over the network, so it needs to run all math in a repeatable manner, so all other clients in a multiplayer match get the same results. So some CPU specific features have to enabled/disabled. If you desync, you either have a CPU that is not SSE1 capable, or you set the wrong -march/-mtune compiler flags. If you compile Spring via CMake, remove CMakeCache.txt, and leave the march flag at the default.

See also