Linux SOUND is a Cacophony Of Confusion

Average: 4.6 (32 votes)

Linux sound is ridiculously overcomplicated.

Its also one of the few areas in Linux which experiences a '2UP' - the 2 Universes Problem, notorious amongst Apple and MSW users but rarer in Linux software.

In a 2UP, a given subsystem will work perfectly, usually out-of-the-box, for one set of users, yet fail catastrophically for another set of users, when they are ostensibly using exactly the same software and hardware.

In many Linux distros, sound exhibits a 2UP. Often people just cannot get sound, at all, even though they may be using a bog standard distro (eg. Debian, Ubuntu, or god help them Fedora), and a standard out-of-the-box desktop (eg. KDE), and dirt common hardware like a Sound Blaster series sound card.

For other people it just works, first go...

Still other people can get sound Ok initially, but it goes away and stops working after a time, while others can get sound from some apps but not from others...

Why? Why does this happen?

There are several culprits:

The Open Sound System, OSS, worked very nicely, but it was limited in scope, so fair enough it needed replacing with something more general. Along came ALSA, the Advanced Linux Sound Architecture, and a new set of kernel modules. OSS and ALSA could even coexist on the same system reasonably happily.

Then it got ballsed up beyond repair somewhere...

NOBODY understands artsd, the KDE mixer app, except KDE deep people.

Its never been clear why some people can't get sound out of youtube in Mozilla or Firefox with Flash fully installed, yet other people can, or why installing alsa-oss (aoss) and running it in front of the browser often fixes this. There are vague comments that its something Macromedia/Adobe did wrong but I've yet to see a consistent explanation of the end effect.

Or why killing artsd (outright, and this is not easy!!) gives some people their sound back and its unnecessary for others.

Sound is getting like Printing.

Jon

I had the same problem with

I had the same problem with my laptop. I bought it with Linux Unbutu already installed. I think the main problem with the sound on Linux is the driver itself. Usually the drivers that many laptop companies build for Linux aren’t usually very good. Reinstalling the sound driver might help again for a period.

While I agree with Jon on

While I agree with Jon on many issues with Linux sound, such as the vast number of sound systems... I mean jack, alsa, oss, esd, arts, or the 2UP issue. I would like to point out that some of the things I can do with the sound on Linux it is near impossible to do in Windows. I mean I can grab sound from any app and pipe it virtually across the world with a simple bash script. That being said, I have had a ton of issues with many apps. My biggest gripe currently is that many applications only use one sound system, and the ones that use multiple don't use them correctly, etc. I would like to see a unification effort, to get the mess of systems back to one simple easy to debug system. The system could even provide hooks for existing systems. Also can any one say independent application sound control. It would really be nice to be able to boost say firefox, or some flash movies.

I'll vote on this. My sound

I'll vote on this.
My sound works but.
I use Amarok to listen to music. if i use it nothing else can play audio
Don't really know how to fix it. And I'm afraid of breaking anything if something went wrong.
Sometimes amarok is unable to play and then it hangs... and i get no sound at all from anywhere so i shut down all the windows and try again...
You know... sound issues gotta be fixed...

Here is some tricks I use to

Here is some tricks I use to get artsd to work nicely with alsa on KDE 3.5.2. It would be nice if they came as defaults.

Go to System Settings -> Sound & Multimedia -> Sound System -> General

tick Enable the sound system
untick Enable network sound
untick Run with the highest possible priority
leave the sound buffer slide alone
tick Auto-suspend if idle after
set the text box to 2 seconds (the artsd daemon uses cpu time when not idle)

Go to System Settings -> Sound & Multimedia -> Sound System -> General -> Hardware

in Select the audio device: select Advanced Linux Sound Architecture (alsa can mix multiple sound sources)
if you know that your sound device can do Full duplex tick it (Full duplex is playing and recording at the same time)

For Flash in Konqueror tell it to use the artsd daemon.
Konqueror -> Settings -> Configure Konqueror -> Plugins -> Plugins -> tick Use artsdsp to pipe plugin sound through aRts

Best of Luck

Yeh combine that with

Yeh combine that with firefox that is running the macromedia flash plugin.. which I suspect is hard wired to access /dev/dsp unless someone else can contradict me here - you end up having to kill firefox in order to play some game that uses /dev/dsp..

This calls for yet another post about firefox and sound related stuff..

You should just disable the

You should just disable the aRTS daemon under the KDE control panel.

I really don't understand why the hell people keep using these sound daemons (most of the time no one needs them).

Although Linux doesn't allow direct access to the hardware, Alsa already supports software mixing by default, and dmix should kick all the time. And if your soundcard supports hardware mixing you'll have no problem at all...

But, before asking: "So, why the heck KDE has aRTS if Alsa supports software mixing by default?" -- You should remember that KDE isn't a Linux-only app and is available for most unices and has even been ported to Windows. :-))

About the games, actually it will depend on what game are we talking about. I have been playing iD games without problems, I run gnome and use it's EsounD for the desktop-beeps. Everything I have to do is type: # esdctl off && quake3 ; sleep 2 && esdctl on. Another workaround is the infamous /proc hack which is NOT recommended. :)

Right. Enable this, disable

Right. Enable this, disable that. What's the problem!? Get with the program.

Sound in Linux is a nightmare. Today I had a huge file transfer in progress, was listening to some tunes in Rhythmbox and then tried one out in BMP. BMP freaked!!! Threw up a dialog that locked my system up. I had to reboot and now I'm repeating the first three hours of the file transfer.

This is awful. This would not happen in Windows. I hate MS, but you know what? This wouldn't have happened if I was running Windows.

There is something fundamentally wrong with the Linux desktop. It is not a joy. It is still a hobby. After all these years.

We need to develop a totally tight-ass Linux desktop that will refuse to run applications that do not pass a minimum interface test - both UI and driver API.

And for crying out loud, why lock the soundcard? Who cares? It's way better that I get double sound than having to reboot.

That is ridiculous. That is embarassing.

Jesus H. Christ! Sound in

Jesus H. Christ! Sound in Linux is just fine unless you run an application that was written using pre-ALSA methods. Ever try getting sound from an old-ass DOS app to work in Windows?!? Now THERE'S a crapshoot!! Like all things Linux, it may be complicated when you hit a roadblock but at least there's a way to make it work. In Windows (as always) the roadblock becomes a chasm and you're FUCKED!!

BTW: I don't know why all these shitty sound daemons (ESD, ARTS, etc...) keep getting used or enabled in distros as all they've ever done is lock up machines and break sound output. Anybody competent in doing Linux computer configurations disables these first-off in the default KDE+GNOME profiles (/etc/skel)...actually anybody competent in building Linux systems won't even install GNOME...

Are you fucking joking??? Of

Are you fucking joking???

Of COURSE it would happen in Windoze!! This shit happens all the time in Windows!!

Windows is one of the most difficult platforms to play any media under and I'm NOT joking.

Believe it or not, Linux is way, way, waaaaaay ahead in media playback. Its better than shitdos (er, Winblows, er GraphicalDOS, er....) and its better than Mac - YES, BETTER THAN OSX, SUCK ON THAT APPLE.

But this is our point - its great....until artsd fucks you up the ass. Its great.....until Macromedia fucks Firefox up the ass and it daisy chains your desktop up the ass in turn.

Not. Good. Enough.

Heres a comparison of

Heres a comparison of windows sound and linux (default ubuntu install vs windows with AC97 drivers[from motherboard website(MSI)])
user wide eq window yes linux no
the user wide speaker setting actually effect applications windows yes. linux no
getting dolby passthrough working.
power dvd in windows by ticking a box. and any Dshow app buy installing an app*. linux gstreamer is a bitch so i installed totem-xine and hacked the config file. and the dolby is still passed through the analog out ever wondered what undecoded dolby sounds like?.
2.0 audio up mix to 5.1. windows yes. linux only after hacking the .asoundrc/asound.conf file.
and i also had to change the default /dev/dsp wrapper [ubuntu's fault i guess] for firefox to get sound mixing working

the fact is no average user wants to hack config files, turn 2 sound cards in to one 10.2 sound card or pass there sound through a ldspa plugin. and I would like setting 5.1 in the speaker settings to actually tell all my apps how many speakers i have. 5.1/7.1 should be separate from passthrough as in windows it decodes it and sends it through analog. and also passes it through the the spdif undecoded

i guess this isnt all liunx's fault as these are vendor drivers which have alot of support. but alsa/oss and xine/mplayer/gstreamer/vlc just dont seam to integrate very well compared to dshow and Dsound

* i installed K-lite mega codec pack. and i cant remember what app i used in it to configure this setting

Oh really? This would happen

Oh really? This would happen in Windows ... strange ... I bet that I can listen to music with Windows Media Player and start playing another file, or even the same, using Winamp and nothing will happen ... both players will output sound without any problem whatsoever. This goes for any audio/video player running on Windows.
Linux great for multimedia? Guess again, you can't even find legal media encoders/decoders for Linux.

Just pick a random media

Just pick a random media file.
Go on - anything.

Now try and play it in windows.

Oh - codec problem? Mysterious MSI device lockup? Total crash to BSOD ?
Hmmmm.

Ok, install VLC - oh wait, thats a Linux app so you're not allowed to.

Btw - playing sound simultaneously from different apps in Windows? Keep trying it, just keep trying it.... you'll get the joke after attempt number #N.......

Btw, thanks y'all for

Btw, thanks y'all for dropping by our humble page!

Linux sound freak'n makes me

Linux sound freak'n makes me so pissed off. It is worse than printing. OSS/ESD/Alsa fucking cut the crap and give me a single API. With no way to prevent someone from locking /dev/dsp any old fucking app will grab /dev/dsp and not let go. *cough* firefox *cough*, and don't tell me to run a craptastic sound daemon AND figure out how to make all my apps use it (if they even can).

Linux. Sound. Sucks.

Alsa is a big ball of shit.

http://alsa.opensrc.org/index.php/AlsaComplaint

OSS is "tuned" for freak'n 486. Why didn't it have a software mixer built in from day 1?

If OSS isn't open enough, freak'n rewrite it. But I have a feeling most of the people on the lkml don't listen to music. They code. They probably don't even have ears.

How about about a god damn software mixer on /dev/dsp ! At least I use a mac half the day

Here's how I think linux

Here's how I think linux sound development tends to go:

* A sound daemon is written for linux

* Crappy documentation is written for the sound daemon

* A half-assed website is made for the documentation, which starts to have broken links

* Developers/Users are confused by crappy documentation and avoid implementing the daemon.

* People unaware of said sound daemon's abilities start a new sound daemon project

* Another sound daemon is written for linux
...

Most of this seems to come from just awful documentation. Some developers write software and then just kind of expect people to figure it out. People don't have time to figure it out. 90% of the time I spend debugging my configuration is scouring google and ubuntu forums for HOWTOs that aren't out-of-date, inaccurate, or at risk of just making my problems worse.

If developers could just write the official documentation a little bit better, more clear, for human beings and not people who dream about sockets, maybe people will actually be able to use them outside their little circles of friends. And then we won't need HOWTOs because we could figure out what we need to do based on what we already know from the official documentation.

Currently alot of us have to wait for an insider to figure things out and tell us what to do. That's not freedom at all.

man pages are a good start, but just because there's a man page doesn't mean it's very useful.

On a modern windows rig, sound between applications tends to work pretty clean right off the bat. It's definitely not the most sophisticated sound system, but it works. Mac OS X's sound is probably the most user-friendly I've ever come across with little or no loss of power. I can even fiddle around with my ProTools HD hardware and use it as normal output... in seconds.

Linux audio is not stable. It just isn't. One can point out thousands of linux installs that run sound fine under their limited conditions, but that doesn't hide the fact that there are like 5 daemons out there, and that there are still applications that don't even use the daemons and talk straight to dsp. Yes it's sophisticated and can do all sorts of cool network audio things and whatnot, but if things keep failing and people have to play psychologist with their computer to solve a cryptic error message none of this means anything.

I've never, ever had so much trouble getting sound to work in a deskop OS. Not in windows 3.1, not in Windows 95, not in Mac OS 9, not in Mac OS X, not in Windows Vista.

they rewrote realplayer into

they rewrote realplayer into "Helix player" but still no alsa support.. why did they rewrite it again!?

Yes why indeed? Well

Yes why indeed? Well actually I applaud the choice of OSS since the "emulation"
layer works quite well and frankly Im not looking to hear webacast lectures about
medical issues in stunning high-fi the information is what counts for me. Why do
I say what I just did about "OSS" because using anything that is supposed to be
ALSA aware as in Flash 9 has been pure hell. Everyone runs around telling me they
have it working and Im and idiot or they are than happy help but only for the "disrupto" they use. Why do I persist? Too cheap to for Apple and can't take M$ sad.

yeh well people are still

yeh well people are still searching for man page for artsd and coming across this site, it's pretty funny really!

The guy who cited

The guy who cited poor/non-existant documentation as the primary cause for the total mess that is Linux audio, is absolutely right on the money.

I've started a tutorial on programming Linux sound using ALSA. You can check it out here:

http://home.roadrunner.com/~jgglatt/tech/linuxapi.htm

I had to figure it all out from actually going through the source code and commenting it. These guys don't even know how to comment their code properly, let alone write decent documentation. And this is hardly a rare occurence with open source programmers. Lack of decent docs, tutorials, and code examples are one of the biggest problems with open source projects.

I also found a 3 bugs in ALSA. I notice that 2 of them have been fixed in the latest version. The third bug has not, and I'm not sure who else is aware of it, because when I tried to report the bug via the ALSA web site, its bugtracker wouldn't work. Real useful, huh?

But while ALSA is certainly not a model for good programming, at least the ALSA devs do know how to write an API that does proper error checking. On the other hand, even a first year computer science student knows how to do proper error checking better than the Pulse Audio guys. The Pulse Audio guys don't even bother checking the return value of malloc() to see if it's 0. Totally amateur. Pulse Audio is a bug-riddled piece of excrement filled with code that will cause exceptions all over the place due to its total lack of proper error checking.

I agree completely with the

I agree completely with the poster...

Linux sound is ridiculous to troubleshoot.

Try this...
google: linux install download audio sound {insert audio controller type here} {insert disto here}

You could go all the way to page number 324398793, and still not get a comprehensive solution to installing a working sound module on many systems.

Linux is doomed to fail, until they work this stuff out with some strict standardization accross distro's (at least the well known ones - redhat, fedora, centos, etc.)

A desktop is NOT a desktop, unless you can play sound and video.....
And if it takes 30 hours of debugging, editing conf files, reading forums, reading wiki's, googling until your fingers crack... you begin to think to yourself.... why don't I just install Windows and forget about this Linux headache !???

That being said...there are some things you can do on linux that isn't as transparent in Windows... sending mail from commandline for example... or running a more secure Webserver. These things are great....at WORK... but at the end of the day, you go home and "PLAY" on your Mac or Windows system in an effort to save the hair you didn't pull out..

But some people don't use

But some people don't use their home computers for 'play'. They use it for 'work'. I use my home computer to send e-mails, use the net, pick lotto numbers (I wrote a program to check the tickets) and do some hobby programming. OCcasionally I play quake. I write articles, read articles. It actually suits me better if I can just plug in a USB stick with an article I wrote, type one command and send it in an e-mail, without having to fiddle with the GUI and an e-mail program. Or quickly print of x number of copies before I have to head out, etc. It suits me better being able to automate a download and have the computer switch itself off afterwards, because I want to go out for a walk. I can send people files easily, encrypt anything, make something availble for anyone via private FTP. Someone else can be using the computer, and I can log in from elsewhere and quickly check my e-mail.

Windows is geared towards a 'sit down, make yourself comfortable and be preparted to go WOW' kind of experience, where every interaction is quite involved and the user becomes quite involved with the desktop. But this was a marketing strategy to sell computers and OS's, not a user expectation, by turning the computer into something which was supposed to be experienced, rather than used. But for those that use their computer as a tool (which is what it is), and not just as a box to wile away the hours in front of, Linux actually suits better, allowing a direct, no-nonsense, get the job done and be free approach. Administering and installing software might be more involved, but these are generally once offs, and while it can sometimes be more difficult than windows, if you build a system with the approach that you want a tool from the beginning, its not that much worse than windows. I've lost count of the nubmer of times I've serached in vain on google for dirvers for WINDOWS, having to either come accross sites which have them, but require registration, or being directing to some Japanese or Korean site, WRITTEN in Japanese or Korean, wondering whether I need w94x45g4.exe or 294v-44c-acco.exe. I'm trying to find drivers for my LG LCD moniter at the moment for XP, and frankly, cant find the right ones.

It's 2009. OpenSuse is on

It's 2009. OpenSuse is on version 11.1. You'd think Linux morons would have figured out by now that sound needs fixing.
Sooo sad for Linux. You know what? on windows, I don't have to do ANYTHING to get sound to work. All you poor suckers defending crappy Linux and bashing Windows....it's pretty sad actually. Why don't you go outside and get some sun. Maybe meet a girl or something.

No, its this page thats sad.

No, its this page thats sad. I have been an avid Linux AND Windows user and I would say Linux is easily, by far, without any doubt, a far superior system. Sound? SOUND,lol! What year is this? If Linux is too complicated for you dont use it, but calling it inferior because you people are lazy to learn alittle and get with the times is just a flawed argument. You dont have the skills to use linux sso you use Winblows..admit it. Buy all that "antivirus" software, get your "firewalls" all set up and still get own3d by someone using "Guess what" A linux box.

Us linux users get antivirus software to to help you people who use Windoz to NOT get Viruses. You should thank us.

BUT,

Ill say this,if your lazy, have a short attn span, and love flashy graphics, and just want to have everything spoon fed to you then use windoz, then you can cry to high heaven when you run into issues because you cant fix your problems because you were too lazy to learn how windoz works in the first place. Its just so easy! So you buy more software, more antivirus, more firewalls to try and protect yourself, but still you dont know how any of this works so you just install and hope for the best wheras we actually learn instead of saying "This doesnt work it sux! I quit!"

See alot of linux users were windoz user...then we evolved!

To be fair to Windoz it has its place in the world and I still use it for certain trivial things, but it sounds to me like the people here are making Linux arguments in 2009 that were valid in maybe 2005. Get with the times! Oh and keep feeding that pig Bill Gates $$ he needs it so keep pushing out flawed machines and ignore 2 year old exploits. Linux is F. R. E. E and Todays GUI's are almost every bit as user friendly as Winbloz.