LWN.net Logo

LPC: Linux audio: it's a mess

LPC: Linux audio: it's a mess

Posted Sep 19, 2008 9:51 UTC (Fri) by NAR (subscriber, #1313)
In reply to: LPC: Linux audio: it's a mess by elanthis
Parent article: LPC: Linux audio: it's a mess

I prefer having modern conveniences like USB hot-plugged audio hardware and Bluetooth headsets just working [...] PulseAudio just works (except for Flash).

How many people want to use USB hot-plugged audio hardware and bluetooth headsets? How many want to watch (and listen to!) Flash? I think there are a couple of order of magnitude difference between the two. If a project goes for the first class of users instead of the second, then it doesn't have place in the default installation of a general purpose distribution. Actually Ubuntu Hardy breaking Youtube with PulseAudio was the last bit of motivation for me to move back to Windows on my home desktop.


(Log in to post comments)

LPC: Linux audio: it's a mess

Posted Sep 19, 2008 12:35 UTC (Fri) by shalem (subscriber, #4062) [Link]

Really people,

You should refrain from making comments about something you've clearly not given a serious try. Yes flash does not work as is with pulseaudio because its a *closed source* app which is abusing the alsa interface in many horrible ways.

Not working as is does not mean that it does not work though, Lennart has gone to many troubles to make it work. So all you need todo (on Fedora, other distros will have something similar) is: "yum install libflashsupport" and after that flash will work fine with pulse. Since you are manually installing flash anyways, having to install an additional package which helps integrate flash better into the system (it does more then just get pulse to work with flash) is really not all that much to ask.

LPC: Linux audio: it's a mess

Posted Sep 19, 2008 13:04 UTC (Fri) by NAR (subscriber, #1313) [Link]

Actually I did install libflashsupport, but no luck.

LPC: Linux audio: it's a mess

Posted Sep 19, 2008 14:12 UTC (Fri) by drag (subscriber, #31333) [Link]

Don't blame Pulseaudio for Ubuntu's goof with it. I know people still had some issues, but with Fedora it really did work very much better then Ubuntu.

The PA in Hardy was, as far as I can tell, a victim of bad QA.

And Adobe Flash does crash out my browser quite often. Most of the time when I close out a window which I just watched a video, which follows that race condition described in the above article. This hasn't anything to do with PA, since you know, I am not actually running it.

I am sure you have other good reasons, but switching to Windows to fix Youtube is a bit drastic when it could of been solved by turning off PA or/and installing some other flash player. :)

LPC: Linux audio: it's a mess

Posted Sep 19, 2008 14:24 UTC (Fri) by NAR (subscriber, #1313) [Link]

Well, the youtube problem was just one too many. It used to work with Gutsy, didn't work with Hardy. Turning off pulseaudio didn't solved the problem and the audio wasn't in sync with other flash players.

Actually the browser window problem didn't affect me, because I use tabbed browsing, just one window which I don't close.

LPC: Linux audio: it's a mess

Posted Sep 19, 2008 14:47 UTC (Fri) by drag (subscriber, #31333) [Link]

I understand what your saying. It's too bad because more and more common to see experienced Linux users switching to Mac or Windows-based systems because they've just plain gotten tired of hacking around the same problems over and over and over and over again.

The Linux desktop experience is much more buggy and crash happy then Windows nowadays. People need to learn that having the source code is not a acceptable substitution for binary compatibility and good quality control mechanisms. It hurts open source software just as much as closed source stuff.

LPC: Linux audio: it's a mess

Posted Sep 19, 2008 18:06 UTC (Fri) by einstein (subscriber, #2052) [Link]

> The Linux desktop experience is much more buggy and crash happy then Windows nowadays.

LOL, I don't think so - although, who knows - I haven't run windows for some time, does it not crash anymore? Wow, that would be one for the books.

The linux desktop with pulseaudio has been working well for me (suse 11.0 at home, ubuntu hardy heron at work) but then again, perhaps my sound hardware is blase? (intel built-in) I do the usual, some web browsing, some gaming, some movies, some music. Other than a wrapper script that I needed for my 9 year old copy of quake 3 arena, everything just seems to work, out of the box.

Alternative for Adobe Flash users

Posted Sep 19, 2008 18:40 UTC (Fri) by dmarti (subscriber, #11625) [Link]

Don't know about anyone else but I have replaced Adobe Flash on my main laptop with Gnash. When I started running it this spring, it played YouTube usually, other Flash video sites almost never. Now YouTube always works and other Flash video sites work sometimes. Not ready for Grandma yet, but I'm not a big net video watcher and don't play Flash games much, so close enough for me.

Alternative for Adobe Flash users

Posted Sep 20, 2008 10:08 UTC (Sat) by DonDiego (subscriber, #24141) [Link]

What about Gnash's speed? Adobe Flash is already incredibly and annoyingly slow, will I have to invest in new hardware to run it? Yes, I still happily use a 500MHz PC...

Alternative for Adobe Flash users

Posted Sep 20, 2008 19:04 UTC (Sat) by jlokier (guest, #52227) [Link]

I ran Gnash on my Ubuntu Handy install for a few months - and it worked ok, and played Youtube videos for a while. But after a while it stopped playing Youtube and all other videos - it would just sit there with a spinner.

So I had to remove Gnash and replace it with the original Adobe Flash plugin.

(Unfortunately although there's a straightforward UI from Firefox asking which Flash plugin you'd like to install (I'd picked Gnash), there seemed to be no UI for removing or changing it.)

Disable Flash in the Browser

Posted Sep 25, 2008 13:12 UTC (Thu) by alex (subscriber, #1355) [Link]

Install both and then disable one with Tools/Add-ons/Plugins in Firefox 3?

LPC: Linux audio: it's a mess

Posted Sep 19, 2008 22:11 UTC (Fri) by nix (subscriber, #2304) [Link]

Windows never crash? Well, it doesn't bluescreen much anymore, but it's
still deadlock-prone, especially if it loses network connections.

e.g. the backup domain controller went down at work today (our desktops
are Windows XP *sigh*). Within seconds *everything* on *everyone's*
desktop had frozen. Even my VNC and X sessions were stalled. Most of the
mouse pointers had frozen (but not all), and ctrl-alt-del did nothing.
Even the primary domain controller froze. It all stayed stalled until both
the primary and backup domain controllers were simultaneously rebooted.

That's robustness for you. (If everything's frozen solid, it can't crash.)

The time was when heavily-interlinked NFS systems could do that in the
Unix world, but I haven't seen anything like it for many years, and even
at its worst Unix gave you more tools to diagnose it than roomfuls of
simultaneously-frozen boxes. In some ways Windows is going *backwards*,
even before you look at the Vista trainwreck.

It's not the only mess

Posted Sep 21, 2008 10:07 UTC (Sun) by man_ls (subscriber, #15091) [Link]

But still it is true that the Windows desktop has advanced a lot in that respect: my corporate w2k desktop has not frozen once in a year. Mac OS X has similarly become a lot more robust in the intervening years since I stopped using it. Meanwhile Linux (and its many variants) regularly breaks hardware compatibility, shows multiple regressions and makes you play with your kernel every once in a while.

Maybe I'm biased because I use only debian testing, and maybe Mandriva or Suse are better. And of course there are areas where it excels (such as performance and support for older hardware). But I'm not sure there aren't at least some engineering reasons for the lack of quality. Windows or Mac OS X have one wireless API well thought from the beginning, and most gadgets work fine with it (while Linux still struggles with common wireless chips). More to the point, they have not had two major rewrites of their sound systems in a few years (ALSA and PulseAudio).

Things should just work, and once they are working they should just keep working, without excuses.

LPC: Linux audio: it's a mess

Posted Sep 21, 2008 20:29 UTC (Sun) by NAR (subscriber, #1313) [Link]

The time was when heavily-interlinked NFS systems could do that in the Unix world

This is very much present tense at my workplace...

LPC: Linux audio: it's a mess

Posted Sep 21, 2008 23:57 UTC (Sun) by nix (subscriber, #2304) [Link]

'-o bg' solves most of that these days :)

LPC: Linux audio: it's a mess

Posted Sep 21, 2008 22:55 UTC (Sun) by mezcalero (subscriber, #45103) [Link]

The flash crash happens when you close a Flash animation (i.e. usually change/close a web site), not when you close a window.

LPC: Linux audio: it's a mess

Posted Sep 19, 2008 14:56 UTC (Fri) by ewan (subscriber, #5533) [Link]

And Adobe Flash does crash out my browser quite often.

As well as having a working libflashsupport Fedora also runs plugins inside nspluginwrapper, even on 32 bit installs. That means that flash runs isolated in its own process and doesn't take out your browser when it dies.

It is possible to get this right; if Ubuntu isn't doing it that's just an Ubuntu bug.

LPC: Linux audio: it's a mess

Posted Sep 19, 2008 15:02 UTC (Fri) by drag (subscriber, #31333) [Link]

Well this is Debian Lenny/Sid with epiphany-webkit.

Also the problem crops up in other applications that can support Mozilla plugins, like Liferea.

I will take a look at nspluginwrapper, though.

LPC: Linux audio: it's a mess

Posted Sep 20, 2008 6:35 UTC (Sat) by drag (subscriber, #31333) [Link]

Just for the record.

I installed and got PulseAudio working in Debian. And everybody above was right.. flash 9 doesn't work for shit. If I do the "export FLASH_FORCE_PULSEAUDIO=1" I can get it to sort of work for firefox, but not for anything else.

So I installed the Flash 10 beta and it seems to be much much better. Works happily with pulseaudio, but I had to disable framebuffer compression with the Intel driver stuff to get it to work without video corruption (of the flash video, not the display). This was in Debian Sid.

LPC: Linux audio: it's a mess

Posted Sep 21, 2008 22:53 UTC (Sun) by mezcalero (subscriber, #45103) [Link]

Actually libflashsupport does not fully fix the problems Flash9 has with PA.

The libflashsupport interfacing in Flash9 is racy. Thus you might get a freeze or crash in some cases when you close a web site in your browser. All people that had a look on this problem agree that we cannot really work around this in our code -- it is Adobe's job to fix this. And you know what? Adobe actually did so, in Flash 10.

So, in summary: Flash 9 on PA is not perfectly stable, regardless how you run it. But the people to blame for that are not us, it's Adobe. Please point your fingers in the right direction when you complain!

(Running Flash 9 in libflashsupport in a plugin wrapper is the best way to run Flash on PA right now. That way crashing flash will not bring your entire browser down -- and if you ask me, allowing closed source software to run inside the browser process is a bad idea anyway.)

Lennart

LPC: Linux audio: it's a mess

Posted Sep 22, 2008 7:41 UTC (Mon) by NAR (subscriber, #1313) [Link]

But the people to blame for that are not us, it's Adobe. Please point your fingers in the right direction when you complain!

From the developer's point of view, you're right. From the user's point of view, you're wrong. Youtube used to work with Ubuntu Gutsy (I don't know about your browser, but it doesn't crash mine), doesn't work anymore after the Hardy upgrade (which introduced PulseAudio), so it's obviously PulseAudio is the one that broke my user experience.

LPC: Linux audio: it's a mess

Posted Sep 22, 2008 8:16 UTC (Mon) by ceplm (guest, #41334) [Link]

No, it's Ubuntu which did not make sure, that flash works.

LPC: Linux audio: it's a mess

Posted Sep 21, 2008 22:46 UTC (Sun) by mezcalero (subscriber, #45103) [Link]

Priorizing support for broken closed-source software over a good, modern, well supported core sounds like a really really bad idea to me. If you really think that we should allow Adobe to take the Linux audio system hostage like this than please ... go away, use Windows.

Adobe's audio interfacing in Flash 9 was a big failure. But they fixed things in Flash 10 for us now. It's getting better.

Lennart

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds