Spring choppy, jerky, unresponsive? Try this! Tested:Gentoo

Spring choppy, jerky, unresponsive? Try this! Tested:Gentoo

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

Post Reply
Tagliatelle
Posts: 3
Joined: 27 Dec 2011, 19:57

Spring choppy, jerky, unresponsive? Try this! Tested:Gentoo

Post by Tagliatelle »

Update: FIXED - SEE BELOW

Hey

I used to play spring over 6 months ago, I think I used 82.0 back then, worked fine.

I installed 85.0 yesterday hoping to play again, but the game is unplayable due to video jerking. After the loading screen, once the battlefield appears, the video is smooth for the first 3-5 seconds, and then when everything is done loading it becomes unplayably jerky. The FPS counter shows around 150-200fps the first few seconds its smooth, and then drops to 60-70 when it starts jerking.

This is in Gentoo, 64 bit. Compiled using "openmp" and "multithreaded", but I also recompiled without either and again without both, no difference. I initially thought it was a multithreading problem, but seems like it isn't.
Tried using Balanced Annihilation and ZeroK (svn or git or whatever it was).
Tried turning all widgets off and tried turning lua shaders off in spring-settings.
Tried medium and high quality in springsettings.
I tried starting Spring both from Springlobby and directly via the spring executable.
Nothing helped.
games-strategy/spring-85.0
games-util/springlobby-0.139
x11-drivers/nvidia-drivers-290.10

Gentoo Linux x86_64
gcc-4.5.3-r1, glibc-2.12.2, kernel gentoo-sources-3.1.4
nvidia-drivers-290.10
GPU: GeForce GTX 285M
CPU: Intel Core i7 820QM
RAM: 2 x 4GB SODIMM 667MHz

Code: Select all

cat .springsettings/springsettings.conf
[General]
LanguageID=58
firstrun=0
CacheVersion=11
SettingsVersion=22
[Spring]
CurrentIndex=default
[Spring/Paths]
[Spring/Paths/default]
UnitSyncPath=/usr/games/lib64/libunitsync.so
Uikeys=/home/drslony/.spring/uikeys.txt
[GUI]
ShowTooltips=1
[GUI/SETTINGSFRAME]
left=368
top=225
height=655
width=1183
maximized=0
[SpringSettings]
mode=5000
disableWarning=0
SimpleDetail=medium
SimpleRes=1920 x 1080 (current)
SimpleQuality=high
Please tell me what other logs you need.
Last edited by Tagliatelle on 01 Jan 2012, 00:25, edited 3 times in total.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: 85.0 very choppy once game starts

Post by Forboding Angel »

Infolog.txt

>>

Pastebin.com
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: 85.0 very choppy once game starts

Post by abma »

Tagliatelle
Posts: 3
Joined: 27 Dec 2011, 19:57

Re: 85.0 very choppy once game starts

Post by Tagliatelle »

Forboding Angel http://paste.pocoo.org/show/527843/

abma I don't use Ubuntu, there is no alsoft-conf in Gentoo, or alsoft* anything for that matter. Was there a regression with sound in recent spring versions? It worked fine >6 months ago.
http://paste.pocoo.org/show/527849/
We can try with disabling the sound completely, if you tell me how.

ps. I don't use pulseaudio.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: 85.0 very choppy once game starts

Post by hoijui »

spring 0.82 -> 83.0+ has quite some changes in sounds stuff. i had the same problem on gentoo. indeed the sound configuration under gentoo is not so nice. you basically have to manually create a config file. either under /etc/ or in your home. i am on ubunu right now, so i cant check, but it is something like ~/.alsoftrc, and there is a template .tar.bz2 for the config file, installed with OpenAL soft under gentoo.
... maybe jk can give more precise info, in case you cant find out yourself.
i disabled pulse audio and some effects.. i think jk said that the important change is to disable reverb effect.. anyway.. after that change, the sound thread uses 0-1% CPU, instead of 160%, and spring runs ultra smooth again, for me.
Tagliatelle
Posts: 3
Joined: 27 Dec 2011, 19:57

Re: 85.0 very choppy once game starts

Post by Tagliatelle »

Thank you for the reply hoijui!
For future reference:

How to fix Spring in Gentoo
Choppy, jerky, laggy video and sound? Try this.

Check if you have OpenAL installed:

Code: Select all

eix media-libs/openal
Open up ~/.alsoftrc for editing

Code: Select all

nano ~/.alsoftrc
Copypasta this stuff into ~/.alsoftrc

Code: Select all

[general]
format = AL_FORMAT_STEREO32
#format = AL_FORMAT_STEREO16
frequency = 44100
drivers = alsa,pulse
excludefx = eaxreverb,reverb,echo,modulator,dedicated

[alsa] 
device = default
#device = pulse
#device = plughw:0,0
mmap = true
Explanation:
  • Note that the lines that begin with a hash are commented out.
  • AL_FORMAT_STEREO32 is the best quality and performance wise. OpenAL does it's internal processing using 32 bit floats. If you use AL_FORMAT_STEREO16 then your CPU has to do extra work to convert the signal to 16 bit, so if you hardware supports it, use 32 bit. In fact OpenAL should automatically fall back to 16 bit if 32 bit doesn't work.
  • excludefx is the line that fixes the stuttering for you. You're telling OpenAL not to use these sound effects, they are responsible for high CPU use which makes your Spring dramatically drop in performance into an unplayable state.
  • Using mmap should reduce latency and CPU consumption. If your system doesn't support it, OpenAL should fall back to non-mmap mode.
  • Try the commented out devices if the default one doesn't work for you. To find out your choices for the plughw: option, try these commands:

    Code: Select all

    cat /proc/asound/cards
    cat /proc/asound/devices
    aplay -l
    aplay -L
Now run Spring again, and hopefully you'll be back to wasting hours of your life doing things no less meaningless than your whole existence! Yay!
User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: Spring choppy, jerky, unresponsive? Try this! Tested:Gentoo

Post by Cheesecan »

Be sure cmake ccflags setup right. Could be compiling without sse.
User avatar
Pithikos
Posts: 146
Joined: 26 Dec 2008, 14:26

Re: Spring choppy, jerky, unresponsive? Try this! Tested:Gentoo

Post by Pithikos »

Thanks guys!! This fixed my problem. I was running on 100%++ CPU and lagging like hell. Never thought it could be an issue with sound. :-)
Post Reply

Return to “Linux”