Same problem here.
Deleting/renaming alsa-lib folde and libasound.so.* in the steam-runtime folder should fix the problem.
~/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/
~/.steam/steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/
RELATED: #3376
You can also just launch steam like this:
EDIT (2015.11.23, added 64-bit version of lib):
LD_PRELOAD="/usr/lib/libasound.so.2:/usr/lib64/libasound.so.2" steam
And not need to delete files that will come back each time steam updates. :tada:
You could also create a wrapper for steam using that LD_PRELOAD method:
EDIT (2015.11.23, added 64-bit version of lib):
#!/bin/sh
LD_PRELOAD="/usr/lib/libasound.so.2:/usr/lib64/libasound.so.2" /usr/bin/steam
Call it /usr/local/bin/steam (so you don't overwrite the one in /usr/bin).
Same problem here, I've downgraded to 1.0.29 because it was causing crashes. Additionally, Transistor game stopped working when you launched it on Steam due to this problem.
Edit: I've got PulseAudio installed too.
@ChuckDaniels87 have you tried launching steam like this (from the command line)?
LD_PRELOAD="/usr/lib/libasound.so.2:/usr/lib64/libasound.so.2" steam
@ryanpcmcquen It works launching steam that way (both Steam audio and Transistor game).
@ChuckDaniels87 to make it permanent, create a file named /usr/local/bin/steam (that should take precedence over /usr/bin/steam on most Linux systems.
Put this in it:
#!/bin/sh
LD_PRELOAD="/usr/lib/libasound.so.2:/usr/lib64/libasound.so.2" /usr/bin/steam
UPDATE (2015.12.02):
An even better, and shorter way to write this is:
#!/bin/sh
LD_PRELOAD='/usr/$LIB/libasound.so.2' /usr/bin/steam
P.S. The single quotes are important!
Thanks for the tip but this bug should be fixed sooner or later. I don't like to make this kind of fixes permanent because I always forgot that I did it in a couple of days (making it really permanent :stuck_out_tongue_winking_eye:). Thank you for the fix anyways! :+1:
@ryanpcmcquen When I try launching Steam with LD_PRELOAD="/usr/lib/libasound.so.2:/usr/lib64/libasound.so.2" steam, it says that they can't be preloaded, and says (wrong ELF class: ELFCLASS64): ignored. twice. Similar things happen with the other suggestions here,
@Zekario, did you actually see if sound was working?
Here is the thing. Steam is 32-bit, some games (like XCOM: Enemy Unknown), are 64-bit, therefore you need both libraries. That 'error' is innocuous, sound will work. Don't just assume it won't because of that output.
@ikokostya the problem with that fix, is that any Steam update is going to bring those files back. The LD_PRELOAD forces the same behavior by loading your system ALSA lib instead of the one bundled with Steam.
I assumed it didn't work because nothing happened after I tried it in the terminal. It went back to the prompt and didn't open Steam.
Try launching it like this:
LD_PRELOAD='/usr/$LIB/libasound.so.2' /usr/bin/steam &
Just in case someone will get the same issue: the "delete *asound*.so* and alsa-related folders from ~/.steam/root/" way worked for me for a week or so, but today CS:GO suddenly started to crash whenever I try to join the game, right before the level is loaded (tried casual mode only, not sure if it affect any other).
Launching steam as @ryanpcmcquen said (LD_PRELOAD='/usr/$LIB/libasound.so.2' /usr/bin/steam &) works OK.
Alsa 1.1.0, Arch Linux rolling x86_64.
@ryanpcmcquen That seems to have worked after a restart, I think I already had Steam running. Thanks!
@Zekario @ivan-kolmychek :+1:
Is there any way to get sound while streaming to Arch working without downgrading alsa-lib? Doesn't seem like this bug will get fixed anytime soon. Setting LD_PRELOAD only works for local games.
Okay, this is strange:
alsa-lib < 1.1.0 without lib32-alsa-lib: works
alsa-lib = 1.1.0 without lib32-alsa-lib: does not work
alsa-lib = 1.1.0 with lib32-alsa-lib: works with LD_PRELOAD='/usr/lib32/libasound.so.2:/usr/lib64/libasound.so.2'
The fix seems to have stopped working, at least on my laptop. Sound doesn't work, despite launching it via the above methods. There was a pretty big Arch update recently, and Steam updated as well.
@ryanpcmcquen now steam doesn't want to launch at all :/
EDIT: It launches after a restart, still no sound.
@Zekario I still have sound after the Steam update, but I am on Slackware. Do you have pulseaudio installed?
On a side note, export'ing the LD_PRELOAD is even better than just calling it on the same line as launching steam, here is my /usr/local/bin/steam:
#!/bin/sh
export LD_PRELOAD='/usr/$LIB/libasound.so.2'
/usr/bin/steam
@ryanpcmcquen I don't have pulseaudio installed. Is it better with Steam? If I switch to it I'll have to change a few key bindings, but probably not too much.
No, I wouldn't recommend pulseaudio. I don't have it installed.
What errors is Steam giving when you launch from the terminal?
@ryanpcmcquen I changed my steam to export libasound.so.2 like you did a few comments above, then ran steam in a terminal. It gave this, then stopped (went back to command line input):
$ steam
Running Steam on arch rolling 64-bit
STEAM_RUNTIME is enabled automatically
ERROR: ld.so: object '/usr/$LIB/libasound.so.2' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
I tried installing pulseaudio, rebooted and found my headphones not working properly anymore.
After some more testing I found switching between headphones and speaker didn't work properly after a reboot. But after a shutdown everything was fine again until the next reboot. Then I uninstalled pulseaudio, rebooted and had the same problem. So it wasn't pulseaudio's fault, but Alsa's. After downgrading liba-alsa everything was fine again. With or without pulseaudio.
So I think the best "solution" might be to downgrade lib-alsa since Alsa 1.1.0 seems buggy.
sudo pacman -U /var/cache/pacman/pkg/alsa-lib-1.0.29-1-x86_64.pkg.tar.xz
Doesn't really matter if you use pulseaudio or not.
/ btw: Can someone confirm the headphones bug? Can't seem to find a working bugtracker for Alsa
@Zekario I use ArchLinux and still got sound after both Steam and CS:GO updated recently. But I've not updated system for a while.
I'm launching steam as @ryanpcmcquen said (LD_PRELOAD='/usr/$LIB/libasound.so.2' /usr/bin/steam &).
After latest update I had no sound as well, but renaming libasound (for 32 and 64bit) fixed the problem again.
Okay, sound works on my desktop, but not laptop. Both run Arch. I'll try to troubleshoot, but if there are any potential fixes, please don't hesitate to respond.
What is the output of ls -l /usr/lib*/libasound*?
@ryanpcmcquen On my desktop (works):
lrwxrwxrwx 1 root root 18 Nov 9 21:22 /usr/lib32/libasound.so -> libasound.so.2.0.0
lrwxrwxrwx 1 root root 18 Nov 9 21:22 /usr/lib32/libasound.so.2 -> libasound.so.2.0.0
-rwxr-xr-x 1 root root 1147328 Nov 9 21:22 /usr/lib32/libasound.so.2.0.0
lrwxrwxrwx 1 root root 18 Nov 9 09:51 /usr/lib64/libasound.so -> libasound.so.2.0.0
lrwxrwxrwx 1 root root 18 Nov 9 09:51 /usr/lib64/libasound.so.2 -> libasound.so.2.0.0
-rwxr-xr-x 1 root root 1077352 Nov 9 09:51 /usr/lib64/libasound.so.2.0.0
lrwxrwxrwx 1 root root 18 Nov 9 09:51 /usr/lib/libasound.so -> libasound.so.2.0.0
lrwxrwxrwx 1 root root 18 Nov 9 09:51 /usr/lib/libasound.so.2 -> libasound.so.2.0.0
-rwxr-xr-x 1 root root 1077352 Nov 9 09:51 /usr/lib/libasound.so.2.0.0
On my laptop (doesn't work):
lrwxrwxrwx 1 root root 18 Nov 9 09:51 /usr/lib64/libasound.so -> libasound.so.2.0.0
lrwxrwxrwx 1 root root 18 Nov 9 09:51 /usr/lib64/libasound.so.2 -> libasound.so.2.0.0
-rwxr-xr-x 1 root root 1077352 Nov 9 09:51 /usr/lib64/libasound.so.2.0.0
lrwxrwxrwx 1 root root 18 Nov 9 09:51 /usr/lib/libasound.so -> libasound.so.2.0.0
lrwxrwxrwx 1 root root 18 Nov 9 09:51 /usr/lib/libasound.so.2 -> libasound.so.2.0.0
-rwxr-xr-x 1 root root 1077352 Nov 9 09:51 /usr/lib/libasound.so.2.0.0
My laptop has 3 less than my desktop, and they all seem to be in /usr/lib32/*. Could this be the problem?
EDIT: It was. Sorry for my dumbness, on the ArchWiki page for steam, it says that you need to install lib32-alsa-plugins for 32bit games. Now I have sound. Thanks for the help!
hope this gets fixed soon. my microphone does not work in dota 2 and none of the other games I play with audio works either ( portal 2, team fortress 2 are the others )
I'm using this method
LD_PRELOAD='/usr/lib32/libasound.so.2:/usr/lib64/libasound.so.2' steam
thanks
Sorry to "me too", but I recently just got hit with this. Removing libasound from ~/.steam etc worked.
I have to ask though: Really, is there any reason for Steam to ship with ALSA libs? I don't think there is, The other stuff..... maybe? I haven't looked into everything that ships with Steam, but.......something as basic as a system sound driver? I get that there might be a Linux user with OSS here or there but you're opening a whole can of worms that I don't think can be solved by just shipping libasound.
For that reason, I'm in favor of removing it, or if it must be shipped with it, prioritizing the system ALSA over the steam-shipped ALSA in the startup scripts.
For some reason all combinations of LD_PRELOAD and renaming the alsa libs bundled with steam had no effect for me (archlinux). I didn't see any relevant looking output.
Downgrading to alsa 1.0.29 worked.
@sinatosk you are leaving out plain ol' /usr/lib, surely Arch has something in there, try this version:
export LD_PRELOAD='/usr/$LIB/libasound.so.2' && /usr/bin/steam &
For Debian sid I am using following line: (this is due to multiarch and lack of libasound in /usr/lib)
$ LD_PRELOAD="/usr/lib/i386-linux-gnu/libasound.so.2:/usr/lib/x86_64-linux-gnu/libasound.so.2" steam
Many warnings are triggered but other than that there seems to be no problem (and games work again)
Here's the execute line in my steam.desktop file.
Somehow it doesn't seem to work for me. Games still consistently crash on launch.
Exec=env LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/lib/libsteam_api.so /usr/$LIB/libasound.so.2' DISPLAY=:0 steam
If I manually remove libasound.so.2 all installed games but The Book of Unwritten Tales 2 (for which I'll file a separate issue) will work, albeit without sound.
Pulse Audio is installed and I'm controlling the audio output via PulseAudio Volume Control
This is on Ubuntu 16.04 x64.
EDIT: Running it from the shell works, so it appears I can't LD_PRELOAD from an Exec line like that. Anyone know the correct way to link to multiple files like that?
EDIT2: NVM. Looks like I had a whitespace in there somewhere. Works now. Though the /usr/lib/libsteam_api.so is no longer necessary.
When this problem happens (with an unmodified runtime), are any alsa libraries accidentally loaded from the host system? The output of "info shared" in GDB after a crash occurs, or the output of /proc/$pid/smaps during execution of a game that doesn't have sound are both useful data to help us understand this problem.
We just traced my friend's Borderlands 2 and Borderlands: The PreSequel not starting, and the workaround with this:
LD_PRELOAD='/usr/$LIB/libasound.so.2' ${LD_PRELOAD} steam
got it working again. He's using Pulseaudio on a fully up to date Arch Linux.
Is it fixed with this update?
Is it fixed with this update?
I just tested 3 games (with pulseaudio):
Steredenn - Stopped crashing on startup. No sound
Cities: Skylines - Still no sound
Shovel Knight - Still crashes on startup
So... it got a little better.
Transistor starts now but still no sound.
The source of the problem is a Steam Runtime leak into the system configuration related to the ALSA sound system.
I've found in one of the affected 32-bit games (Broken Age) that it was reading system's /usr/share/alsa/alsa.conf instead of $STEAM_RUNTIME/i386/usr/share/alsa/alsa.conf. See this relevant fragment from a strace -e trace=open:
open("/home/user/.steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libasound.so.2", O_RDONLY|O_CLOEXEC) = 16
open("/usr/share/alsa/alsa.conf", O_RDONLY) = 16
open("/home/user/.steam/ubuntu12_32/steam-runtime/i386/home/user/.steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libasound.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/user/.steam/ubuntu12_32/steam-runtime/i386/home/user/.steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libasound.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/user/.steam/ubuntu12_32/steam-runtime/i386/home/user/.steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libasound.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/alsa/alsa.conf.d//50-pulseaudio.conf", O_RDONLY) = 16
open("/usr/share/alsa/alsa.conf.d//pulse.conf", O_RDONLY) = 16
open("/home/user/.steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/alsa-lib/libasound_module_conf_pulse.so", O_RDONLY|O_CLOEXEC) = 16
(A few system calls later was when the process crashed with a SIGABRT or SIGSEGV)
The problem in this case is that the version of the linker loaded libasond.so.2 is the 1.0.25 from Steam Runtime, but the /usr/share/alsa/alsa.conf is from alsa-lib 1.1.0. The prior version of /usr/share/alsa/alsa.conf(the one from alsa-lib 1.0.29) was almost the same that the one shipped with Steam Runtime (minus certain patch), but the new one from 1.1.0 has got some new lines (see this patch: http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=434f2f021f00045abcf79c9048b808c5dccfc930 ) and one or more of those lines are the cause of the crash. Changing the file to the previous one fixes the crashes in my system. I've even been able to narrow it to one line, and simply by commenting that sole line out, all works again. The line is this (patch format):
--- /usr/share/alsa/alsa.conf-1.1.0 2016-02-01 23:59:59.000000000 +0100
+++ /usr/share/alsa/alsa.conf 2016-02-25 11:46:36.099062833 +0100
@@ -367,7 +367,7 @@
}
type hw
card $CARD
- hint.description "Direct control device"
+###STEAM BUG### hint.description "Direct control device"
}
ctl.shm {
You can try patch that file and see if it fixes the problem for you, instead of the LD_PRELOAD workaround (that preloads the 1.1.0 version of libasound.so.2 1.1.0 before Steam has a chance of loading 1.0.25)
Not crashing now but there is still no sound in some games. I think this issue should stay open.
I agree. The patch did nog solve the problem. The crash is gone but so is my audio.
+1 for re-opening this issue: I'm still affected by it when running latest Steam on 64bit Ubuntu 16.04.1
I suspect that might be a different issue, especially if it's only affecting /some/ games. I'm not familiar with Ubuntu and the likes though (Gentoo Linux here), nor am I familiar with PulseAudio, so I could be completely wrong.
In short though: which games?
Longer version:
Applications that use FMOD tend to behave in unexpected ways with set-ups that have more than one audio device available for use. They don't seem to care about a user's configuration, and rather pick whatever seems 'default' to them instead. It may be that the FMOD developers intended that the ones implementing FMOD in their applications would do what's necessary to make it play nice with ALSA.
While I've had this issue for years with Outlast and the one streaming video that I bought before I realised it's a stream (grrr), I bumped to it with several more recently. A complete list of which I have experienced issues like this with:
Day of the Tentacle Remastered is what made me finally actually look into this issue. While doing some testing for Cheeseness (the AWESOME! person doing the porting of Day of the Tentacle Remastered to Linux), I noticed that all of the applications were actually making sounds, it was just that they were ignoring my configuration, and used an incorrect device!
I've been doing some testing with the FMOD recording example program, and while it seems it might be possible to make FMOD use a user-specified device via the least(?) work (adding a command-line switch for the application), it has issues with parsing some of the '.asoundrc' sections (for example, at least some years ago, it would not parse 'hint' at all).
Most notably perhaps it sees '!default' as a device name, which it of course fails to find.
This is probably something that should be fixed in FMOD itself, as it seems completely wrong to ignore a user's configuration. The most annoying part might be that even 'dmix' in a common ',asoundrc' seems to be ignored as well, so the applications will not be sharing the device at all.
I do have some hope left in me, however, that with a particular syntax it could be possible to make FMOD do what a user wants, because 'dmix' for example does seem to work when ALSA defaults is used (empty or no ',asoundrc' at all, or something like 'defaults.pcm.card 0' defined in it).
One simple way to confirm which device is being used, and by what: 'fuser -v /dev/snd/*'
Like I said, though, I could be completely wrong, but I felt it was worth mentioning this here. :]
@Chiitoo Fair enough; I will say that the symptoms I'm experiencing are remarkably similar, and the LD_PRELOAD work-arounds resolve it (see this forum post for the the exact command line I'm using).
The game in question is Planetary Annihilation: Titans.
Ah. If LD_PRELOAD helps, it does seem more likely to be a library issue still. Was hoping my guess would strike true, as I've not needed any such workarounds for a while now.
I'm on 'alsa-lib-1.1.1' now, but I'm fairly sure things worked with 1.1.0 as well. Should probably test that to make sure...
Thanks!
I came here from Uberent forum too. Hopefully this will get fixed eventually.
For me Planetary Annihilation: Titans crash under Steam, and works without it. LD_PRELOAD workaround helps.
Factorio is currently not launching on my system with or without LD_PRELOADs
alsa-lib 1.1.5 wine 3.0 is working fine for sound. This seems like a distro issue? Pretty sure this bug can be closed report can be closed. @jkarnesPerfectCube open a new bug for that. Check appdb
Hello, a while back Steam's handling of the steam runtime changed to prefer system libraries over the steam runtime if they are newer, which should have resolved this scenario for most users. The more recent Factorio comment appears to be unrelated to the opening post.
Nothing extracted yet.