Default ALSA device must use PulseAudio, otherwise ALSA applications may fail

Bug #198453 reported by Evgeny Kuznetsov
388
This bug affects 14 people
Affects Status Importance Assigned to Milestone
PulseAudio
Invalid
Undecided
Unassigned
alsa-lib (Ubuntu)
Won't Fix
Medium
Unassigned
Hardy
Won't Fix
Undecided
Unassigned
alsa-plugins (Ubuntu)
Won't Fix
Medium
Unassigned
Hardy
Won't Fix
Undecided
Unassigned
pulseaudio (Ubuntu)
Fix Released
Medium
Unassigned
Hardy
Won't Fix
Undecided
Unassigned

Bug Description

Steps to reproduce:

Run both of these at the same time:
gst-launch-0.10 audiotestsrc ! pulsesink
gst-launch-0.10 audiotestsrc ! alsasink

If your default sound device does not support hardware mixing, the second command will fail. ALSA cannot use the device while PulseAudio is using it, and this affects a lot of applications.

Note that if you run the commands the other way around, alsalib will use dmix, and then so will pulseaudio, so there is not as much of a problem this way around (except for the fact that dmix and PA are doing the same job, and you can not control the ALSA-using apps' volumes and routing with PA.)

Resolution:

Follow http://pulseaudio.org/wiki/PerfectSetup#ALSAApplications
i.e. install /etc/asound.conf with:

pcm.pulse {
    type pulse
}
ctl.pulse {
    type pulse
}
pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

Then, install the package "libasound2-plugins", as it contains the required "pcm_pulse" and "ctl_pulse" plugins.

Note, too, that there are some applications that fail with ALSA->Pulse:

SDL* seems to hang with neverball, but that is fixed by installing the PulseAudio backend for SDL (libsdl1.2debian-pulseaudio), which will replace the default ALSA backend.
WINE has its own issues with regards to device selection, which I don't know a remedy for.
Skype* also has its own problems, but these aren't fixable by us and should not block us, though should be given some consideraton.

* SDL applications (using libsdl1.2-alsa backend), Skype and possibly other misbehaving applications work properly with later versions of libasound2 & libasound2-plugins from Debian unstable.

Revision history for this message
Mary Gardiner (puzzlement) wrote :

Partially confirmed: I have had the same problem with Skype and aplay, I have not yet tried the /etc/asound.conf workaround.

A workaround (NOT a fix) is apparently to run applications like this:

pasuspender skype

Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

Another workaround is to simply killall pulseaudio.

Revision history for this message
Anders (andersja+launchpad-net) wrote :

This is definitely a bug. Skype completely crashes, a good source of info here:
http://forum.skype.com/index.php?showtopic=112021

Revision history for this message
Anders (andersja+launchpad-net) wrote :

Updated status to "Confirmed"

Changed in pulseaudio:
status: New → Confirmed
Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

Thanks for the useful link, Anders. To my mind, we're not only facing a bug — it's a regression actually, and as such should be treated as very important. It's nice to be on the cutting edge of progress and use latest inventions like PulseAudio in our favoured distro (though my experience of PulseAudio doesn't let me call it a great and welcome invention), but actually breaking things that DID work otherwise is surely completely unacceptible.

Revision history for this message
Chow Loong Jin (hyperair) wrote :

Please look at Bug 109439. Seems like the same bug to me.

Revision history for this message
Chow Loong Jin (hyperair) wrote :

This is a working workaround for me until the bug is fixed: http://ubuntuforums.org/showthread.php?p=4526841#post4526841

Revision history for this message
Anders (andersja+launchpad-net) wrote :

Could someone with triage-rights please set this to medium or high?

The current system behaviour could be a bit of a showstopper for new and experienced users alike and should be adressed for a LTS release!

Cheers

Revision history for this message
Anders (andersja+launchpad-net) wrote :

Have tested workaround UNsuccessfully:

pasuspender skype

Machine hangs completely, have to do hard reboot (never good news!)

Revision history for this message
Susan Cragin (susancragin) wrote :

The new default pulseaudio in Hardy does not work with many non-Gnome programs, not just Skype. I am worried that everyone (Ubuntu, Alsa, Pulse, Wine) is not on the same page. Will try cross-posting bug information.
I am concerned for myself because I use Dragon NaturallySpeaking in Wine as an input mechanism, and that program works poorly for me now.

Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/198453
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/109439

Pulse:
http://www.pulseaudio.org/ticket/198

Alsa:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=2601

Wine:
http://bugs.winehq.org/show_bug.cgi?id=10495
http://bugs.winehq.org/show_bug.cgi?id=10910

Tom's Wine Patch:
http://www.winehq.org/pipermail/wine-patches/2008-February/050561.html

Skype:
http://forum.skype.com/index.php?showtopic=112021

Revision history for this message
Susan Cragin (susancragin) wrote :
Revision history for this message
Susan Cragin (susancragin) wrote :

Sorry. In the comment above I put the ekiga bug report twice and missed the gnome.
http://bugzilla.gnome.org/show_bug.cgi?id=413552

Revision history for this message
Nat Tuck (nat-ferrus) wrote :

Me too.

Revision history for this message
Roberto Cássio Jr. (rcsdnj) wrote :

Just for my curiosity, any hopes to have this fixed for Hardy final?

Maybe I'm wrong, but PulseAudio as the default sound server doesn't look like a big improvement, with this bug (and similar others)...

Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

On my system, the problem seems to have vanished. I have occasionally rebooted the system, and decided not to kill pulseaudio after boot to test things a bit. To my astonishment, sound works flawlessly, even in skype, games, etc.

Flashplugin in Firefox sometimes locks sound to itself (producing the very same behaviour as described in the bugreport), but after closing the problematic page everything works again.

I know that by Launchpad rules my report is sufficient to close this bug (as I am the original reporter), but I think it's wise to wait till at least one more person confirms that the problem is gone.

Revision history for this message
Susan Cragin (susancragin) wrote :

Still a problem on my system. I re-install the whole system 3 days ago and have performed all available updates. I have not tried any workarounds, so my system is "as-installed."

Revision history for this message
Roberto Cássio Jr. (rcsdnj) wrote :

Still a problem in my system too. Evgeny, did you try to test playing a video on youtube and using skype (or another alsa-only program) at the same time? Does both output sounds work?

Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

Thanks for pointing this simple test out, Roberto — they don't sound simultaneously. Skype (and aplay, vlc, all stuff like that) are useless unless I close the page with a YouTube video in Firefox (simply pausing or stopping the video doesn't make no good). But anyway, after closing that page ALSA stuff starts sounding again, which was absolutely not the case when I first reported this bug. There is some progress anyway.

By the way, YouTube is not the only good test for this issue: having a video running (or even paused) in Totem effectively blocks ALSA sound as well. At this point I revoke my statement about this problem having been resolved. :)

Revision history for this message
Susan Cragin (susancragin) wrote :

I am also getting very weak incoming sound with my non-gnome recording devices. I assume incoming (recorded) sound is part of the bug?

Revision history for this message
Amroth (dudeami0) wrote :

Hello,

I can also semi confirm this bug. Heres what happens with me (As of March 30th):

1) Start up skype (skype in terminal)
2) No login sound
3) Try calling someone, skype freezes and either requires killing the process

But I can confirm that for me the pasuspender skype workaround does work. I just did that and changed the icons command from skype to pasuspender skype until its fixed.

~Kris

Revision history for this message
Ulrich Hobelmann (u-hobelmann) wrote :

Confirmed. Skype does not work at all on Ubuntu 8.04, and no matter how i configure its sound device, it doesn't work. 'padsp' doesn't change anything, either.

While this might be Skype's fault, it seems that Pulseaudio has existed for at least a year now, and at least for a year there have been complaints about Skype+PA not working, all over the web. I'm not sure if PA should be included in a stable release. I have no idea how i'm supposed to make Skype phonecalls now - downgrade to 7.10? I'd rather not, especially since this is supposed to become an LTS (read: extremely stable) release.

Revision history for this message
Pacho Ramos (pacho) wrote :
Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

Ulrich, Skype is not the only issue with PulseAudio (though one of the most annoying ones). Including PulseAudio in the coming LTS release doesn't look too wise to me either, but it's included and we'll have to live with it anyway.

A temporarily workaround was proposed earlier in this bugreport: issue
killall pulseaudio
in console. This switches PulseAudio off (until the next GDM restart), allowing dmix to be the audio mixer, which solves the audio problems.

Unfortunately, upstream PulseAudio team's position is that PulseAudio is completely allright, and instead all those applications that don't work well are broken (wine, Skype, ALSA, VLC, the list may continue). It is thus highly unlikely that this bug will be resolved ever in the thinkable future.

Revision history for this message
Roberto Cássio Jr. (rcsdnj) wrote :

I think putting the command:

$ asoundconf set-pulseaudio

Will also enable alsa redirection for pulse audio, at least per user, and may be a solution for the problem.

I'm using Hardy x86_64, and, sadly, libasound2-plugins is not avaliable for 32 bits apps like Skype ( https://bugs.launchpad.net/bugs/182731 ). I'd like to know if this works for 32 bit Hardy users, though. Anyone tested?

If it works, then setting alsa redirection to PulseAudio by default may be a fix for this bug... at least for the cases where libasound2-plugins are avaliable. Why not to make this change?

If setting this command it don't work, maybe there's something really broken with pulseaudio... I don't know... just my opinion.

Revision history for this message
Ulrich Hobelmann (u-hobelmann) wrote :

I tried the .asoundrc thing, but neither with pulse running, nor with 'killall pulseaudio' will Skype work, neither with 'pulse' nor the default device. It's always 'problems with audio playback'.

Anyway, Ubuntu isn't the only distro to switch to default-PA, so here's hoping Skype will do the only sensible thing: be compatible with it.

Changed in pulseaudio:
status: Unknown → New
Revision history for this message
Eduardo Durany Fernández (edurany) wrote :

If you don't enable alsa redirection for pulseaudio (the .asoundrc thing or asoundconf set-pulseaudio), you can try this: https://bugs.launchpad.net/pulseaudio/+bug/109439

Revision history for this message
Pacho Ramos (pacho) wrote :

Maybe a "tracker" bug should be opened for collect all issues related with pulseaudio. Most of them can be fixed or workarounded, but a tracker bug is really useful for checking opened bugs easily. At least with bugzilla (I don't know how launchpad manages this) the tracker bugs has all related marked as blockers

Thanks a lot

Revision history for this message
Alessio Gaeta (meden) wrote :

Daniel Chen made an interesting comment on HAL here: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/109439/comments/4 . I agree with him but this bug remember us all that ALSA EXISTS, along with dmix... To get rid on "dancing indexes" one could base settings on symbolic card names... As I wrote in PulseAudio TRAC (http://www.pulseaudio.org/ticket/25#comment:6)

I managed to deal correctly with ALSA and dmix disabling module-hal-detect and setting up thing manually as follow (in default.pa):

{{{
# Carica i moduli In/Out Alsa per la Audigy
load-module module-alsa-sink device=front:CARD=Audigy,DEV=0 sink_name=Audigy_Out_2.0
load-module module-alsa-sink device=surround51:CARD=Audigy,DEV=0 sink_name=Audigy_Out_5.1
load-module module-alsa-source device=hw:0,0 source_name=Audigy_In
#
# Carica i moduli In/Out Alsa per la IntelHDA
load-module module-alsa-sink device=front:CARD=Intel,DEV=0 sink_name=IntelHDA_Out
load-module module-alsa-source device=hw:1,0 source_name=IntelHDA_In
}}}

Now, using ALSA device names, I can choose where redirect streams and the number of channel happily, without locking the hardware. And Skype works too.
Hope that can help.

Revision history for this message
Duncan Hawthorne (duncan.hawthorne) wrote :

install and run pavucontrol.
apps that use pulseaudio will appear in pavucontrol when making sound, and those that do should all work together.
any apps that dont appear in pavucontrol will not work with any apps that do.

i think the best idea is to look for and report individual applications that dont use pulseaudio by default (so dont appear in pavucontrol) in individual bug reports, rather than doing confusing bug reports about incompatibilities between various applications, and not knowing which app is the broken one. Then you can focus on what the real bugs are.
eg for vlc: bug #208579 (fix included)
for mpd: bug #192735 (fix included)
for audacious: bug#175536 (easy to fix)
programs using sdl: bug #203158 (fix included)

this is the way to make things smooth for the release

skype doesnt work very well at the moment, lets all go and nag skype about it in their forums.

Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

Josh, thank you for the perfect illustration of the upstream PulseAudio team position.

I repeat: there's NOTHING WRONG with Skype, aplay, oolite and any other application that relies on ALSA. They work with ALSA, they work in any other distribution, they worked well in Gutsy, so having to "fix" them to work in Hardy is actually a REGRESSION BUG in Hardy itself. This is what the upstream Skype team says, and in my opinion, they are perfectly right.

With Skype team saying that Skype is not broken so PA should be fixed (and they're right) and PulseAudio team saying that Skype is broken and should be fixed(they're perfectly wrong, but Ubuntu team seems to share their opinion) we are never going to have all the applications (including old games etc.) working in Ubuntu ever again.

Revision history for this message
Roberto Cássio Jr. (rcsdnj) wrote :

I believe that applications should be fixed, as Josh pointed, considering that the goal is to have PulseAudio really as the "standard" way to go. If PulseAudio is being consolidated, soon or later, they'll have to be changed. So those fixes would be for accomplishing the goal, and not because "the programs are broken".

But I also believe that ALSA emulation should be provided as default and work flawlessly for this transition, since not all packages will suddenly support PulseAudio. This doesn't seem to be the reality in the moment, though. libasound2-plugins is not installed as default on Hardy (and there's not even an working package for 32 bits apps in x86_64 - https://bugs.launchpad.net/ubuntu/+source/alsa-plugins/+bug/182731 ).

I've read that, in some cases, like wine, the ALSA implementation was making wrong assumptions about the hardware - which prevented working correctly using PulseAudio's alsa emulation. In this case, PulseAudio's team position seems to make sense for me - why would they emulate a behavior to support bad written code, making assumptions that wouldn't work even on some instances of "real" hardware? I don't know if it's Skype case, but if it is, then it should be fixed by them - just the same way as they should fix if some people were having problems because their soundcard doesn't have an "A" or "B" non-standard feature (like a mixer channel). Wine team already said they're taking care of this ( http://www.winehq.org/?issue=344#Wine%20/%20Pulseaudio%20issues )

And while they don't fix, the "real" soundcard is accessible to the ALSA relying applications when no program is using the PulseAudio's stream (at least in my computer). The problem is that some programs (like flashplugin-nonfree, on Firefox, and other one which I don't remember the name) likes to "hold for them" the audio stream, and, when this happens, there's no sound avaliable for the non-PulseAudio applications.

So, the important question to the bug: isn't there a "selfish audio application" making this problem happen in your machines? On my machine, Skype and Wine works fine - but only when there's not another program playing through PulseAudio.

Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

Roberto, you make a perfect point and anybody having any common sense is bound to agree with you. Answering your question, on my machine it's flashplugin-nonfree that causes troubles, not freeing up sound until I close the browser alltogether.

And I think ALSA emulation would better be more complete, so that PA-enabled programs don't block sound from not-PA-enabled ones. It's a real pity to miss Skype calls or some notifications via aplay while watching a movie in Totem, for example.

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

You both make perfectly valid points, but I think you don't put the stress exactly where you should, so... sorry for the spam:

1) The ideal situation would be that all applications have native PulseaAudio output, to take advantage of it's great features.
  Corollary 1a. Bugs in any application's PA module are the application's fault, and should be fixed in the application. This minimizes effort and cruft, and maximizes the opportunities for future development of PA.
  Corollary 1b. If this isn't true _now_ for an application, it can _only_ happen for future versions of it. Which means that only applications that i) already have PA support or ii) will add it in the future can be in this ideal situation.

2) The practical situation is that there will always be applications that don't have native PA support. In particular, many users will need (for too many reasons to cite here) to run an application like this. Often this is because they _need_ to use an old, not-still-developed application or version of it. That last part is important: even if application X is still worked on, if the user _needs_ an older version (say, because the new ones don't work, or is only 64 bit, or, like Skype, is developed primarily on Windows), they will need it supported. And there are always legacy applications.
  Corollary 2a. Support for ALSA/OSS/etc is by definition _legacy_ support, for applications that won't work with PA.
  Corollary 2b. We have this compatibility layer _because_ users _need_ to use things that don't fall into the ideal situation above, _and_ because if we don't have this compatibility PA will not see widespread use, developers will not add PA support in the future, and we'll get even further away from the ideal situation.
  Corollary 2c. Even if a legacy app. is broken, PA _needs_ to support it and work. This is important enough and hard enough to agree with that it deserves a re-statement:

We don't want PulseAudio to have ALSA support. We don't care about ALSA in particular. We want PulseaAudio to have support for ALSA-only _applications_. Read that again:

== We want PulseaAudio to have support for ALSA-only _applications_, not ALSA per-se. ==

(This applies for OSS and any other compatibility layer.) Whether or not these apps are broken _totally_ irrelevant! The compatibility layers are there, by definiton, for applications that are _not_ supported with PulseAudio. If their developers cared, they'd have added PA support anyway, and we wouldn't need the compatibility layer.

If someone can run, say, Skype on ALSA (despite its brokenness) and they can't with PA, they won't use PulseAudio. We NEED such apps to be usable, so that people will use Pulseaudio, so that current developers have an incentive to add PulseAudio support. I know it's difficult, and I know it takes developer time, and I know they work for free, and I know the best thing would be to shut up and send a patch. But that doesn't change the truth of it.

Revision history for this message
Alexander Jones (alex-weej) wrote :
description: updated
Revision history for this message
Travis Watkins (amaranth) wrote :

Really need to figure out what to do with this before release. Either make pulseaudio use dmix so other apps can talk to alsa or setup alsa to route audio through pulseaudio, I guess.

Changed in pulseaudio:
status: New → Invalid
importance: Undecided → High
milestone: none → ubuntu-8.04
Revision history for this message
Alexander Jones (alex-weej) wrote : Re: [Bug 198453] Re: Default ALSA device must use PulseAudio, otherwise ALSA applications may fail

PulseAudio on DMix is bad.

http://<email address hidden>/msg00636.html

Revision history for this message
Steve Langasek (vorlon) wrote :

As noted, running pulseaudio through dmix is almost certainly a bad idea. Which means that, short of disabling pulseaudio by default (not a great idea one week before release as it would leave us with the converse problem of re-testing everything without pulseaudio), any fix for this needs to happen in alsa-lib rather than in pulseaudio.

Leaving the ubuntu-8.04 milestone in place, but in practice we need to get a pretty high degree of confidence, pretty quickly, in any proposed fix in order to get it in on time.

Changed in pulseaudio:
milestone: ubuntu-8.04 → none
status: Confirmed → Invalid
Changed in alsa-lib:
importance: Undecided → High
milestone: none → ubuntu-8.04
status: New → Confirmed
Revision history for this message
Luke Yelavich (themuso) wrote :

If all the Ubuntu desktop distros, Kubuntu, Xubuntu etc all used PulseAudio, this wouldn't be a problem to solve. However, since only Ubuntu, Gobuntu, and UbuntuStudio use pulseaudio for the desktop, things are a lot more difficult.

As Steve has stated, this needs to be done in alsa-lib/libasound2. However, not as the default device, as explained above.

An asoundrc configuration could be created for applications to use the pulse plugin, however not all applications either allow the selection of a custom asoundrc config in their UI or implement alsa support in such a way that using asoundrc configs is impossible.

Then there is the problem of these applications being used by people who don't use pulseaudio, which rules out per application configuration for using pulseaudio.

I think the best bet at this stage in the release, is user education/documentation, and mention something in the release notes about the current situation WRT audio.

Revision history for this message
Nat Tuck (nat-ferrus) wrote :

Having Ubuntu 8.04 LTS actually work (apps play sounds at the same time) seems to be more important than maintaining perfect cross-variant package elegance on this one package.

Why not introduce an "alsa-pulse" package that (provides: alsa-lib; conflicts: alsa-lib; depends: pulseaudio) that consists of alsa-lib with pulse audio as the default device? Include that in the pulseaudio variants and the existing lib in the non-pulse variants.

Revision history for this message
Alexander Jones (alex-weej) wrote :

I really don't think we can leave 8.04 in its current state, there are
far too many ALSA-using apps that people are going to wonder why
they're not working while they have Rhythmbox paused or whatever.

Steve, Luke is suggesting that this should be fixed directly in
alsalib. As I understood your comment, you meant that, for example,
the ALSA configuration setting pulse to be the default device should
be included in the /package/ alsa-lib. What did you mean?

And if there is a problem with just including a default ALSA
configuration, please can you update the original description.

Revision history for this message
Anders (andersja+launchpad-net) wrote :

Skype is just one of the applications impacted by this. 91 thousand users have skype installed, according to popcon.ubuntu.com In a couple of days Hardy Heron is released "to the masses". What's happening with this?

See also: http://forum.skype.com/index.php?showtopic=112021 where skype dev Andypoo confirms that Skype is talking to distribution maintainers on a regular basis?

Revision history for this message
Ulrich Hobelmann (u-hobelmann) wrote :

FWIW, I've been successful in running Skype within 'pasuspender' (all other "solutions" I read about all over the web did not work at all).

Maybe there should be an Ubuntu info page on this. If there is an Ubuntu Skype package (last I checked there wasn't), it should make the desktop icon run pasuspender by default (as mine does now). No, this won't make Skype produce sound next to all your other apps, but at least it will WORK (which for me is a huge improvement compared to where I was a few weeks ago).

Revision history for this message
Alexander Jones (alex-weej) wrote :

I've updated the description with more details about the issues this causes so we can evaluate better a solution.

Steve, any official news?

description: updated
Revision history for this message
Pacho Ramos (pacho) wrote :
Revision history for this message
Duncan Hawthorne (duncan.hawthorne) wrote :

for skype check out:
http://forum.skype.com/index.php?showtopic=119961 for info.

a new Static OSS build of Skype 2.0.0.68 with video support has been released to be got from here: http://www.skype.com/download/skype/linux/choose/
which then functions through padsp, ie will go through pulseaudio

Revision history for this message
Daniel T Chen (crimsun) wrote :

I fail to understand why the PulseAudio task was rejected, and the alsa-lib one, retained. Allow me to explain, from the perspective of avoiding regressions from previous, supported Ubuntu releases, why setting the default pcm/ctl device (using an asoundrc) to pulse is a HORRIBLE idea for Ubuntu (not Edubuntu) 8.04 LTS (or its initial point release).

Existing ALSA-only apps must continue to work via ALSA. By that statement, I imply that, for an LTS, ALSA apps lacking a native PulseAudio output plugin should not be routed through PulseAudio. Not only do certain high profile ALSA-native apps (e.g., Skype, Flash, Audacity) break when routed thusly, but having them break in an LTS is not supportable. For 8.10, sure, I wholly support breaking "the few" to force a migration toward PulseAudio, but please let's not make things suck any harder for 8.04. Furthermore, we now have a situation, thanks to changes landed in the archive due to bug 192888, where a race condition clearly exists between two high profile applications (PulseAudio and Flash, both competing for exclusive and shared, respectively, ALSA device access). Audio will be inaudible nondeterministically depending which of those two applications grabs the device and in what mode.

Clearly I am not pleased with either of these "solutions":

1) having PulseAudio grab hw:X exclusively (the current state), having ALSA-native apps routed through the pulse pcm plugin (only the current state for Edubuntu), and having libflashsupport (not the current state, and known to wreak havoc on many a Firefox 3.0b5 install with flashplugin-nonfree) installed;

2) having PulseAudio use dmix & dsnoop (not the current state, and discouraged) but allowing existing ALSA-only apps to continue working.

We're a couple days from release, so it seems too late to roll in any new changes. I will state unequivocally, however, that our current state is a mish-mash of (1) and (2) and upon release will result - heck, already has resulted - in quite some concern.

Revision history for this message
Alexander Jones (alex-weej) wrote :

"Solution 1" is fine. libflashsupport is less than optimal, but we
have to live with a closed source de-facto Flash player to be
practical for now, so that's that.

If ALSA-using applications are expecting exclusive access to the
hardware, that is their fault. If they are using the "default" device
but treating it as if it was a physical hardware device, that is their
fault. Two fatal errors by a handful of ALSA apps is not a
showstopper.

It is clear to me that the solution is to follow "The Perfect Setup"
and just fix up the ALSA applications in due course.

If something needs to be done to Skype to get it to work, along the
lines of libflashsupport, someone can do it if they care enough. You
can't expect us to be sympathetic towards closed source software for a
proprietary comms. system that restricts our freedom, no matter how
"high profile" it may be.

Revision history for this message
Alexander Jones (alex-weej) wrote :

Right now, the only thing using PA directly is GStreamer, as per the default audio elements in GConf.

If PA is using ALSA DMix, there is *no* user benefit (we don't ship the PA tools, and they're not integrated with the GNOME audio stuff anyway) of using PA and in fact simply adds more resource usage and (unknown) audio latency.

Therefore, we should either:

1. Pull out, switch the GStreamer default outputs back to halaudiosink, and install ESound again, as a dep of u-d, for desktop sound events. This bug can then be closed as Invalid, and we can try again for 8.10.

2. Attempt to actually fix this bug by implementing upstream's "Perfect Setup" and fixing the few bugs that entail.

It seems 2 is the better option, as we have already name-dropped PulseAudio to death in the press.

From what I've gathered, using DMix and DSnoop in PA is the way things are going, which is just a messier final product than 1, above.

Revision history for this message
Alexander Jones (alex-weej) wrote :

ESD is in a bad way atm, it seems to be causing everything to hang now and again. Disabling it, however, only loses you login/logout sounds.

With that perspective, maybe using PA purely as a drop-in for ESD and nothing else wouldn't be too bad a situation. Of course, this would be using ALSA DMix.

I still think going the whole way with PA is the better solution.

Revision history for this message
Conn O Griofa (psyke83) wrote :

We have functional Skype via the OSS version; it is available in the Medibuntu repositories as skype-static-oss. If we include libflashsupport, sound will indeed work, but will also cause most users no end to their frustration (browsing a couple of Youtube pages is enough to trigger a crash).

To top it off, audio is stuttering in many applications with the default pulse settings (e.g. VLC using pulse - stuttering; Skype via "padsp skype" - a *lot* of stuttering). This is a pretty desperate situation and I do not look forward to the poor folks that will be triaging and marking duplicate bugs after release.

Revision history for this message
Jeremy Nickurak (nickurak) wrote :

FWIW I for one have been using upstream's "perfect setup" configuration (pointing alsa apps to pa via the libasound pulse plugin), and it's worked great. With the exception of mostly diagnostic tools (speaker-test for example), it's worked fine. Firefox still crashes with the libflashsupport problems, but that's unavoidable as far as I'm aware.

Revision history for this message
Pacho Ramos (pacho) wrote :

Maybe would be interesting allow users to easily disable pulseaudio if they have a lot of problems :-/

Revision history for this message
Robert Persson (ireneshusband) wrote :

Please forgive me being very blunt about this, but the last thing I need right now is for open source ideologues to tell me what I need. If I wanted that I would be using Debian.

What I need is this:
In three weeks time I shall be living on a different continent to my children. I need to communicate with them via both audio and video. I need to communicate with other people as well.

I might be able to do a lot of this using Ekiga and iChat, but I don't know this for sure and I certainly won't be around to troubleshoot any problems on a mac on another continent, which may or may not be purchased before I leave. I need something that is known to work. Skype, for all its technical and political limitations, works—except for the pulseaudio problem of course. In addition to this, a lot of my friends use Skype. They don't use SIP-based software.

The OSS version of Skype is, as far as I understand it, an old one without video support. I need video so that two young children won't forget what their dad looks like.

I bought a laptop, deleted windows and installed hardy. I did this because I was confident that hardy would be usable for day-to-day stuff. Please don't drive people like me away.

Skype has problems; it's implementation of alsa is lousy. Flash has even more (it crashes all the time). That's a fact of life. Without a doubt the quality of such software would improve radically if is were open-sourced, but that isn't going to happen. Free software developers may believe that what they are doing is very important (and they are often right), but we can't expect commercial software companies to see things the same way just because we tell them they should. That such companies now see fit to support Linux at all is a major achievement for those who have made gnu/linux what it is today.

Skype is a very important piece of software for a lot of people. Please just do whatever hacks you have to do to get it working. If that involves dmix, then so be it.

Revision history for this message
Conn O Griofa (psyke83) wrote :

Robert,

If you have the Medibuntu repository active, you can download skype-oss-static that appears to be the same version as the latest ALSA build (2.0.0.68+repack-0medibuntu3). You can use the padsp wrapper with that version.

There's no need to get all hot and bothered; people here are trying to ascertain the best way to configure PulseAudio. Using dmix, for example, will introduce extra latency to audio output and increase overall CPU usage. These are important issues and are relevant for many (especially mobile) users. This is not a matter of "working" vs "not working"; it's a matter of getting things to work in the most optimal way.

Revision history for this message
Alexander Jones (alex-weej) wrote :

Robert, I sympathise with your situation, but please don't be selfish.
Reverse engineering Skype and fixing it as a wrapper is an expensive
task. Unless you're gonna hire a developer to spend a lot of time on
it, I don't see it happening, sorry.

Revision history for this message
hob4bit (hob4bit-googlemail) wrote :

Hi, "pasuspender" does not always work correctly. I wrote a wrapper "amsn" which
KILLS (not suspend) pauseaaudio and resumes after amsn finsiehs. This works better
than pasuspender for me.

#!/bin/sh

MYUNAME=`id | sed -e 's/^[^(]*(\([^)]*\)).*$/\1/'`; export MYUNAME

PATH=`\`dirname $0\`/setbinpath amsn 2> /dev/null`:`echo :$PATH: | sed -e "s@:\`dirname $0\`:@:@g" -e "s/^://" -e "s/:$//"`; export PATH

# === Functions Start ===

#
# Which (avoids buggy csh version)
#
which() {
  for DIR in `echo $PATH | sed -e "s/:/ /g"`; do
    if [ -x "$DIR/$1" -a ! -d "$DIR/$1" ]; then
      echo "$DIR/$1" | sed -e "s@//*@/@g"; return
    fi
  done
}

# === Functions End ===

if [ ! "`which amsn`" ]; then
  echo "***ERROR*** Cannot find required \"amsn\" utility." 1>&2; exit 1
fi

if [ "`ps -u $MYUNAME | grep \" pulseaudio$\"`" ]; then
  killall pulseaudio > /dev/null 2>&1; (amsn "$@"; pulseaudio > /dev/null 2>&1) &
else
  amsn "$@" &
fi

Steve Langasek (vorlon)
Changed in alsa-lib:
milestone: ubuntu-8.04 → ubuntu-8.04.1
Revision history for this message
ljrossi (ljrossi) wrote :

I was very diasapointed with 8.04, keyboards troubles,nvidia drivers dont works, firefox 3 with no add ons, numpad not working , and primitive sound that remebers me the time win 95 , where you couldnt run two sound aplicactions.

I went to sound preference, on preferences menu, and just disable this "pulseaudio" I never know of it but it only mess up things.

I went back to ALSA setings and uninstall the pulse audio.

Revision history for this message
ljrossi (ljrossi) wrote :

Remenber

"Linux for human beings"

It should keep that way, pulseaudio included on 8.04 hows to the others.

Revision history for this message
Vytas (vytas) wrote :

I think you shouldn't express your general criticism here, this bug is (or should be) limited only to the issue mentioned in the title. While I agree that lots of unfinished stuff is causing problems in Hardy, this bug report should stay only on technical topic about PA/alsa

Revision history for this message
Bodsda (bodsda) wrote :

errm,.,. just thinkin back a bit -- what was wrong with alsa? it worked -- to fix this just sudo apt-get remove pulseaudio

Revision history for this message
wzzrd (maxim) wrote :

@bod_: Alsa is a part of the kernel that provides for sound drivers and direct access to sound hardware. Pulseaudio is a sound server. Two completely different things.

I can confirm this bug (especially Flash plugin seems to be devoid of sound when running Rhythmbox, for example). When using the /etc/asound.conf workaround mentioned above, I can at least use rhythmbox and have Gnome sound at the same time.

By itself, to me (but I am a layman in this subject), this seems like a conflict between apps that use Pulse and apps that use Alsa directly. The Alsa apps either get locked out by Pulse or lock Pulse out. If that is so, this is not a bug, but simply the way things work and a design fault on the side of the Ubuntu Hardy architects: it is possible to work around this, at least partially. For afaik, Fedora has been doing Pulseaudio for some time now, and I do not remember having trouble with Pulseaudio there. Devs might want to check out the way Fedora has tackled this problem. They must have a workaround for apps that want to use Alsa directly too. Don't know about Skype though. Hardly use it.

Revision history for this message
ubby (kostas-sytske) wrote :

I hope this bug will be solved within a short time because I have no sound at the moment.

Revision history for this message
Conn O Griofa (psyke83) wrote :

ubby,

If you cannot get sound in any application, then you're looking at the wrong bug. Most sounds work fine for applications installed by default in Ubuntu at the moment; this bug is to (hopefully) correct sounds for other applications that are not using PulseAudio (and thus to resolve problems with applications getting shared access to sound).

Revision history for this message
Susan Cragin (susancragin) wrote :

Ubby, If you have no sound at all, you should file a new bug. Ubuntu has a dozen or so open bugs on sound problems. Yours sounds like a sound card recognition problem, and they may not even be aware of your problem.
Go to this site and send them the tests they ask for under "Reporting Sound Bugs."
https://wiki.ubuntu.com/DebuggingSoundProblems#head-b6a8376cdf0f686715eda6c8d393479f5502a559

Revision history for this message
Conn O Griofa (psyke83) wrote :

We may need to arrange for a FFe to get this bug fixed. Here is the situation:

Using libasound2 and libasound2-plugins from Hardy, asound.conf as posted in this bug report:
Skype (ALSA version, configured to use "pulse" devices) - does not work correctly, process seems to freeze
Neverball - does not work correctly unless libsdl1.2debian-pulseaudio is installed

Using libasound2 1.0.16-2 and libasound2-plugins 1.0.16-1 from Debian unstable, asound.conf as posted in this bug report:
Skype (ALSA version, configured to use "pulse" devices) - works correctly with no problems
Neverball - seems to work correctly even with libsdl1.2debian-alsa installed

From changelog: http://packages.debian.org/changelogs/pool/main/a/alsa-plugins/alsa-plugins_1.0.16-1/changelog
   * Apply some important Pulse fixes, provided by lool, neurocyte and sjoerd.

Revision history for this message
Luke Yelavich (themuso) wrote :

Conn, could you please explain how you did this? I can't seem to reproduce it here, i.e using skype via the pulse alsa plugin.

Revision history for this message
Conn O Griofa (psyke83) wrote :

Luke,

What exactly can't you reproduce? What I found is that Hardy's libasound2 and libasound2-plugins packages seem buggy, so I tried Debian unstable's version and they worked. It seems Intrepid has already synced these packages, so you can grab from there as well.

I installed Skype from the Medibuntu repository, and it's the regular ALSA version. It seems if it is configured to use the "default" device via Skype's Options/Sound Devices it may not work, but sound definitely works when configured to use the "pulse" device.

Using Hardy's libasound2* packages causes Skype (and other applications that use the ALSA pulse plugin) to crash, but Debian/Intrepid's don't crash.

Revision history for this message
Vytas (vytas) wrote :

Conn,

thanks, your method works. However on my computer (hda intel sound card) skype sound under pulseaudio seems to be unclear, especially ringing sounds.
In PA volume control I can see "skype" blinking, not playing constantly. It is not that bad, but noticable

Revision history for this message
Vytas (vytas) wrote :

In addition, no luck with flashplayer. And with the libflashsupport it crashes like hell (a known bug)

Revision history for this message
Vytas (vytas) wrote :

What concerns wine, just run winecfg and select Audio-> ESD. Works fine for me

Revision history for this message
Conn O Griofa (psyke83) wrote :

To summarize:

The action proposed by this bug is *highly* recommended, with the following notes and caveats:

1. There will no longer be sound available for GDM, since it will attempt to use the "pulse" device, and since Hardy is configured to run PulseAudio on user login, the pulseaudio server will not be running. One solution is to configure pulseaudio to run as a system daemon (possible security risk, but we should investigate this) or to have per-user .asoundrc files generated instead of a global /etc/asound.conf (messy).

2. The package libasound2-plugins *absolutely must* be installed and added as a dependency of either pulseaudio or ubuntu-desktop, as this package contains the requires ALSA "pulse_pcm" and "pulse_ctl" plugins.

3. Related to the previous point, it seems Hardy's current libasound2 and libasound2-plugins packages are buggy. Some applications will not work properly with the "pulse" ALSA device, such as Skype and Neverball (sans libsdl1.2-debian-pulseaudio), see this bug's description. However, the latest version from Debian unstable (and I believe Intrepid) works correctly with these aforementioned applications. We can either backport the entire packages or isolate the pulse fixes and patch the 1.0.15 package. See comment #65.

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

I second Conn's point #3, the Debian packages of libasound2 fixed Rhythmbox hangs when using the ALSA plugin for me. Also, using the ALSA plugin fixed Rhythmbox playback on a remote server and stuttering when switching desktops in Metacity.

Revision history for this message
Luke Yelavich (themuso) wrote :

Ok Conn, I managed to reproduce your findings, i.e using intrepid's alsa-lib/alsa-plugins with skype with pulse defined in .asoundrc. However, it is very choppy for audio output, and microphone input gets completely scrambled on one machine I have here, and another sounds no different to the audio output, in terms of choppiness. I get similar behavior with neverball.

Revision history for this message
Conn O Griofa (psyke83) wrote :

Luke,

Yes, I experienced bad skipping in several applications (OSS Skype via padsp , VLC and others). I managed to fix it by changing the default fragment settings in PulseAudio (and I believe kernel 2.6.24-17-generic helped a lot too). I posted a HOWTO on ubuntuforums dealing with this issue (and others): http://ubuntuforums.org/showthread.php?p=4940541

Specifically see Part C, and be sure to follow the "optional" step if the new kernel doesn't help. Skipping may be related to bug #188226 or bug #190754.

Revision history for this message
ubby (kostas-sytske) wrote :

I hope this bug will be solved very soon.
Because this will scary of new Ubuntu users.

Revision history for this message
Conn O Griofa (psyke83) wrote :

I edited the original description to add some more information, I hope nobody minds.

Also, please see bug #192888 regarding Flash. Adobe have released version 10 (beta) of the Flash plugin, and the solution proposed in this bug allows Flash's audio to work fine with PulseAudio without any other workarounds (even libflashsupport is unnecessary).

description: updated
Revision history for this message
Marcus Granado (mrc-gran) wrote :

I have an Intel HDA stac9205 soundcard in my Dell Inspiron 1720, and it does not contain a hardware-based micboost for the digital microphone (that +20dB hard mic gain you see in gnome volume control in some soundcards). Ekiga and skype are almost impossible to use, because the microphone volume is too low. This problem can be solved by using software gain to replace the missing hardware gain. The original asound.conf in the beginning of this thread, using pulse audio as a backend, does not provide software gain. I'm providing a variation which provides software gain for the microphone and adds an independent volume track "+50dB Mic" in alsamixer/gnome-mixer. I believe it might be useful also for anyone else whose +20dB mic boost toggle is missing from the volume control.

1) replace your /etc/asound.conf with the contents below.
2) restart alsa: sudo /etc/init.d/alsa-utils restart
3) see if you have the new track: amixer -c 0 controls | grep 50dB
4) at this point, I did a reboot and the new control showed up in my gnome-volume-control in the recording tab. I'm not quite sure what to do if it does not show up in the graphical volume control, but you can manipulate its value in the command line if the new track is not present graphically: amixer -c 0 cset numid=<numid-from-step-3> 60% (100% might be too loud). You might also use alsamixer to modify its value, and test using 'arecord -D pulse -f cd | aplay'

Because I'm using hw:0,0 as my microphone slave pcm, I can only have one application at a time (e.g. the test above but not skype) using the amplified microphone. Using a 'pcm.pulse0 { type pulse }' device as my slave mic instead, in order to share the microphone among several applications, does not seem to work. Any suggestions for improvement?

###[begin of asound.conf]###
pcm.pulse {
    type asym
    playback.pcm {
        type pulse
    }
    #software gain upto 50dB for digital microphone
    capture.pcm {
        type softvol
        slave.pcm "hw:0,0"
        #slave.pcm "pulse0"
        control {
            name "+50dB Mic Capture Volume"
            card 0
        }
        max_dB 50.0
    }
}
ctl.pulse {
  type pulse
}

pcm.!default {
  type plug
  slave.pcm "pulse"
}

ctl.!default {
  type plug
  slave.pcm "pulse"
}
###[end of asound.conf]###

Special thanks to tiwai for adding the max_dB option in softvol: http://hg-mirror.alsa-project.org/alsa-lib/rev/75a5fa8dc7d5

Revision history for this message
Daniel T Chen (crimsun) wrote :

alsa-lib portion fixed in intrepid. Will need to be /backported/ to hardy-backports. alsa-lib 1.0.16 is necessary but breaks backward compat.

Changed in alsa-lib:
importance: High → Medium
milestone: ubuntu-8.04.1 → none
status: Confirmed → Fix Released
Revision history for this message
Daniel T Chen (crimsun) wrote :

alsa-plugins portion fixed in intrepid. Will need to be /backported/ to hardy-backports.

Changed in alsa-plugins:
importance: Undecided → Medium
status: New → Fix Released
Revision history for this message
Daniel T Chen (crimsun) wrote :

100% coverage is the goal, but there remain ALSA applications that need to be fixed.

For intrepid, nearly all of the necessary portions are in place. One remaining piece is modifying the pulse pcm plugin to check for an exported environment variable, PULSE_INTERNAL (see continuing work - noting that hg has been obsoleted for git - http://hg.alsa-project.org/alsa-plugins/rev/8b8cd8912f67 and http://hg.alsa-project.org/alsa-plugins/rev/0833aa56dbe2), which resolves the "inaudible if PA daemon not running but asoundrc overrides default to pulse" issue.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Marcus, please use answers.LP for your question instead of this bug report, thanks. (In short, you need to wrap your softvol in a dsnoop. Also, you do not need to "restart" alsa-utils, as it only resets mixer levels.)

mercutio22 (macabro22)
Changed in pulseaudio:
status: Invalid → Confirmed
Revision history for this message
Alexander Sack (asac) wrote :

so what do we need to backport here? alsa-lib, alsa-plugins and flash 10 (once that is out)? Daniel, could you provider pointers to patches or even backports? Thanks!

Changed in alsa-lib:
status: New → Incomplete
Changed in alsa-plugins:
status: New → Incomplete
Changed in pulseaudio:
status: New → Invalid
Revision history for this message
Daniel T Chen (crimsun) wrote :

Yes, alsa-lib, alsa-plugins, flashplugin-nonfree, and libflashsupport all need to be backported from intrepid.

For intrepid, you likely want to merge lp:~crimsun/alsa-lib/ubuntu.new (https://code.launchpad.net/~crimsun/alsa-lib/ubuntu.new) into lp:~ubuntu-core-dev/alsa-lib/ubuntu.new (https://code.launchpad.net/~ubuntu-core-dev/alsa-lib/ubuntu.new), too.

Revision history for this message
Conn O Griofa (psyke83) wrote :

Daniel,

Will a backported libflashsupport be set as depends or conflicts against flashplugin-nonfree? As far as I can see, libflashsupport still causes Flash 10 to crash. I have tested this with Hardy (manually installing select Intrepid packages) and now Intrepid.

I see your proposed branch will enable pulse pcm & ctl plugins by default, so libflashsupport is no longer necessary. Lennart Poettering mentioned on the pulseaudio ML that he wants to keep libflashsupport only because the client name "Flash audio" looks nicer than "ALSA plug-in [firefox]". It still doesn't work without crashing yet, though.

Revision history for this message
Luke Yelavich (themuso) wrote :

Daniel, the changes that are in your bzr branch would be useless for those desktops/environments where pulseaudio iis not used, such as KDE and XFCE.

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Hardy-proposed's alsa works great for me. Though I don't have any proprietary software like Flash, but otherwise at least.

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Note that the test case in the first message doesn't work still (in hardy-proposed), dunno what'd be required for that. But otherwise alsa 1.0.16 fixes many problems.

Revision history for this message
Patrick Horgan (phorgan1) wrote :

Here it is July 30, and Hardy sound is still broken. A lot more works, but not everything. Today a game that uses SDL sound failed. I killed pulseaudio and all was fine. I don't understand why the choice was made to use pulseaudio. I've seen posts extolling the many benefits, but they never say what they are. In the meantime, it seems the benefits have been much disruption of ubuntu and much frustration for users, and many broken sound apps. Excuse me, if I'm not sold on those benefits. What can I do with it that I couldn't do without it? Nothing. On the contrary my regular life as a ubuntu user is still broken in JULY! 8.04 has been a disappointment because of it. It's not what I was accustomed to from Ubunutu. To allow one group to hijack sound and then say that everyone else is broken is arrogant and cruel, user hostility at it's worst.

Patrick

Revision history for this message
Alexander Jones (alex-weej) wrote :

Don't rant.

Revision history for this message
Elliot Hughes (elliot-hughes) wrote :

Patrick,
Please remember that almost everyone who works on ubuntu is a volunteer and while it may be frustrating for you that applications you could rely on in Gutsy no longer work in Hardy, posts that complain about progress in the manner you did or complain about decisions that have been, for better or for worse, already made does not help make any progress towards fixing the bug.
There are many benefits to pulseaudio that allow Ubuntu to compete with other operating systems that already integrate more advanced software mixing than dmix can provide, indeed pulseaudio is also in use in many other distributions. If you follow progress it is easy to see that progress has been made within intrepid meaning that backports will be possible to fix the problems in due course, again I must remind you that it is volunteers doing this task.
In the short term there are guides available such as http://www.pulseaudio.org/wiki/PerfectSetup#Skype that you could use to attempt to get this working. Otherwise I can suggest non-proprietry alternatives such as Ekiga - though these may not suit your needs at present.

Revision history for this message
Nat Tuck (nat-ferrus) wrote :

Alexander and Elliot,

A decision like including Pulse Audio, made with full understanding that it would break some apps, will necessarily annoy some users. This was a predictable cost of that decision, and some few posts like Patrick's are the evidence of that cost. Having such evidence be visible to the developers is extremely valuable to the Ubuntu project because it reminds everyone that such costs are real and hopefully prevents such costs from being underestimated on future such decisions.

That's not to say that the cost was underestimated for Pulse Audio or that the decision to include it in Hardy was incorrect, but annoyed and confused users ranting in bug reports *will happen* when the developers decide to implement major changes that break applications. This is a good thing - especially in cases like this where the developers have fixed the problem partially but not completely.

Revision history for this message
Marcos Felipe Mello (marcosfrm) wrote :

So, the news are: If I use Hardy, I will not get Flash working, right? Unless I have hack skills to read this bug report, install backports, create an ocult text file and pray for an oficial solution (which will not come). That's unbelievable...

Revision history for this message
Nat Tuck (nat-ferrus) wrote :

Marcos -

It's not quite that bad. With stock 8.04 you can't get sound from Flash and other applications at the same time. If you close all other audio applications, Flash works fine and if Flash isn't running then everything else works fine. This may have been improved in 8.04.1 - I'm not going to break my hack-skills generated occult text file to check.

Revision history for this message
Elliot Hughes (elliot-hughes) wrote :

Marcos, It also does not affect every single Hardy install - I can use flash just fine on mine with any other audio app.

Revision history for this message
Patrick Horgan (phorgan1) wrote :

I tried. I looked at all the configuration information, the perfect setups, the tips. I'm a computer savvy guy that's been using linux for years. I'm a software engineer with a MS in CS. But I can't get everything working with pulseaudio installed. I like the idea, I wish it worked, but my SDL sound was distorted, my flash videos had no sound, I went round and round with different configuration setups, and never got everything working at once the way I wanted. So, finally I removed it again and after much manual reconfiguration everything's working fine now. When I can do apt-get install pulseaudio, and everything works without doing anything else, let me know. Until then it's not ready for prime time and certainly not ready for use as a default. I hear that my start up sounds won't work, but I always thought that a bizarre idea anyway, so I don't use them. I find it hard to believe that Ubuntu would have been set up so that you couldn't get system sounds without breaking other things though, so I'll take that with a grain of salt.

Patrick

Revision history for this message
Marcos Felipe Mello (marcosfrm) wrote :

Nat Tuck,

"If you close all other audio applications, Flash works fine and if Flash isn't running then everything else works fine."

I don't know to you, but to me this "workarround" seems almost ridiculous.

What I said was about Flash's audio working. Conn already explained the situation and for Hardy I think it shoud be resolved TOO. Wait for Intrepid is not the best ideia.

Revision history for this message
Marcos Felipe Mello (marcosfrm) wrote :
Revision history for this message
Pablo Estigarribia (pablodav) wrote :

Hey for me all is working if I do it:

sudo aptitude install libsdl1.2debian-pulseaudio

and configuration for /etc/asound.conf

pcm.pulse { type pulse }
ctl.pulse { type pulse }

Nothing else!!!

With this, if pulseaudio is not playing anything skype works fine!
But firefox crashes sometimes when I play some flash, not always just some times.

I tried to put configuration for asound with:
pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

But after that skype stops working, so I fixed It when I put back my configuration.

Also I installled a new 8.04.1 on a new computer everything works fine, I don't have to do anything new!

Revision history for this message
Pablo Estigarribia (pablodav) wrote :

Now I read Mandriva documentation and tried this:

When you launch Skype you should now be able to configure it to use this pulse plugin (under Options -> Sound Devices). This should allow everything to work as expected.

It worked perfectly with pulse driver for alsa!!!

Revision history for this message
Duncan Hawthorne (duncan.hawthorne) wrote :

so for intrepid. do we want:

/etc/asound.conf containing:
pcm.pulse {
    type pulse
}
ctl.pulse {
    type pulse
}

and run
asoundconf set-pulseaudio
which sets ~/.asoundrc.asoundconf to
pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

the first one allows access to the pulse device. the second sets it as default per user, but changeable without having to jump up to superuser. With this gdm sound still works as it is not using the pulse device that isnt there. but regular sound works correctly once logged in

surely there should be no delay on doing the first of these actions as it doesnt cause any problems. it adds an extra device, which can be selected, but isnt used by default. the second can be considered later. If the first is done, it at least allows non superusers to choose and use the device

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 198453] Re: Default ALSA device must use PulseAudio, otherwise ALSA applications may fail

We can't do this, simply because xubuntu and kubuntu do not use pulseaudio, and this would break their audio systems.

Revision history for this message
Conn O Griofa (psyke83) wrote :

Luke,

I don't understand your logic. We can modify the startup session for PulseAudio; instead of immediately launching "pactl load-module module-x11-xsmp" via GNOME Session Preferences, use a script that checks for/propagates the proper .asoundrc configuration per-user upon login (asoundconf set-pulseaudio), then launches PulseAudio normally. Since this script will be part of the PulseAudio package (and perhaps can be configured get automatically unset if the pulseaudio package is removed), Kubuntu and Xubuntu will be unaffected. I would only suggest that "asoundconf set-pulseaudio" is extended to define "pcm.pulse" and "ctl.pulse" for the sake of slightly non-compliant ALSA apps that otherwise work correctly with PulseAudio (e.g. Skype).

Of course, PulseAudio is incompatible with some* applications (off the top of my head, I can only think of JACK, WINE's ALSA driver and PortAudio applications such as Audacity). There's simply no avoiding these specific issues at the moment, though an obvious solution is to exclude PulseAudio from the UbuntuStudio distribution in the case of Audacity and JACK (won't help everyone, but at least we're targeting the appropriate audience).

Flash since v10 beta 1 (and now the release candidate) works with PulseAudio's pcm_pulse plugin. WINE and ALSA developers have been collaborating to fix issues in their software to help make PulseAudio work (not expressly for PulseAudio; rather, PulseAudio helped expose flaws in ALSA and buggy use of the ALSA API in some applications). These issues will be fixed in time.

PulseAudio is a half-hearted dmix replacement in its currently configured form. Its needs to be configured properly so that we can deal with real issues such as PortAudio/Audacity, or else it should be ripped out and Esound put back in its place, because 90% of the PulseAudio issues experienced by users will disappear upon fixing this bug.

An appropriate quote by Lennart Poettering, the main PulseAudio developer:
"Some distributions did a better job adopting PulseAudio than others. On the good side I certainly have to list Mandriva, Debian, and Fedora. OTOH Ubuntu didn't exactly do a stellar job. They didn't do their homework. Adopting PA in a distribution is a fair amount of work, given that it interfaces with so many different things at so many different places. The integration with other systems is crucial. The information was all out there, communicated on the wiki, the mailing lists and on the PA IRC channel."

See this blog entry for the rest of his comments: http://0pointer.de/blog/projects/jeffrey-stedfast.html

Revision history for this message
Nat Tuck (nat-ferrus) wrote :

No package provides /etc/asound.conf - just stick that in the pulseaudio package.

As for the Kubuntu / Xubuntu conflict, that's really not a valid argument. The technical issue of properly configuring for pulse only when pulse is installed seems trivial, and - in any case - the usability of Ubuntu should trump the logistical convenience of shared repositories if a solution can't be found.

Revision history for this message
Eduardo Durany Fernández (edurany) wrote :

Am I the only one who thinks that kubuntu and xubuntu should use pulseaudio too?

Revision history for this message
Susan Cragin (susancragin) wrote :

I hope you are the only one. I hate PulseAudio for the problems it has caused in WINE applications, which are critical to me, and I still don't see what benefit it has to the average user. Why not make pulse only an option?
I wish pulseaudio would go away from Studio, but at least it's easy to uninstall.

Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

Now this is funny!

When I first reported this bug (and that was long before 8.04 was released) and put my point that, being incompatible and buggy, PulseAudio should not be included in an LTS (!!!) release, I was told that PulseAudio was The Future Of Linux Sound, and incompatibility was not the problem of PulseAudio, but the problem of that incompatible old software, and we should include PulseAudio in the release a.s.a.p., so as to encourage everybody to make their code compatible and migrate to PulseAudio.

Now we are told that an obvious and working fix for the bug cannot be accepted because it breaks compatibility with Kubuntu and Xubuntu, which are not using PulseAudio. Mind you, both Kubuntu and Xubuntu are officially approved and supported Ubuntu variants, and — despite the Ubuntu policy of including PulseAudio never minding any problems it may bring, just to encourage everyone else to use it — despite that those two official derivatives do not include it!

Personally I must confess that I have completely quit trying to understand what are our intentions and plans on PulseAudio. We purposely break the usability of our LTS release in order to introduce the feature I assume less than 2% of end users would be needing, yet we refuse to fix it for the benefit of the two derivative releases, that are not even LTS, by the way. And despite all that we still assume that Bug #1 can be fixed — with such an attitude to LTS releases!

Revision history for this message
Alexander Jones (alex-weej) wrote : Re: [Bug 198453] Re: Default ALSA device must use PulseAudio, otherwise ALSA applications may fail

There are two things you need to do to help.

1) Stop ranting.
2) Fix the crappy applications that use ALSA incorrectly (often making
the invalid assumption that the device you've chosen is a hardware
device) to either use it correctly, or better, to use the PulseAudio
protocol natively.

We are not doing a U-turn on PulseAudio, so just forget it.

Revision history for this message
Felipe Figueiredo (philsf) wrote :

This is a bug report, not a forum.

Pulseaudio's current state is not perfect, and it might really be the future, or not. If this is bringing trouble to any of you, just uninstall it. It will require uninstalling ubuntu-desktop also, but this will only be needed when you upgrade to the next release, so this is really a non-issue at this time.

Without pulseaudio, alsa works with everything else, so this is what everyone complaining here should use. Please stop spamming the report, unless you have new information to add. (And no, I'm not a developer, nor related to Ubuntu or canonical in any sense).

Revision history for this message
Conn O Griofa (psyke83) wrote :

Luke, Alexander, Daniel & others,

If you test the packages in my PPA, you'll see that I backported alsa-lib, alsa-plugins alsa-utils, pulseaudio from Intrepid, and added a new flashplugin-nonfree deb based on the latest v10 RC. See here: https://launchpad.net/~psyke83/+archive

The alsa-lib and alsa-plugins packages have been backported for the reasons discussed early in this report (it seems the Hardy version of the PulseAudio ALSA plugins have problems with several applications, including Skype).

The alsa-utils package has been modified so the the "pcm.pulse" and "ctl.pulse" descriptors are added to the asoundconf {set|unset}-pulseaudio command - this allows Skype (and possibly other buggy applications) to select the "pulse" device.

The pulseaudio package is a simple backport from Intrepid, except that I added some fragment tweaks - this solves skipping I noticed in Skype, VLC and several other applications. I also added the resample-method to "speex-float-1" to reduce CPU usage (Mandriva have applied this setting in PulseAudio too). It may not help everyone, but most users have noticed the same improvements after testing these tweaks on the forums. See bug #190754.

Finally, flashplugin-nonfree has been updated to v10 RC with an added tweak to workaround a Firefox (not related to PulseAudio, though!). See bug #239182 and: http://blogs.adobe.com/penguin.swf/2008/08/windowless_mode_fix.html

The remaining piece of the puzzle is to issue "asoundconf set-pulseaudio" (if we choose to really fix this bug, ideally this command should be a user login script installed from the pulseaudio or ubuntu-desktop packages).

With my packages installed, Kubuntu and Xubuntu aren't affected. If you install Skype (ALSA version), all you need to do is set the Sound Out and Ringing devices to "pulse" via the Options in Skype, and (at least on my system) it won't stutter.

I am more than willing to help fix this bug (and post clean debdiffs), but the packages in my PPA can help get us started, at least as a proof of concept that PulseAudio *can* work for most users. There are loose-ends, of course; alsa-driver (and thus kernel modules) may need to be backported (but in practice everything is working flawlessly on my Hardy system here), and we already know some application are still incompatible with PulseAudio (Audacity, JACK, possibly still WINE).

Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

What I would like to remind to the community is that this bugreport was initially referring to the treatment PA gives to ALSA-using software. As of now, the problem still persists on a vanilla installation of Hardy, and can be reproduced using steps in the beginning of this report. The workaround for this bug is also in the same report, it works, yet it's not installed by default, thus rendering Ubuntu backwards-incompatible with a huge amount of software. The question is, what do we do for our users not to have to google up this bugreport to make their systems usable? Should we add this issue to release-notes, perhaps? Should we provide users with a convenient way to fix things from the very beginning?

Alexander's point is the same of PA developers I've contacted on this matter, and it's understandable. The problem is that the de-facto standard in Linux is ALSA, and many professionals-targeted software (JACK, Audacity, etc.) is not likely to have PA support in any visible future (I have contacted the developers as well).

My personal concern is about unexperienced end-users: if we cannot make things automatically work for them (I really don't see why it should be not possible, but then nor am I a developer), how can we provide them quickly accessible and easy to find information of working solutions (be it uninstalling PA, or whatever)?

Revision history for this message
Conn O Griofa (psyke83) wrote :

An update regarding comment #109 and my PPA: I built the packages for all architectures, but I don't have a 64bit machine to test. Although the packages are compliant, Flash 10 has new dependencies on libraries that aren't available in the ia32-lib package, and so the package will fail to install properly. Ideally this package should be updated (bug #246911) or a supplemental package created (which is a bit difficult to do since I can't test anything on my system).

In the meantime there is a way to get Flash 10 RC working for AMD64 users: use "getlibs", available here: http://ubuntuforums.org/showthread.php?t=474790

You will need to grab the following libraries like so:
getlibs -p libnss3-1d
getlibs -p libnspr4-0d
getlibs -p libcurl3

Once the requisite libraries are available, simple re-install the flashplugin-nonfree package from my PPA. Everything should work!

 Many thanks to "Shot" for helping out with testing.

Revision history for this message
Conn O Griofa (psyke83) wrote :

Rationale: if this bug is to be fixed effectively, the pulseaudio package is the optimal package to initialize the "asoundconf set-pulseaudio" macro per-user - trying to set the macro in alsa-utils/alsa-lib/alsa-plugins will result in problems for Kubuntu, Xubuntu, and other derivatives that do not integrate PulseAudio by default. Marking as Confirmed.

Changed in pulseaudio:
status: Invalid → Confirmed
Daniel T Chen (crimsun)
Changed in pulseaudio:
importance: High → Medium
Revision history for this message
sklp (sklp) wrote :

Well, I think it's *VERY* odd that this bug made it into Hardy(an LTS release)...

The steps I usually make to fix (on my hardy installs) is just:
* install libasound2-plugins
* set pulse to default alsa device
* install flash player 10(which works with pulse)
* if some apps refuses to work, make some form of workaround for them:
only problem i've had is really wine, but havent tried that many programs
however, wine seems to work just fine with its OSS output plugin combined with padsp

Although I had to move from 64bit ubuntu to 32 bit ubuntu on one of my machines to make this work (since libasound2-plugins and padsp apparently does not exist as lib32* versions yet), which wasnt that fun :(

First of all what should be done in Ubuntu about this (IMO):
1. Either a) move pulse plugin from libasound2-plugins to libasound2 package (and make sure it is in lib32asound2 as well
             b) ship libasound2-plugins by default as well as ship a new lib32asound2-plugins
2. set pulse to default alsa device
3. An idea to make things seem like less of a hack than they are: configure pulseaudio daemon to NEVER release the sound card. Would fix the issues with different programs gaining exclusive access to the sound card etc (confusing errors; it would IMO in these cases be better if the sound of that specific program just didnt work at all. The user would then have to use some kind of workaround (for instance oss output+padsp ) until the program in question was fixed ( instead of getting strange errors like other programs audio being broken, only the broken program would get non-working audio)

also I'm hoping that if this is not fixed in time, that you (ubuntu devs) will not hesitate to go back to dmix like in gutsy ( although I can't really see why )

Also I don't really se why Kubuntu/Xubuntu couldn't use PulseAudio as well. When used as default alsa output/input, it mainly improves over dmix, by for instance allowing per-application volume control, network transparency, etc

just my 2 cents..

Revision history for this message
sklp (sklp) wrote :

also I noticed that wine release 1.1.3 apparently fixes pulseaudio issues with their alsa plugin. Although i havent tested this myself

Revision history for this message
Id2ndR (id2ndr) wrote :

I can confirm that wine 1.1.3 works with PulseAudio (it only need the .asound file to redirect ALSA to PulseAudio).

Revision history for this message
Thiago Bellini (bellini666) wrote :

I had this problem with Hardy

I fount a solution in here:
http://ubuntuforums.org/showthread.php?t=789578

alsa should be redirect to pulse
and I fink padevchooser should be installed and running as default, since it provides many of usefull resources...

Revision history for this message
Alexander Jones (alex-weej) wrote :

PADevChooser is considered abandoned upstream, apparently.

Revision history for this message
Conn O Griofa (psyke83) wrote :

Alexander Jones,

Yes, but the most convenient way to get access to the other PulseAudio utilities is a) by installing the "padevchooser" package (as it depends on the manager, volume control, etc.), and b) through the padevchooser "quick access" menu itself. PulseAudio Manager and PulseAudio Volume Control don't have independent menu icons (though they should).

Revision history for this message
Thiago Bellini (bellini666) wrote :

I agree with Conn

Hardy was louched with several issues on PulseAudio

When I started using it, I had a problem with flashplugin, and then I saw that I should install libflashsupport to support flash on pulseaudio...but that libflashsupport make flash and firefox crash sometimes...
I tried flash 10, since it has native PulseAudio support, but it is in beta and there are several issues too...

Then I had issues with others alsa and oss applications...for me was not difficult to find an solution for it, but my "newbie" friends was going back to window$ because of that problems....

Revision history for this message
Paul Pace (myfirstnameispaul) wrote :

>From: roxthiaguin
> Subject: [Bug 198453] Re: Default ALSA device must use PulseAudio, otherwise ALSA applications may fail

>for me was not
> difficult to find an solution for it, but my
> "newbie" friends was going
> back to window$ because of that problems....

See [Bug 1]

Revision history for this message
ktp420 (ktp420) wrote :

I was using the /etc/asound.conf in Intrepid and sound was working correctly, but after recent update, flash is not playing any sound if I have other apps playing sound. Flash just start and hangs. If I stop all the apps using the pulseaudio, then it works.

Revision history for this message
ktp420 (ktp420) wrote :

I think it is the pulseaudio packages itself that cause this regression. I downgraded them to 0.9.10-2ubuntu2 and things work again.

https://launchpad.net/ubuntu/+source/pulseaudio

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 198453] Re: Default ALSA device must use PulseAudio, otherwise ALSA applications may fail

Just to let you know that in intrepid, there is now 0.9.10-2ubuntu6. If you could try that and make sure all is ok, that would be appreciated.

Thanks.

Revision history for this message
Id2ndR (id-2ndr) wrote :

Luke Yelavich a écrit :
> Just to let you know that in intrepid, there is now 0.9.10-2ubuntu6. If
> you could try that and make sure all is ok, that would be appreciated.
I installed pulseaudio 0.9.10-2ubuntu6 and related libs and latest
alsa-utils alsa-plugins and libs but it doesn't change anything for me.

I launched firefox in gnome-terminal and saw this (it may be usefull) :
(npviewer.bin:8185): Gtk-CRITICAL **: gtk_style_detach: assertion
`style->attach_count > 0' failed
ALSA lib ../../src/conf.c:2700:(snd_config_hooks_call) Cannot open
shared library /usr/lib/alsa-lib/libasound_module_conf_pulse.so
ALSA lib ../../../src/pcm/pcm.c:2196:(snd_pcm_open_noupdate) Unknown PCM
default

I then run asoundconf set-pulseaudio but it doesn't change anything.
Will the end user be obliged to do this manually ?

I didn't try to downgrade to 0.9.10-2ubuntu2.

Revision history for this message
ktp420 (ktp420) wrote :

Luke, I had the the latest 0.9.10-2ubuntu6 along with other updates on the system and that is when I found this issue. So after downgrading alsa-utils and alsa-plugins, which didn't work I downgraded pulseadudio and found that my setup worked again.

The thing I have not tried is to see which build of pulseaudio broke things since i went strait to 0.9.10-2ubuntu2 from 0.9.10-2ubuntu6. If i had to guess, I think it is the 0.9.10-2ubuntu4 build that changed something.

Revision history for this message
ktp420 (ktp420) wrote :

I just upgraded pulseaudio to 0.9.10-2ubuntu3 and things still work.

Revision history for this message
ktp420 (ktp420) wrote :

Confirmed that when upgrading to pulseaudio 0.9.10-2ubuntu4 flash audio breaks.

Revision history for this message
Luke Yelavich (themuso) wrote :

Could you please try to do the following:

1. Kill pulseaudio, either by using "killall pulseaudio" or "pulseaudio -i"
2. Remove all .pulse files from your home directory, "rm -r ~/.pulse*"
3. Move any .asoundrc files away to a temporary directory, of if you have nothing in them that you want to keep, delete them.
4. Restart pulseaudio, either by rebooting, logging out and back in, or running "pulseaudio -D --log-target=syslog"

Then let me know if you can get sound at all from any pulseaudio and alsa application.

Thanks.

Revision history for this message
Jaakan Shorter (jaakanshorter) wrote :

that seem to work, I heard some one log in on pidgin and got a song to played in Rhythmbox

I got this in the term after I did that

[WARN 29837] polkit-session.c:144:polkit_session_set_uid(): session != NULL
 Not built with -rdynamic so unable to print a backtrace

Revision history for this message
ktp420 (ktp420) wrote :
Download full text (3.6 KiB)

Luke,

I tried what you suggested and still not working correctly. If I start the flash first, then sound works, but it gets hold of the sound card and no app that uses pulseaudio works. If I start app which uses pulseaudio first, then flash does not work. I am on 64-bit version.

----------------------------------------
> From: <email address hidden>
> To: <email address hidden>
> Date: Mon, 29 Sep 2008 02:28:16 +0000
> Subject: Re: [Bug 198453] Re: Default ALSA device must use PulseAudio, otherwise ALSA applications may fail
>
> Could you please try to do the following:
>
> 1. Kill pulseaudio, either by using "killall pulseaudio" or "pulseaudio -i"
> 2. Remove all .pulse files from your home directory, "rm -r ~/.pulse*"
> 3. Move any .asoundrc files away to a temporary directory, of if you have nothing in them that you want to keep, delete them.
> 4. Restart pulseaudio, either by rebooting, logging out and back in, or running "pulseaudio -D --log-target=syslog"
>
> Then let me know if you can get sound at all from any pulseaudio and
> alsa application.
>
> Thanks.
>
> --
> Default ALSA device must use PulseAudio, otherwise ALSA applications may fail
> https://bugs.launchpad.net/bugs/198453
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in PulseAudio sound server: Confirmed
> Status in “alsa-lib” source package in Ubuntu: Fix Released
> Status in “alsa-plugins” source package in Ubuntu: Fix Released
> Status in “pulseaudio” source package in Ubuntu: Confirmed
> Status in alsa-lib in Ubuntu Hardy: Incomplete
> Status in alsa-plugins in Ubuntu Hardy: Incomplete
> Status in pulseaudio in Ubuntu Hardy: Invalid
>
> Bug description:
> Steps to reproduce:
>
> Run both of these at the same time:
> gst-launch-0.10 audiotestsrc ! pulsesink
> gst-launch-0.10 audiotestsrc ! alsasink
>
> If your default sound device does not support hardware mixing, the second command will fail. ALSA cannot use the device while PulseAudio is using it, and this affects a lot of applications.
>
> Note that if you run the commands the other way around, alsalib will use dmix, and then so will pulseaudio, so there is not as much of a problem this way around (except for the fact that dmix and PA are doing the same job, and you can not control the ALSA-using apps' volumes and routing with PA.)
>
>
> Resolution:
>
> Follow http://pulseaudio.org/wiki/PerfectSetup#ALSAApplications
> i.e. install /etc/asound.conf with:
>
> pcm.pulse {
> type pulse
> }
> ctl.pulse {
> type pulse
> }
> pcm.!default {
> type pulse
> }
> ctl.!default {
> type pulse
> }
>
> Then, install the package "libasound2-plugins", as it contains the required "pcm_pulse" and "ctl_pulse" plugins.
>
> Note, too, that there are some applications that fail with ALSA->Pulse:
>
> SDL* seems to hang with neverball, but that is fixed by installing the PulseAudio backend for SDL (libsdl1.2debian-pulseaudio), which will replace the default ALSA backend.
> WINE has its own issues with regards to device selection, which I don't know a remedy for.
> Skype* also has its own problems, but these aren't fixable by us and should not block us, tho...

Read more...

Revision history for this message
Luke Yelavich (themuso) wrote :

Ok, I am going to go out on a limb here and guess you are on amd64. I have a good idea as to what has to be done to make this work properly, I just have to implement. However its not likely to land till just after beta, due to the invasive changes needed to make it work, however I will see what I can do.

Luke

Revision history for this message
ktp420 (ktp420) wrote :

Thanks Luke; and yes I am on 64.

Revision history for this message
ktp420 (ktp420) wrote :

Found a workaround which works:
https://bugs.launchpad.net/ubuntu/+source/ia32-libs/+bug/273693/comments/6

Another workaround that works for me:
1. Create /etc/ld.so.conf.d/alsa32.conf with the following contents:
/usr/lib32/alsa-lib

2. Create /etc/ld.so.conf.d/alsa64.conf with the following contents:
/usr/lib/alsa-lib

3. sudo ldconfig

4. Open /usr/share/alsa/pulse.conf in the editor and remove the "/usr/lib/alsa-lib/" prefix from the libasound_module_conf_pulse.so file.

Revision history for this message
Id2ndR (id-2ndr) wrote :

ktp420 a écrit :
> Found a workaround which works:
> https://bugs.launchpad.net/ubuntu/+source/ia32-libs/+bug/273693/comments/6
>
> Another workaround that works for me:
> 1. Create /etc/ld.so.conf.d/alsa32.conf with the following contents:
> /usr/lib32/alsa-lib
>
> 2. Create /etc/ld.so.conf.d/alsa64.conf with the following contents:
> /usr/lib/alsa-lib
>
> 3. sudo ldconfig
>
> 4. Open /usr/share/alsa/pulse.conf in the editor and remove the
> "/usr/lib/alsa-lib/" prefix from the libasound_module_conf_pulse.so
> file.

Works for me too.
(Firefox crash sometime while playing flash, but I don't know the exact
cause).

Revision history for this message
Id2ndR (id2ndr) wrote :

I think this is fixed by following change in pulseaudio

Version 0.9.10-2ubuntu7 :

  * Fix some errors in the pid file handling patch, thanks to Mandriva.
  * debian/pulse.conf: Do not use an absolute path when referring to the
    pulse alsa plugin, as this breaks bi-arch configurations. libasound2
    and lib32/64asound2 now include ldconfig files to include the alsa-plugins
    path for the architecture in use.

Revision history for this message
Pablo Estigarribia (pablodav) wrote :

It will be good to have this package available on ubuntu Hardy.

I would like to test it, but now upgrading from interpid.

There is some possibility to get this from other place?

Revision history for this message
Daniel T Chen (crimsun) wrote :

All the necessary components are in place currently in 8.10, so closing pulseaudio task.

Changed in pulseaudio:
status: Confirmed → Fix Released
Revision history for this message
Pablo Estigarribia (pablodav) wrote : Re: [Bug 198453] Re: Default ALSA device must use PulseAudio, otherwise ALSA applications may fail

Daniel T Chen escribió:
> All the necessary components are in place currently in 8.10, so closing
> pulseaudio task.
>
> ** Changed in: pulseaudio (Ubuntu)
> Status: Confirmed => Fix Released
>
>
But is not fixed on hardy...

I want this fixed on hardy, I think it's necessary to have it fixed on
hardy too.

Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

Pablo, it is not yet marked as "Fixed", it's only "Fix released" now, wait a bit. I'm sure, Daniel and the devs understand that until the fix is backported to Hardy the bug can not be completely closed. LTS should be supported for more than 2,5 years from now, so the bug should get fixed on Hardy soon.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Pablo/Evgeny: the Fix Released denotes the /current development/ version (intrepid), not the most recent stable (hardy). You'll need to adjust the hardy task.

Revision history for this message
Pablo Estigarribia (pablodav) wrote :

Thanks, I'll wait for backports packages after install I'll test it.

Thanks again...

Revision history for this message
Toby Smithe (tsmithe) wrote :

On Thu, Oct 16, 2008 at 1:42 AM, Daniel T Chen <email address hidden> wrote:
> All the necessary components are in place currently in 8.10, so closing
> pulseaudio task.

Dan, though I realise it is somewhat late, I have a slight concern
about the implementation of this change. Previously, PulseAudio was
only used as default when it was so set in ~/.asoundrc.asoundconf.
Currently, if I have a real hardware device set as default, say via
asoundconf set-default-card, that choice is ignored (at least by
GStreamer apps: I'm not sure of others) if pulseaudio is running.

This is frustrating, since PulseAudio doesn't use the plain "hw"
device of my Audigy card by default, but rather "front". This means I
don't get any hardware up-mixing, which is quite enjoyable.
Previously, I could just set my default ALSA card to anything not
PulseAudio, and bypass this issue, but that has become more difficult:
now I also have to kill the daemon.

I'm not sure whether PA's HAL autodetection module uses "front" for a
reason, so I have not filed a separate bug for that.

Revision history for this message
Zenigata (drebon) wrote :

Well I think pulseaudio is one of the thing that was a little bit too fast harshed into ubuntu. As of now it disables the use of lots of features of Alsa and the latest update of hardy screwed my settings one more time.

People should have the choice between an feature missing cpu expensive pulseaudio and a correctly set Alsa, and updates should'nt reset theirs settings.

It is not acceptable that after an update, one loses its ALSA device, so that it becomes impossible for him to easily set his volume and that gnome's audio preferences falls the default device to the oss interface.

I do hope that the pulse-audio implementation in Intrepid won't be as messy as the one in hardy, but the audio problems induced by hardy pulseaudio arevery nerving me and make me consider switching to other distrib.

For now I have applications that complain about not finding sound a.s.o. gnome mixer is unusable.

Revision history for this message
Daniel T Chen (crimsun) wrote :

@Toby ~/.asoundrc* still overrides any system-wide conffiles (see the order of the file hooks in /usr/share/alsa/alsa.conf). What is your user's ~/.asoundrc* ?

Revision history for this message
Daniel T Chen (crimsun) wrote :

@Zenigata Ubuntu Intrepid's default PulseAudio intregration is much improved over Hardy's. You always have the choice of removing pulseaudio and libasound2-plugins to fall to ALSA.

Revision history for this message
Toby Smithe (tsmithe) wrote :

On Sat, Oct 18, 2008 at 9:27 PM, Daniel T Chen <email address hidden> wrote:
> @Toby ~/.asoundrc* still overrides any system-wide conffiles (see the
> order of the file hooks in /usr/share/alsa/alsa.conf). What is your
> user's ~/.asoundrc* ?

Hmm - the hooks for me read like this (extract from /usr/share/alsa/alsa.conf):

@hooks [
        {
                func load
                files [
                        "/usr/share/alsa/pulse.conf"
                        "/usr/share/alsa/bluetooth.conf"
                        "/etc/asound.conf"
                        "~/.asoundrc"
                ]
                errors false
        }
]

I would assume this order meant that pulse[-alsa].conf overrides any
user-set configuration, which to me seems sub-optimal.

My ~/.asoundrc.asoundconf is attached, and ~/.asoundrc is as default
(only importing ..asoundconf).

Revision history for this message
Daniel T Chen (crimsun) wrote :

No, ~/.asoundrc takes precedence because of its position.

front is used because it is extant on nearly all drivers.

As for setting 'default' for both ALSA and PulseAudio, I agree that the interaction is quite fragile. I'll be tackling that in jaunty (e.g., making each backend respect another's settings as much as sensible). As things stand for intrepid, for GSt-based apps, set everything to use ALSA (instead of Autodetect), and your ~/.asoundrc* will be honoured.

Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

Daniel, if "you are free to remove this if you don't like it" is the official position on the devs, should I file a new bug about ubuntu-desktop depending on (and not recommending instead) pulseaudio? As it currently is, pulseaudio can not be removed whithout breaking the upgrade ability.

Alternatively, if pulseaudio actually IS the essential and unremovable part of an Ubuntu installation, maybe it's not a good idea to point out that users can remove this buggy pile of garbage completely, which they can't?

Revision history for this message
William Pitcock (nenolod) wrote : Re: [Bug 198453] Re: Default ALSA device must use PulseAudio, otherwise ALSA applications may fail

dpkg --remove --force-depends pulseaudio

not that this is a sound idea, but thanks for playing.

On Sun, 2008-10-19 at 04:03 +0000, Evgeny Kuznetsov wrote:
> Daniel, if "you are free to remove this if you don't like it" is the
> official position on the devs, should I file a new bug about ubuntu-
> desktop depending on (and not recommending instead) pulseaudio? As it
> currently is, pulseaudio can not be removed whithout breaking the
> upgrade ability.
>
> Alternatively, if pulseaudio actually IS the essential and unremovable
> part of an Ubuntu installation, maybe it's not a good idea to point out
> that users can remove this buggy pile of garbage completely, which they
> can't?
>

Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

William, if one uses your "solution", pulseaudio gets installed back on distribution-upgrade (or even when ubuntu-desktop is updated), so it definitely is not the sound idea.

Revision history for this message
Zenigata (drebon) wrote :

@Daniel
Yes I know I can remove pulseaudio, but as stated by others, it breaks ubuntu-desktop package and thus prevent the upgrade to be proposed. And also since the begining with hardy, I have to rebuild alsa from the source (the ones downloaded with apt-get sources) and sometime safe-upgrades break again the sound system.

I think sound issues are of major importance to Ubuntu since sound belongs to the basics thing that "should just work". Pulseaudio is in itself a good idea, but it is much more ressource consuming that alsa dmix. Actually I am not sure wether pulseaudio really bring something to people not wanting to do CAM or webradios, and for those, would'nt it be more consistent to have Jack ?

Also the problem with hardy is the regression on the alsa side : 7.10 I had my alsa sound working, inputs, outputs every thing was correct (after some painful configuration). With hardy, at first I had only one slider, no alsa interface (mixing capabilities were inexistant for none pulseaudio devices), I got rid of pulseaudio, find out that I had to recompile alsa, and unfortunately I am still unable to have the recording from mic/line in input work properly : it is very noisy, even thought the sound in the speaker when not muting mic line in is good.

I do really hope that 8.10 will clean these messy problems and that sound won'nt be anymore an issue on Ubuntu.

Regards.

Revision history for this message
Pablo Estigarribia (pablodav) wrote :

Actually I removed pulseaudio from my laptop and removed from my family desktop to get working everything. Sound it's ok and firefox does not crashes anymore.
But I want to test the newest version with most of the problems fixed and I want to test it in hardy, so I'm waiting here.

Br,
Pablo.

Revision history for this message
Thiago Bellini (bellini666) wrote : Re: [Bug 198453] Re: Default ALSA device must use PulseAudio, otherwise ALSA applications may fail

now it`s possible to use Flash 10
it`s officialy released! You can download the .deb in the download site
using it, there is no more reason to install "libflashsupport" and firefox
stops crashing

On Tue, Oct 28, 2008 at 6:28 PM, Pablo Estigarribia <email address hidden>wrote:

> Actually I removed pulseaudio from my laptop and removed from my family
> desktop to get working everything. Sound it's ok and firefox does not
> crashes anymore.
> But I want to test the newest version with most of the problems fixed and I
> want to test it in hardy, so I'm waiting here.
>
> Br,
> Pablo.
>
> --
> Default ALSA device must use PulseAudio, otherwise ALSA applications may
> fail
> https://bugs.launchpad.net/bugs/198453
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in PulseAudio sound server: Confirmed
> Status in "alsa-lib" source package in Ubuntu: Fix Released
> Status in "alsa-plugins" source package in Ubuntu: Fix Released
> Status in "pulseaudio" source package in Ubuntu: Fix Released
> Status in alsa-lib in Ubuntu Hardy: Incomplete
> Status in alsa-plugins in Ubuntu Hardy: Incomplete
> Status in pulseaudio in Ubuntu Hardy: Invalid
>
> Bug description:
> Steps to reproduce:
>
> Run both of these at the same time:
> gst-launch-0.10 audiotestsrc ! pulsesink
> gst-launch-0.10 audiotestsrc ! alsasink
>
> If your default sound device does not support hardware mixing, the second
> command will fail. ALSA cannot use the device while PulseAudio is using it,
> and this affects a lot of applications.
>
> Note that if you run the commands the other way around, alsalib will use
> dmix, and then so will pulseaudio, so there is not as much of a problem this
> way around (except for the fact that dmix and PA are doing the same job, and
> you can not control the ALSA-using apps' volumes and routing with PA.)
>
>
> Resolution:
>
> Follow http://pulseaudio.org/wiki/PerfectSetup#ALSAApplications
> i.e. install /etc/asound.conf with:
>
> pcm.pulse {
> type pulse
> }
> ctl.pulse {
> type pulse
> }
> pcm.!default {
> type pulse
> }
> ctl.!default {
> type pulse
> }
>
> Then, install the package "libasound2-plugins", as it contains the required
> "pcm_pulse" and "ctl_pulse" plugins.
>
> Note, too, that there are some applications that fail with ALSA->Pulse:
>
> SDL* seems to hang with neverball, but that is fixed by installing the
> PulseAudio backend for SDL (libsdl1.2debian-pulseaudio), which will replace
> the default ALSA backend.
> WINE has its own issues with regards to device selection, which I don't
> know a remedy for.
> Skype* also has its own problems, but these aren't fixable by us and should
> not block us, though should be given some consideraton.
>
> * SDL applications (using libsdl1.2-alsa backend), Skype and possibly other
> misbehaving applications work properly with later versions of libasound2 &
> libasound2-plugins from Debian unstable.
>

--
Thiago Bellini Ribeiro
Programador PHP
www.linuxparatodos.com.br
<email address hidden>
Ribeirão Preto - SP

Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

Sorry, roxthiaguin, but Flash 10 is only released for x386 machines, which is not the only architecture supported by Ubuntu. People using other architectures (or should I say "another architecture"?) are still forced to use libflashsupport.

Revision history for this message
Thiago Bellini (bellini666) wrote :

oh..I see
didn`t know that =P. Hope they release other architectures support as soon
as possible!

On Wed, Oct 29, 2008 at 2:41 AM, Evgeny Kuznetsov <email address hidden> wrote:

> Sorry, roxthiaguin, but Flash 10 is only released for x386 machines,
> which is not the only architecture supported by Ubuntu. People using
> other architectures (or should I say "another architecture"?) are still
> forced to use libflashsupport.
>
> --
> Default ALSA device must use PulseAudio, otherwise ALSA applications may
> fail
> https://bugs.launchpad.net/bugs/198453
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in PulseAudio sound server: Confirmed
> Status in "alsa-lib" source package in Ubuntu: Fix Released
> Status in "alsa-plugins" source package in Ubuntu: Fix Released
> Status in "pulseaudio" source package in Ubuntu: Fix Released
> Status in alsa-lib in Ubuntu Hardy: Incomplete
> Status in alsa-plugins in Ubuntu Hardy: Incomplete
> Status in pulseaudio in Ubuntu Hardy: Invalid
>
> Bug description:
> Steps to reproduce:
>
> Run both of these at the same time:
> gst-launch-0.10 audiotestsrc ! pulsesink
> gst-launch-0.10 audiotestsrc ! alsasink
>
> If your default sound device does not support hardware mixing, the second
> command will fail. ALSA cannot use the device while PulseAudio is using it,
> and this affects a lot of applications.
>
> Note that if you run the commands the other way around, alsalib will use
> dmix, and then so will pulseaudio, so there is not as much of a problem this
> way around (except for the fact that dmix and PA are doing the same job, and
> you can not control the ALSA-using apps' volumes and routing with PA.)
>
>
> Resolution:
>
> Follow http://pulseaudio.org/wiki/PerfectSetup#ALSAApplications
> i.e. install /etc/asound.conf with:
>
> pcm.pulse {
> type pulse
> }
> ctl.pulse {
> type pulse
> }
> pcm.!default {
> type pulse
> }
> ctl.!default {
> type pulse
> }
>
> Then, install the package "libasound2-plugins", as it contains the required
> "pcm_pulse" and "ctl_pulse" plugins.
>
> Note, too, that there are some applications that fail with ALSA->Pulse:
>
> SDL* seems to hang with neverball, but that is fixed by installing the
> PulseAudio backend for SDL (libsdl1.2debian-pulseaudio), which will replace
> the default ALSA backend.
> WINE has its own issues with regards to device selection, which I don't
> know a remedy for.
> Skype* also has its own problems, but these aren't fixable by us and should
> not block us, though should be given some consideraton.
>
> * SDL applications (using libsdl1.2-alsa backend), Skype and possibly other
> misbehaving applications work properly with later versions of libasound2 &
> libasound2-plugins from Debian unstable.
>

--
Thiago Bellini Ribeiro
Programador PHP
www.linuxparatodos.com.br
<email address hidden>
Ribeirão Preto - SP

Revision history for this message
James Fisher (james-bluefishwireless) wrote :

Is there any definite work around for this bug? I tried to Making Alsa the default for all sound in the preferences>sound but it didn't fix the issue. Skype blocks Rythmbox if it is being used and Rythmbox blocks skype if it is being used. Firefox will also block both.

I am using 64bit 8.10 on an HP Pavilion DV6000. It is a very annoying issue and must be causing big headaches for a lot of people.

Revision history for this message
RgnKjnVA (rgnkjnva) wrote :

FYI I am plagued by this problem in Intrepid 32-bit with Firefox 3.0.3, Flash 10.0 r22, pulseaudio 0.9.10. I've tried many solutions but none solve the problem.

Revision history for this message
陈炜鑫 (williamchen123) wrote : Re:[Bug 198453] Re: Default ALSA device must use PulseAudio, otherwise ALSA applications may fail

You better not update!

--

做人真难,特别是做得不像人的时候!

在2009-05-26,RgnKjnVA <email address hidden> 写道:
>FYI I am plagued by this problem in Intrepid 32-bit with Firefox 3.0.3,
>Flash 10.0 r22, pulseaudio 0.9.10. I've tried many solutions but none
>solve the problem.
>
>--
>Default ALSA device must use PulseAudio, otherwise ALSA applications may fail
>https://bugs.launchpad.net/bugs/198453
>You received this bug notification because you are a direct subscriber
>of a duplicate bug.

Revision history for this message
Igor Gomes (igorgomes) wrote :

Just to mention, about the specific Skype issue, the Skype developers are adding the Pulseaudio support to the next version!

There's a poll to vote which version are you using. I encourage the Ubuntu users to vote and assure a better support in the future.

http://forum.skype.com/index.php?showtopic=373081&st=0

Best,

Igor Gomes

ariadacapo (gaelvalence)
Changed in alsa-lib (Ubuntu):
status: Fix Released → Confirmed
Changed in alsa-lib (Ubuntu Hardy):
status: Incomplete → Confirmed
Changed in alsa-plugins (Ubuntu):
status: Fix Released → Confirmed
Changed in alsa-plugins (Ubuntu Hardy):
status: Incomplete → Confirmed
Changed in pulseaudio (Ubuntu):
status: Fix Released → Confirmed
Changed in pulseaudio (Ubuntu Hardy):
status: Invalid → Confirmed
Hew (hew)
Changed in alsa-lib (Ubuntu):
status: Confirmed → Fix Released
Changed in alsa-lib (Ubuntu Hardy):
status: Confirmed → Incomplete
Changed in alsa-plugins (Ubuntu):
status: Confirmed → Fix Released
Changed in alsa-plugins (Ubuntu Hardy):
status: Confirmed → Incomplete
Changed in pulseaudio (Ubuntu Hardy):
status: Confirmed → Invalid
Changed in pulseaudio (Ubuntu):
status: Confirmed → Fix Released
CargoPVD (cargopvd)
Changed in pulseaudio (Ubuntu):
status: Fix Released → Fix Committed
Changed in alsa-lib (Ubuntu):
status: Fix Released → New
Changed in alsa-plugins (Ubuntu):
status: Fix Released → New
Changed in pulseaudio (Ubuntu):
status: Fix Committed → New
Daniel T Chen (crimsun)
Changed in pulseaudio:
status: Confirmed → Invalid
Changed in alsa-lib (Ubuntu Hardy):
status: Incomplete → Won't Fix
Changed in alsa-plugins (Ubuntu Hardy):
status: Incomplete → Won't Fix
Changed in alsa-plugins (Ubuntu):
status: New → Fix Released
Changed in alsa-lib (Ubuntu):
status: New → Won't Fix
Changed in pulseaudio (Ubuntu):
status: New → Invalid
status: Invalid → Fix Released
Changed in alsa-plugins (Ubuntu):
status: Fix Released → Won't Fix
Changed in pulseaudio (Ubuntu Hardy):
status: Invalid → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.