Ubuntu

OpenAL Soft doesn't work with PulseAudio (Ubuntu's default sound system)

Reported by bojo42 on 2010-01-06
118
This bug affects 30 people
Affects Status Importance Assigned to Milestone
openal-soft (Ubuntu)
Undecided
Unassigned
pulseaudio (Ubuntu)
Undecided
Unassigned

Bug Description

OpenAL Soft (the default OpenAL implementation) causes troubles in combination with PulseAudio that is used by default on the Ubuntu desktop. These troubles can be very different going from just no sound to crashes and freezes of apps that use OpenAL (mostly games).

The root cause for this seems to be that OpenAL Soft doesn't use it's new pulse output on systems with pulse running ( http://www.pulseaudio.org/wiki/PerfectSetup#OpenALApplications ) and/or the pulse output is a bit buggy. So instead of using Pulse directly (& correctly) it uses ALSA as it's output and because ALSA also has a pulse plugin the sound is routed to PulseAudio and then back to ALSA. But this seems to be buggy, in Ubuntu at least ;).

I did this new report to synergize all the efforts of the various reports about this issue, so there is already plenty of information on the different troubles and on suggested solutions in the duplicates. That's why we should try to stay focused here.

bojo42 (bojo42) wrote :

this is very similar to Bug #203158 which describes the problems SDL has with it's ALSA output when Pulse is running.

Changed in openal-soft (Ubuntu):
status: New → Confirmed
bojo42 (bojo42) on 2010-01-06
Changed in pulseaudio (Ubuntu):
status: New → Confirmed
bojo42 (bojo42) on 2010-01-06
description: updated

2010/1/6 bojo42 <email address hidden>

> this is very similar to Bug #203158 which describes the problems SDL has
> with it's ALSA output when Pulse is running.
>
> ** Changed in: openal-soft (Ubuntu)
> Status: New => Confirmed
>
> ** Also affects: pulseaudio (Ubuntu)
> Importance: Undecided
> Status: New
>
> ** Changed in: pulseaudio (Ubuntu)
> Status: New => Confirmed
>
> --
> OpenAL Soft doesn't work with PulseAudio (Ubuntu's default sound system)
> https://bugs.launchpad.net/bugs/503780
> You received this bug notification because you are a member of Ubuntu
> Audio Team, which is subscribed to pulseaudio in ubuntu.
>
> Status in “openal-soft” package in Ubuntu: Confirmed
> Status in “pulseaudio” package in Ubuntu: Confirmed
>
> Bug description:
> OpenAL Soft (the default OpenAL implementation) causes troubles in
> combination with PulseAudio that is used by default on the Ubuntu desktop.
> These troubles can be very different going from just no sound to crashes and
> freezes of apps that use OpenAL (mostly games).
>
> The root cause for this seems to be that OpenAL Soft has still no native
> pulse output and the development of one has been stalled (
> http://www.pulseaudio.org/wiki/PerfectSetup#OpenALApplications ). So
> instead of using Pulse directly it uses ALSA as it's output and because ALSA
> also has a pulse plugin the sound is routed to PulseAudio and then back to
> ALSA. But this seems to be buggy, in Ubuntu at least ;).
>
> I did this new report to synergize all the efforts of the various reports
> about this issue, so there is already plenty of information on the different
> troubles and on suggested solutions in the duplicates. That's why we should
> try to stay focused here.
>
>
> R =

git clone git://git.0pointer.de/pavucontrol

Kai Mast (kai-mast) wrote :

just add a file to your home folder name .alsoftrc and inside put "drivers=pulse"

this fixed the problem for me and proves that the default behaviour is wrong and needs to be fixed!

Kai Mast (kai-mast) wrote :

Ah okay, figured out from the toppostlink.

The ubuntu package just has to make this change to /etc/openal/alsoft.conf and it would work perfect with the current packages in lucid.

Daniel T Chen (crimsun) wrote :

On Thu, Jan 7, 2010 at 7:06 PM, Kai Mast wrote:
> The ubuntu package just has to make this change to
> /etc/openal/alsoft.conf and it would work perfect with the current
> packages in lucid.

...and would mess up people who don't use PA.

Kai Mast (kai-mast) wrote :

You could also put

drivers = pulse,alsa

That way pulse would be preferred but if not avaible ALSA would be used.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openal-soft - 1:1.10.622-1ubuntu1

---------------
openal-soft (1:1.10.622-1ubuntu1) lucid; urgency=low

  * alsoftrc.sample: Prefer pulse to the alsa and port drivers
    (LP: #503780)
 -- Daniel T Chen <email address hidden> Thu, 07 Jan 2010 21:27:57 -0500

Changed in openal-soft (Ubuntu):
status: Confirmed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:0.9.22~0.9.21+341-g62bf-0ubuntu1

---------------
pulseaudio (1:0.9.22~0.9.21+341-g62bf-0ubuntu1) lucid; urgency=low

  * New snapshot based on stable-queue git branch (testing requested
    specifically by upstream)
    - LP: #164745, #173212, #201391, #204536, #207796, #210016, #221038,
    - LP: #226342, #230408, #236423, #237443, #250059, #269585, #274304,
    - LP: #274577, #275474, #277532, #277566, #277932, #278025, #280534,
    - LP: #283049, #286816, #287036, #292732, #298011, #298301, #300290,
    - LP: #302038, #311497, #311853, #324062, #339448, #344057, #348979,
    - LP: #350829, #356206, #367379, #367544, #369822, #371897, #374846,
    - LP: #375570, #381801, #399515, #402950, #403786, #408169, #409322,
    - LP: #409723, #410326, #410446, #417695, #417976, #419271, #421072,
    - LP: #422774, #423979, #424655, #425028, #427016, #431072, #432660,
    - LP: #437640, #437996, #442191, #443306, #443389, #446719, #449762,
    - LP: #455417, #461532, #464652, #483191, #497537, #503780
  * debian/patches/:
    + add: 0099-change-configure-git-version-tag.patch: Match released
           upstream 0.9.21 for shlibs and LIBPULSE_VERSION_INFO
    - drop: 0004-set-tsched0.patch (no longer relevant)
            0050-revert-pacmd-poll-argv.patch (no longer relevant)
            0056-dont-bail-on-sound-class-modem.patch (merged)
            0056-ignore-sound-class-modem.patch (merged)
            0058-Backport-4c793.patch (merged)
            0059-Backport-978d3.patch (merged)
            0060-fix-implicit-func-decl-cpu-arm.patch (merged)
            0061-Backport-c5fdb.patch (merged)
            0070-dont-bail-on-sound-class-modem-devs.patch (merged)
    + refresh: 0001-change-resample-and-buffering.patch
               0090-disable-flat-volumes.patch
               0091-dont-load-cork-music-on-phone.patch
               0057-load-module-x11-bell.patch
 -- Daniel T Chen <email address hidden> Thu, 14 Jan 2010 20:33:05 -0500

Changed in pulseaudio (Ubuntu):
status: Confirmed → Fix Released
bojo42 (bojo42) wrote :

does prefering pulse in the config also work well in case no pulse is running, meaning so does the fallback to alsa work correctly for people & variants without PulseAudio? can somebody confirm that (maybe Kubuntu users)?

Hello,

As you know, OpenAL poses some problems with the PulseAudio driver.
I just clone the latest version of OpenAL GIT and PulseAudio works correctly.

To configure OpenAL, the .alsoftrc contains a single line: drivers = pulse

For those who want to experiment, go see the site http://kcat.strangesoft.net/openal.html to retrieve and test the latest version.

I look forward to your comments.

Thank you.

Vincent Francois <email address hidden>, France country.

Hello, good evening,

I just received this message from the email list openal-devel.
As I said in the previous post, OpenAL works correctly with PulseAudio.

To convince you, here is the message :

>>> BEGIN OF MESSAGE

New version is up and ready:

http://kcat.strangesoft.net/openal.html

This release fixes compatibility with PulseAudio 0.9.21, and makes PulseAudio
the default backend (if PA is not available, it will still fall back to ALSA,
OSS, etc). The PulseAudio backend will also attempt to match an output format
and frequency as reported by the default sink, if an override was not set in
the config file (so if Pulse is configured for 5.1 output, OpenAL Soft will
automatically pick that up and render 5.1; no extra configuration needed).

The crash with the echo effect is fixed, and reverb has been improved. It now
supports the Modulation and Echo properties. Multi-channel sources are also
passed through the auxiliary sends, as a mono mix, so they will work with
auxiliary slot effects.

There is also a new head-dampening config option, which slightly filters
sources emanating behind the listener, for mono and stereo output. It also
supports the AL_EXT_source_distance_model extension, as described here
<http://kcat.strangesoft.net/openal-extensions/EXT_source_distance_model.txt>.
Additionally, there is a new config option to select between 3 resamplers:
nearest (no interpolation), linear (default), and cosine.

The next version will hopefully see more of the experimental extensions
completed, better resamplers (such as cubic), and more. I'll also try to get
out more frequent releases if major issues turn up.

Thanks for looking! Please feel free to try it out, and let me know how it
works for you. :)

- Chris
_______________________________________________
Openal-devel mailing list
<email address hidden>
http://opensource.creative.com/mailman/listinfo/openal-devel

>>> END OF MESSAGE

Thank's you

Vincent Francois <email address hidden>, France country.

Adam Olsen (rhamph) wrote :

I've experienced hangs in both Nexuiz and Warzone2100 as well as severe crackling in Warzone2100. I tried overriding the output device, but that just made Warzone2100 hang. Installing the OpenAL packages from lucid fixed the crackling and presumably the hangs (but they're sporadic anyway).

bojo42 (bojo42) wrote :

just to clarify: the packages that fix this bug are in lucid. to fix it in Ubuntu 9.10 and before we would need an SRU. as a immediately workaround for current Ubuntu releases install the packages from lucid as Adam said:

http://packages.ubuntu.com/lucid/libopenal1

bdoe (bdoe-att) wrote :

"just add a file to your home folder name .alsoftrc and inside put "drivers=pulse"

this fixed the problem for me and proves that the default behaviour is wrong and needs to be fixed!"

This actually *broke* openAL for me!

What I did: Edited ~/.openalrc and added the line "drivers=pulse" (the existing drivers line is commented out).

Launched gmplayer, set audio preference to OpenAL. Restarted gmplayer.

Loaded an MP3 file. Pressed Play.

Observed PulseAudio Manager opened a new sink named "Playback Stream", with gmplayer as owner.

Observed gmplayer froze completely. No response from UI whatsoever. No sound from gmplayer.

Killed the sink using PulseAudio Manager. This unfroze gmplayer. Pressed Play again, and observed the same indications again. Killed the sink, then changed gmplayer's audio prefs to use Pulse directly. Pressed Play again, and gmplayer played normally.

This is with libopenal.so.1.10.622

$ ls /usr/lib/libopenal*
libopenal.so.1 libopenal.so.1.10.622

Ok guys... this isn't apparently entirely fixed. Running Blender SVN generates a boatload of ratelimit.c issues:

Aug 22 12:22:37 workstation pulseaudio[1513]: ratelimit.c: 184 events suppressed

Can someone look into this?

On Sun, Aug 22, 2010 at 6:43 PM, Troy James Sobotka
<email address hidden> wrote:
> Ok guys... this isn't apparently entirely fixed. Running Blender SVN
> generates a boatload of ratelimit.c issues:
>
> Aug 22 12:22:37 workstation pulseaudio[1513]: ratelimit.c: 184 events
> suppressed

By itself that means very little. Can you generate a verbose log,
please? (https://wiki.ubuntu.com/PulseAudio/Log)

Also, 99.9% of the causes of that message are due to a broken sound
driver (ubuntu-bug alsa-base).

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers