Sid Meier's Civilization V

Sid Meier's Civilization V

View Stats:
Xyrill Jun 28, 2018 @ 11:39am
[SOLVED] [Linux] application won't start when PulseAudio upgraded to 12.0
No idea if the developers are reading this, but to all the Linux users who find the game suddenly not starting anymore, check if your distro upgraded PulseAudio to 12.0. With PA 12, Civ 5 crashes (silently) during startup, before the intro even starts. Downgrading PulseAudio to 11.1 solves the problem for me.

SOLVED: As hoyon suggested, put this in the launch options:

LD_PRELOAD=/usr/lib32/libopenal.so.1 %command%
Last edited by Xyrill; Jul 19, 2018 @ 9:32pm
< >
Showing 1-14 of 14 comments
S A F R Jun 29, 2018 @ 10:37pm 
I am experiencing this. How does one downgrade?
Drako Jun 30, 2018 @ 3:30am 
pulse audio is still on 11.1 on ubuntu 18.04, i have random crash in game :(
Drako Jun 30, 2018 @ 10:49am 
random crash is due to my new cpu 16n cores instead of 8:
solved with this thread: https://www.reddit.com/r/civ5/comments/5z77jr/game_crashes_randomly_on_linux_amd_ryzen/
hoyon Jul 3, 2018 @ 8:34am 
I'm having the same issue too. Hope they can get this fixed soon.
Xyrill Jul 5, 2018 @ 11:50am 
How does one downgrade?

Highly depends on your distribution, so check their manuals. For Arch Linux, I used
pacman -U /var/cache/pacman/pkg/*pulse*11.1*
Last edited by Xyrill; Jul 19, 2018 @ 9:33pm
hoyon Jul 5, 2018 @ 3:08pm 
I fixed this by putting

LD_PRELOAD=/usr/lib32/libopenal.so.1 %command%

in the launch options. It forces it to use a newer version of openal which does work with pulseaudio 12

pb Jul 6, 2018 @ 6:01am 
Originally posted by hoyon:
I fixed this by putting

LD_PRELOAD=/usr/lib32/libopenal.so.1 %command%

in the launch options. It forces it to use a newer version of openal which does work with pulseaudio 12

That worked, thanks. I found it in arch wiki as well, but there it said "if game crashes on startup with an error in libpulsecommon-12.0.so" - while for me it just crashes, without any info about pulseaudio...
JT Jul 6, 2018 @ 9:39am 
Mine just SegFaults when launching on Arch
Render Jul 6, 2018 @ 10:32am 
i'm perfectly happy hearing the cows moo on my standard speakers.
Crazy0750 Jul 7, 2018 @ 2:10pm 
Originally posted by hoyon:
I fixed this by putting

LD_PRELOAD=/usr/lib32/libopenal.so.1 %command%

in the launch options. It forces it to use a newer version of openal which does work with pulseaudio 12

Thanks, it worked for me.
Xyrill Jul 19, 2018 @ 9:32pm 
Thanks hoyon! Worked for me as well. I updated the start post accordingly.
puchuu Sep 21, 2018 @ 8:35am 
Hello. I think that you are wrong. I have the same issue today.

"bin/fix_steam_runtime.sh":
#!/bin/sh set -e DIRECTORY_PREFIX="/home/puchuu/.local/share/Steam/ubuntu12_32/steam-runtime" DIRECTORIES="i386 amd64" for directory in $DIRECTORIES; do cd "$DIRECTORY_PREFIX/$directory" find "." \( \ -name "libstdc++.so.6" -o \ -name "libxcb.so.1" -o \ -name "libgcc_s.so.1" -o \ -name "libgpg-error.so.0" -o \ -name "libpulse-simple.so.0" -o \ -name "libpulse.so.0" \ \) -delete done

We can use preload to replace "libopenal.so.1" in the current game folder.

cd "~/.local/share/Steam/SteamApps/common/Sid Meier's Civilization V" LD_PRELOAD=/usr/lib32/libopenal.so.1 ../../../ubuntu12_32/steam-runtime/run.sh gdb ./Civ5XP Thread 7 "Civ5XP" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xf1bffb40 (LWP 5743)] 0xf7a9cfc1 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib32/libpthread.so.0 (gdb) bt #0 0xf7a9cfc1 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib32/libpthread.so.0 #1 0xebac0cf9 in pa_cond_wait () from /usr/lib32/pulseaudio/libpulsecommon-12.2.so #2 0xec733f74 in pa_threaded_mainloop_wait () from /usr/lib32/libpulse.so.0 #3 0xf7f32dd0 in ?? () from /usr/lib32/libopenal.so.1 #4 0xf7f3537e in ?? () from /usr/lib32/libopenal.so.1 #5 0xf7efeac9 in ?? () from /usr/lib32/libopenal.so.1 #6 0xf7a9f80a in __pthread_once_slow () from /lib32/libpthread.so.0 #7 0xf7f0001d in alcOpenDevice () from /usr/lib32/libopenal.so.1 #8 0x09126f34 in YUV12 () #9 0x091264a2 in YUV12 () #10 0x09113bee in check_for_pending_io () #11 0x09114188 in BinkOpen () #12 0x085f7553 in ASL::PlayBinkMovieGL(char const*, float, unsigned int, unsigned int, bool*) () #13 0x0884c26c in PlayMovieState::Begin() () #14 0x086e0fc3 in Civ5App::PlayOpeningMovie() () #15 0x086e1c46 in Civ5App::Init(char const*) () #16 0x0865b3ed in WinMain () #17 0x085f5487 in ?? () #18 0x085d8e3e in ThreadHANDLE::ThreadProc(void*) () #19 0xf7a965e6 in start_thread () from /lib32/libpthread.so.0 #20 0xf78da786 in clone () from /lib32/libc.so.6

But this won't fix an issue.

I am using gentoo, I have glibc 2.27-r6, openal 1.19.0, pulseaudio 12.2. I was not able to fix it with preload. You can see "/usr/lib32/libopenal.so.1" in backtrace. It is a link to "libopenal.so.1.19.0".

Segfault from "pthread_cond_wait" looks like wrong usage of a mutex or condition. Maybe it is not initialized. Where is this issue come from? I don't know. Maybe it's a breaking change in pulseaudio that was unhandled by openal, maybe pulseaudio is broken again.

Let's delegate this issue on civ developers.
puchuu Sep 22, 2018 @ 2:39am 
(gdb) disassemble Dump of assembler code for function pthread_cond_wait@@GLIBC_2.3.2: 0xf7ad0f48 <+0>: push %ebp 0xf7ad0f49 <+1>: push %edi 0xf7ad0f4a <+2>: mov $0x2,%edx 0xf7ad0f4f <+7>: push %esi 0xf7ad0f50 <+8>: push %ebx 0xf7ad0f51 <+9>: call 0xf7ac90b4 <__x86.get_pc_thunk.ax> 0xf7ad0f56 <+14>: add $0x100aa,%eax 0xf7ad0f5b <+19>: sub $0xac,%esp 0xf7ad0f61 <+25>: mov %eax,0x2c(%esp) 0xf7ad0f65 <+29>: mov 0xc4(%esp),%eax 0xf7ad0f6c <+36>: mov 0xc0(%esp),%ebp 0xf7ad0f73 <+43>: mov %eax,0x28(%esp) 0xf7ad0f77 <+47>: mov %gs:0x14,%eax 0xf7ad0f7d <+53>: mov %eax,0x9c(%esp) 0xf7ad0f84 <+60>: xor %eax,%eax 0xf7ad0f86 <+62>: lock xadd %edx,0x0(%ebp) 0xf7ad0f8b <+67>: xor %ebx,%ebx 0xf7ad0f8d <+69>: mov 0x4(%ebp),%eax 0xf7ad0f90 <+72>: mov %ebx,0x6c(%esp) 0xf7ad0f94 <+76>: xor %ebx,%ebx 0xf7ad0f96 <+78>: mov %edx,%edi 0xf7ad0f98 <+80>: mov %eax,0x68(%esp) 0xf7ad0f9c <+84>: add $0x2,%edi 0xf7ad0f9f <+87>: movq 0x68(%esp),%xmm0 0xf7ad0fa5 <+93>: mov %ebx,0x6c(%esp) 0xf7ad0fa9 <+97>: mov %edx,0x68(%esp) 0xf7ad0fad <+101>: mov 0x6c(%esp),%esi 0xf7ad0fb1 <+105>: psllq $0x1f,%xmm0 0xf7ad0fb6 <+110>: mov 0x68(%esp),%ebx 0xf7ad0fba <+114>: mov %esi,0x4(%esp) 0xf7ad0fbe <+118>: mov %ebx,(%esp) => 0xf7ad0fc1 <+121>: movdqa (%esp),%xmm4 0xf7ad0fc6 <+126>: por %xmm0,%xmm4 ---Type <return> to continue, or q <return> to quit---q

It looks that my problem is related to i386/686 gcc and glibc issues. And maybe it is not related to pulseaudio 12, sorry.

It is related to https://bugzilla.opensuse.org/show_bug.cgi?id=1048861 and old gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838.

Perhaps we can provide a -mstackrealign glibc build for steam users?

We can also figure out why GCC spills at all and/or add -mstackrealign (or -mincoming-stack-boundary=2) to a selected set of source files ...

Yes, I've actually been running GCC 2.8-compiled binaries that have only now become broken as a result of this. This is not hypothetical. For the moment, I've rebuilt glibc with -mincoming-stack-boundary=2 to handle the problem well enough for my current needs, but it's not a complete solution.

I've disabled steam runtime completely, rebuilded glibc, openal and pulseaudio with mstackrealign and civ 5 works perfect now. I hope this info will help other people. Thank you.
Last edited by puchuu; Sep 22, 2018 @ 6:00am
Originally posted by puchuu:
I've disabled steam runtime completely, rebuilded glibc, openal and pulseaudio with mstackrealign and civ 5 works perfect now. I hope this info will help other people. Thank you.

Thank you SO much!

I'm on gentoo too and rebuilding glibc with -mstackrealign was enough to run Civ5 with STEAM_RUNTIME_PREFER_HOST_LIBRARIES=0

Rebuilding glibc with -mstackrealign fixed Saints Row 3 & 4 too! :steamhappy:

Update: I rebuilt pulseaudio too with -mstackrealign and I don't need STEAM_RUNTIME_PREFER_HOST_LIBRARIES=0 any more. :cozyspaceengineersc:
Last edited by [K] Nonno Cicala / Gribbit; May 15, 2019 @ 9:10am
< >
Showing 1-14 of 14 comments
Per page: 1530 50

Date Posted: Jun 28, 2018 @ 11:39am
Posts: 14