• apulse firefox crashes firefox

    From Anton Antimo@anton@safunu.org to alt.comp.software.firefox on Wed Sep 9 09:00:11 2026
    From Newsgroup: alt.comp.software.firefox

    I use ALSA on this GNU Void---see my ~/asoundrc below---, so in order to
    be able to get sound out of Firefox, I run it with the program apulse
    (see an introduction to apulse below). I've noticed that if I unplug my
    USB soundbar, Firefox ends up crashing after being unable to open the
    device. It crashes as soon as a sound is emitted such as some
    notification popping up or trying to play music from some website.

    Here's the crash as seen by a terminal:

    --8<-------------------------------------------------------->8---
    ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) [error.core] Cannot open shared library libasound_module_pcm_fallback.so (/usr/lib/alsa-lib/libasound_module_pcm_fallback.so: cannot open shared object file: No such file or directory)
    [apulse] [error] do_connect_pcm: can't open playback device "default". Error code -6 (No such device or address)
    [apulse] [error] do_connect_pcm: failed to open ALSA device. Apulse does no resampling or format conversion, leaving that task to ALSA plugins. Ensure that selected device is capable of playing a particular sample format at a particular rate. They have to be supported by either hardware directly, or by "plug" and "dmix" ALSA plugins which will perform required conversions on CPU.
    [...]
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Segmentation fault apulse firefox
    %Exiting due to channel error. --8<-------------------------------------------------------->8---

    (*) My ~/.asoundrc

    pcm.dmixer {
    type dmix
    ipc_key 1024
    slave {
    pcm "hw:2,0"
    format S32_LE
    rate 48000
    }
    }

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

    ctl.!default {
    type hw
    card 0
    }

    (*) The apulse manual

    NAME
    apulse - The PulseAudio emulator for ALSA

    SYNOPSIS
    apulse <program-name> [program-parameters]...

    DESCRIPTION
    The program provides an alternative partial implementation of the
    PulseAudio API. It consists of a loader script and a number of shared
    libraries with the same names as from original PulseAudio, so
    applications could dynamically load them and think they are talking to
    PulseAudio. Internally, no separate sound mixing daemon is used.
    Instead, apulse relies on ALSA's dmix, dsnoop, and plug plugins to
    handle multiple sound sources and capture streams running at the same
    time. dmix plugin muxes multiple playback streams; dsnoop plugin allow
    multiple applications to capture from a single microphone; and plug
    plugin transparently converts audio between various sample formats,
    sample rates and channel numbers. For more than a decade now, ALSA
    comes with these plugins enabled and configured by default.

    apulse wasn't designed to be a drop-in replacement of PulseAudio. It's
    pointless, since that will be just reimplementation of original
    PulseAudio, with the same client-daemon architecture, required by the
    complete feature set. Instead, only parts of the API that are crucial
    to specific applications are implemented. That's why there is a loader
    script, named apulse. It updates value of LD_LIBRARY_PATH environment
    variable to point also to the directory where apulse's libraries are
    installed, making them available to the application.

    Name comes from names of both ALSA and PulseAudio. As aoss was a
    compatibility layer between OSS programs and ALSA, apulse was designed
    to be compatibility layer between PulseAudio applications and ALSA.

    ENVIRONMENT
    The following environment variables can be used to configure the
    devices used by apulse. Try hw:0,0, plughw:0,0 and the like. Refer to
    the ALSA user guide for a full list of device names.

    APULSE_CAPTURE_DEVICE: Can be used to configure the capture device.

    APULSE_PLAYBACK_DEVICE: Can be used to configure the playback device.

    RETURN VALUE
    apulse is a simple shell wrapper script that calls exec on the program
    given in parameters. Except for cases when the wrapper itself fails to
    load, return value is the return value of that program.

    EXAMPLE
    Run a newer Firefox browser with fake PulseAudio:

    apulse firefox

    AUTHORS
    apulse was written by Rinat Ibragimov in 2014-2017.

    (*) By the way

    As the manual says itself, apulse is merely a shell script. Here it is:

    --8<-------------------------------------------------------->8---
    #!/bin/sh

    APULSEPATH="/usr/lib/apulse"

    LD_LIBRARY_PATH=$APULSEPATH${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} exec "$@" --8<-------------------------------------------------------->8---
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stanislav N. aka pztrn@pztrn@oldproto.invalid to alt.comp.software.firefox on Thu Sep 10 07:27:45 2026
    From Newsgroup: alt.comp.software.firefox

    09.09.2026 17:00, Anton Antimo wrote:
    ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) [error.core] Cannot open shared library libasound_module_pcm_fallback.so (/usr/lib/alsa-lib/libasound_module_pcm_fallback.so: cannot open shared object file: No such file or directory)
    [apulse] [error] do_connect_pcm: can't open playback device "default". Error code -6 (No such device or address)
    [apulse] [error] do_connect_pcm: failed to open ALSA device. Apulse does no resampling or format conversion, leaving that task to ALSA plugins. Ensure that selected device is capable of playing a particular sample format at a particular rate. They have to be supported by either hardware directly, or by "plug" and "dmix" ALSA plugins which will perform required conversions on CPU.

    Does /usr/lib/alsa-lib/libasound_module_pcm_fallback.so exist on your system? --
    WBR, Stanislav Nikitin a.k.a. pztrn.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to alt.comp.software.firefox on Thu Sep 10 03:26:15 2026
    From Newsgroup: alt.comp.software.firefox

    On Wed, 09 Sep 2026 09:00:11 -0300, Anton Antimo wrote:

    I use ALSA on this GNU Void---see my ~/asoundrc below---, so in
    order to be able to get sound out of Firefox, I run it with the
    program apulse

    I donrCOt understand why thatrCOs necessary. PulseAudio provides its own
    ALSA emulation on top of the real ALSA. And PulseAudio is obsolete
    anyway, replaced with PipeWire which is functionally compatible and
    also provides corresponding services for video.

    IrCOve never had audio problems on Firefox, that I can recall, to do
    with PulseAudio. And certainly not with PipeWire.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Anton Antimo@anton@safunu.org to alt.comp.software.firefox on Thu Sep 10 11:39:57 2026
    From Newsgroup: alt.comp.software.firefox

    "Stanislav N. aka pztrn" <pztrn@oldproto.invalid> writes:

    09.09.2026 17:00, Anton Antimo wrote:
    ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) [error.core] Cannot open shared library libasound_module_pcm_fallback.so (/usr/lib/alsa-lib/libasound_module_pcm_fallback.so: cannot open shared object file: No such file or directory)
    [apulse] [error] do_connect_pcm: can't open playback device "default". Error code -6 (No such device or address)
    [apulse] [error] do_connect_pcm: failed to open ALSA device. Apulse does no resampling or format conversion, leaving that task to ALSA plugins. Ensure that selected device is capable of playing a particular sample format at a particular rate. They have to be supported by either hardware directly, or by "plug" and "dmix" ALSA plugins which will perform required conversions on CPU.

    Does /usr/lib/alsa-lib/libasound_module_pcm_fallback.so exist on your system?

    No, it doesn't.

    %pwd
    /usr/lib/alsa-lib

    %ls
    libasound_module_ctl_pipewire.so libasound_module_pcm_pipewire.so
    %

    Should I have it?

    Oh, good thinking. You probably identified how I can avoid the crash.

    Interesting---I don't know what I did here, but Firefox still crashes
    when I keep device 2 in my .asoundrc, but I don't see the error message
    above any longer. The error I now see is below. (Removing my .asoundrc completely means I don't listen to audio anymore, but Firefox doesn't
    crash anymore.)

    (*) The new error when Firefox crashes

    ALSA lib confmisc.c:165:(snd_config_get_card) [error.core] Cannot get card index for 2
    [apulse] [error] do_connect_pcm: can't open playback device "default". Error code -2 (No such file or directory)
    [apulse] [error] do_connect_pcm: failed to open ALSA device. Apulse does no resampling or format conversion, leaving that task to ALSA plugins. Ensure that selected device is capable of playing a particular sample format at a particular rate. They have to be supported by either hardware directly, or by "plug" and "dmix" ALSA plugins which will perform required conversions on CPU.
    [Child 24147, MediaDecoderStateMachine #2] WARNING: 7f7ac3770780 OpenCubeb() failed to init cubeb: file dom/media/AudioStream.cpp:279
    [Child 24147, MediaDecoderStateMachine #2] WARNING: Decoder=7f7ac9119300 [OnMediaSinkAudioError]: file dom/media/MediaDecoderStateMachine.cpp:4630
    [Child 24147, MediaDecoderStateMachine #2] WARNING: Decoder=7f7ac9119300 Decode error: NS_ERROR_DOM_MEDIA_MEDIASINK_ERR (0x806e000b) - OnMediaSinkAudioError: file dom/media/MediaDecoderStateMachineBase.cpp:168
    JavaScript warning: https://music.youtube.com/s/player/8c3fda2d/player_es6.vflset/en_US/base.js, line 7989: This error message will be blank when privacy.resistFingerprinting = true. If it is really necessary, please add it to the whitelist in MediaError::GetMessage: OnMediaSinkAudioError
    JavaScript warning: https://music.youtube.com/s/player/8c3fda2d/player_es6.vflset/en_US/base.js, line 7989: This error message will be blank when privacy.resistFingerprinting = true. If it is really necessary, please add it to the whitelist in MediaError::GetMessage: OnMediaSinkAudioError
    ALSA lib confmisc.c:165:(snd_config_get_card) [error.core] Cannot get card index for 2
    [apulse] [error] do_connect_pcm: can't open playback device "default". Error code -2 (No such file or directory)
    [apulse] [error] do_connect_pcm: failed to open ALSA device. Apulse does no resampling or format conversion, leaving that task to ALSA plugins. Ensure that selected device is capable of playing a particular sample format at a particular rate. They have to be supported by either hardware directly, or by "plug" and "dmix" ALSA plugins which will perform required conversions on CPU.
    [Child 24147, MediaDecoderStateMachine #2] WARNING: 7f7ac6035500 OpenCubeb() failed to init cubeb: file dom/media/AudioStream.cpp:279
    [Child 24147, MediaDecoderStateMachine #2] WARNING: Decoder=7f7ac5bbaa00 [OnMediaSinkAudioError]: file dom/media/MediaDecoderStateMachine.cpp:4630
    [Child 24147, MediaDecoderStateMachine #2] WARNING: Decoder=7f7ac5bbaa00 Decode error: NS_ERROR_DOM_MEDIA_MEDIASINK_ERR (0x806e000b) - OnMediaSinkAudioError: file dom/media/MediaDecoderStateMachineBase.cpp:168
    JavaScript warning: https://music.youtube.com/s/player/8c3fda2d/player_es6.vflset/en_US/base.js, line 7989: This error message will be blank when privacy.resistFingerprinting = true. If it is really necessary, please add it to the whitelist in MediaError::GetMessage: OnMediaSinkAudioError
    JavaScript warning: https://music.youtube.com/s/player/8c3fda2d/player_es6.vflset/en_US/base.js, line 7989: This error message will be blank when privacy.resistFingerprinting = true. If it is really necessary, please add it to the whitelist in MediaError::GetMessage: OnMediaSinkAudioError
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Segmentation fault apulse firefox
    %
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Anton Antimo@anton@safunu.org to alt.comp.software.firefox on Thu Sep 10 11:13:16 2026
    From Newsgroup: alt.comp.software.firefox

    Lawrence DrCOOliveiro <ldo@nz.invalid> writes:

    On Wed, 09 Sep 2026 09:00:11 -0300, Anton Antimo wrote:

    I use ALSA on this GNU Void---see my ~/asoundrc below---, so in
    order to be able to get sound out of Firefox, I run it with the
    program apulse

    I donrCOt understand why thatrCOs necessary. PulseAudio provides its own
    ALSA emulation on top of the real ALSA. And PulseAudio is obsolete
    anyway, replaced with PipeWire which is functionally compatible and
    also provides corresponding services for video.

    IrCOve never had audio problems on Firefox, that I can recall, to do
    with PulseAudio. And certainly not with PipeWire.

    I agree---if I were running pulseaudio or pipewire. I'm running no such daemon. My understanding is that Firefox is programmed to speak to
    PulseAudio, not ALSA, but then apulse reroutes the calls to ALSA and now
    I don't need pulseaudio or pipewire.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to alt.comp.software.firefox on Mon Sep 14 23:12:35 2026
    From Newsgroup: alt.comp.software.firefox

    On Thu, 10 Sep 2026 11:13:16 -0300, Anton Antimo wrote:

    Lawrence DrCOOliveiro <ldo@nz.invalid> writes:

    IrCOve never had audio problems on Firefox, that I can recall, to do
    with PulseAudio. And certainly not with PipeWire.

    I agree---if I were running pulseaudio or pipewire.

    Why not run that, then?
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From R Daneel Olivaw@Danni@hyperspace.vogon.gov.invalid to alt.comp.software.firefox on Wed Sep 16 18:38:05 2026
    From Newsgroup: alt.comp.software.firefox

    Lawrence DrCOOliveiro wrote:
    On Thu, 10 Sep 2026 11:13:16 -0300, Anton Antimo wrote:

    Lawrence DrCOOliveiro <ldo@nz.invalid> writes:

    IrCOve never had audio problems on Firefox, that I can recall, to do
    with PulseAudio. And certainly not with PipeWire.

    I agree---if I were running pulseaudio or pipewire.

    Why not run that, then?


    I run what my Distribution configures, and it changed a release or two ago.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Anton Antimo@anton@safunu.org to alt.comp.software.firefox on Wed Sep 16 12:23:36 2026
    From Newsgroup: alt.comp.software.firefox

    Lawrence DrCOOliveiro <ldo@nz.invalid> writes:

    On Thu, 10 Sep 2026 11:13:16 -0300, Anton Antimo wrote:

    Lawrence DrCOOliveiro <ldo@nz.invalid> writes:

    IrCOve never had audio problems on Firefox, that I can recall, to do
    with PulseAudio. And certainly not with PipeWire.

    I agree---if I were running pulseaudio or pipewire.

    Why not run that, then?

    I've been living just fine without them. I've been listening to audio
    in high-quality, watching videos, and that means I don't need any of
    these services.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to alt.comp.software.firefox on Thu Sep 17 04:13:44 2026
    From Newsgroup: alt.comp.software.firefox

    On Wed, 16 Sep 2026 12:23:36 -0300, Anton Antimo wrote:

    Lawrence DrCOOliveiro <ldo@nz.invalid> writes:

    On Thu, 10 Sep 2026 11:13:16 -0300, Anton Antimo wrote:

    Lawrence DrCOOliveiro <ldo@nz.invalid> writes:

    IrCOve never had audio problems on Firefox, that I can recall, to do
    with PulseAudio. And certainly not with PipeWire.

    I agree---if I were running pulseaudio or pipewire.

    Why not run that, then?

    I've been living just fine without them.

    Except for this problem.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From not@not@telling.you.invalid (Computer Nerd Kev) to alt.comp.software.firefox on Fri Sep 18 08:12:14 2026
    From Newsgroup: alt.comp.software.firefox

    Anton Antimo <anton@safunu.org> wrote:
    Lawrence D'Oliveiro <ldo@nz.invalid> writes:
    On Wed, 09 Sep 2026 09:00:11 -0300, Anton Antimo wrote:
    I use ALSA on this GNU Void---see my ~/asoundrc below---, so in
    order to be able to get sound out of Firefox, I run it with the
    program apulse

    I don't understand why that's necessary. PulseAudio provides its own
    ALSA emulation on top of the real ALSA. And PulseAudio is obsolete
    anyway, replaced with PipeWire which is functionally compatible and
    also provides corresponding services for video.

    I agree---if I were running pulseaudio or pipewire. I'm running no such daemon. My understanding is that Firefox is programmed to speak to PulseAudio, not ALSA,

    Actually ALSA support can still be enabled when Firefox is compiled
    by uncommenting "ac_add_options --enable-audio-backends=alsa" in
    mozconfig. Unfortunately some distros don't do that when packaging
    Firefox, nor do Mozilla themselves for their own Linux binaries.

    but then apulse reroutes the calls to ALSA and now I don't need
    pulseaudio or pipewire.

    That's probably still easier the compiling Firefox yourself if you
    can't use a package built with ALSA enabled. Although you could try
    asking the Firefox package maintainer for your distro to enable
    ALSA support in their builds.
    --
    __ __
    #_ < |\| |< _#
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Anton Antimo@anton@safunu.org to alt.comp.software.firefox on Tue Sep 22 11:54:44 2026
    From Newsgroup: alt.comp.software.firefox

    Lawrence DrCOOliveiro <ldo@nz.invalid> writes:

    On Wed, 16 Sep 2026 12:23:36 -0300, Anton Antimo wrote:

    Lawrence DrCOOliveiro <ldo@nz.invalid> writes:

    On Thu, 10 Sep 2026 11:13:16 -0300, Anton Antimo wrote:

    Lawrence DrCOOliveiro <ldo@nz.invalid> writes:

    IrCOve never had audio problems on Firefox, that I can recall, to do >>>>> with PulseAudio. And certainly not with PipeWire.

    I agree---if I were running pulseaudio or pipewire.

    Why not run that, then?

    I've been living just fine without them.

    Except for this problem.

    But that's Firefox's problem, not the audio system.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Anton Antimo@anton@safunu.org to alt.comp.software.firefox on Tue Sep 22 11:57:04 2026
    From Newsgroup: alt.comp.software.firefox

    not@telling.you.invalid (Computer Nerd Kev) writes:

    Anton Antimo <anton@safunu.org> wrote:
    Lawrence D'Oliveiro <ldo@nz.invalid> writes:
    On Wed, 09 Sep 2026 09:00:11 -0300, Anton Antimo wrote:
    I use ALSA on this GNU Void---see my ~/asoundrc below---, so in
    order to be able to get sound out of Firefox, I run it with the
    program apulse

    I don't understand why that's necessary. PulseAudio provides its own
    ALSA emulation on top of the real ALSA. And PulseAudio is obsolete
    anyway, replaced with PipeWire which is functionally compatible and
    also provides corresponding services for video.

    I agree---if I were running pulseaudio or pipewire. I'm running no such
    daemon. My understanding is that Firefox is programmed to speak to
    PulseAudio, not ALSA,

    Actually ALSA support can still be enabled when Firefox is compiled
    by uncommenting "ac_add_options --enable-audio-backends=alsa" in
    mozconfig. Unfortunately some distros don't do that when packaging
    Firefox, nor do Mozilla themselves for their own Linux binaries.

    but then apulse reroutes the calls to ALSA and now I don't need
    pulseaudio or pipewire.

    That's probably still easier the compiling Firefox yourself if you
    can't use a package built with ALSA enabled. Although you could try
    asking the Firefox package maintainer for your distro to enable
    ALSA support in their builds.

    Thanks for the all the info. It seems that apulse does it well for me.
    I'm good with it. But I don't think Firefox should crash for whatever reason---as no program should.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From not@not@telling.you.invalid (Computer Nerd Kev) to alt.comp.software.firefox on Wed Sep 23 07:33:33 2026
    From Newsgroup: alt.comp.software.firefox

    Anton Antimo <anton@safunu.org> wrote:
    not@telling.you.invalid (Computer Nerd Kev) writes:
    Anton Antimo <anton@safunu.org> wrote:
    My understanding is that Firefox is programmed to speak to
    PulseAudio, not ALSA,

    Actually ALSA support can still be enabled when Firefox is compiled
    by uncommenting "ac_add_options --enable-audio-backends=alsa" in
    mozconfig. Unfortunately some distros don't do that when packaging
    Firefox, nor do Mozilla themselves for their own Linux binaries.

    but then apulse reroutes the calls to ALSA and now I don't need
    pulseaudio or pipewire.

    That's probably still easier the compiling Firefox yourself if you
    can't use a package built with ALSA enabled. Although you could try
    asking the Firefox package maintainer for your distro to enable
    ALSA support in their builds.

    Thanks for the all the info. It seems that apulse does it well for me.
    I'm good with it. But I don't think Firefox should crash for whatever reason---as no program should.

    It could be apulse that's crashing, not Firefox. Since apulse works
    as a library it could do that.

    If you want to help the cause of software stability, best contact
    the apulse developer/s. But I'd argue the real bug is having ALSA
    support disabled in Firefox in the first place. If you can convince
    the person who packages Firefox for your distro to enable ALSA
    support in their builds, then you could cut out this needless
    complexity entirely.
    --
    __ __
    #_ < |\| |< _#
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Anton Antimo@anton@safunu.org to alt.comp.software.firefox on Tue Sep 22 20:24:34 2026
    From Newsgroup: alt.comp.software.firefox

    not@telling.you.invalid (Computer Nerd Kev) writes:

    Anton Antimo <anton@safunu.org> wrote:
    not@telling.you.invalid (Computer Nerd Kev) writes:
    Anton Antimo <anton@safunu.org> wrote:
    My understanding is that Firefox is programmed to speak to
    PulseAudio, not ALSA,

    Actually ALSA support can still be enabled when Firefox is compiled
    by uncommenting "ac_add_options --enable-audio-backends=alsa" in
    mozconfig. Unfortunately some distros don't do that when packaging
    Firefox, nor do Mozilla themselves for their own Linux binaries.

    but then apulse reroutes the calls to ALSA and now I don't need
    pulseaudio or pipewire.

    That's probably still easier the compiling Firefox yourself if you
    can't use a package built with ALSA enabled. Although you could try
    asking the Firefox package maintainer for your distro to enable
    ALSA support in their builds.

    Thanks for the all the info. It seems that apulse does it well for me.
    I'm good with it. But I don't think Firefox should crash for whatever
    reason---as no program should.

    It could be apulse that's crashing, not Firefox. Since apulse works
    as a library it could do that.

    You're right. The bug could be in one of apulse's library.

    If you want to help the cause of software stability, best contact
    the apulse developer/s. But I'd argue the real bug is having ALSA
    support disabled in Firefox in the first place. If you can convince
    the person who packages Firefox for your distro to enable ALSA
    support in their builds, then you could cut out this needless
    complexity entirely.

    Okay. I don't have an opinion there. Thanks for your thoughts.
    --- Synchronet 3.22a-Linux NewsLink 1.2