• Re: Firefox doesn't want to see Pulseaudio

    From Felix Miata@21:1/5 to All on Wed Aug 14 21:50:01 2024
    Stefan Monnier composed on 2024-08-14 15:32 (UTC-0400):

    I have a machine here running a freshly updated and rebooted Debian
    testing where I can't get Firefox (more specifically `firefox-esr`) to
    use audio.

    Check if installing apulse helps. It's supposed to make obstinate apps like Firefox act as though pulseaudio is installed, dead technology, which is not needed when pipewire and wireplumber are working.
    --
    Evolution as taught in public schools is, like religion,
    based on faith, not based on science.

    Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

    Felix Miata

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Monnier@21:1/5 to All on Wed Aug 14 21:40:01 2024
    I have a machine here running a freshly updated and rebooted Debian
    testing where I can't get Firefox (more specifically `firefox-esr`) to
    use audio. E.g. I go to

    https://tekeye.uk/html/html5-video-test-page

    and none of the videos give me any audio output.

    I'm using pipewire and it generally works fine with other applications.
    E.g. `paplay` successfully plays my music files, and `chromium` on the
    same web page gives me audio output just fine.

    When I have `pavucontrol` open, I can "see" that Firefox does not appear
    in the "Playback" tab, contrary to `paplay` and `chromium`.

    When I try `firefox -P` and use a fresh new profile, the same
    problem occurs. Also I can see errors in the output such as:

    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe182f6a100 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for audio/mp4a-latm: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe182875800 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for audio/mp4a-latm: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe181797300 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for audio/mp4a-latm: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe181797300 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for video/avc: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe181797c00 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for audio/mp4a-latm: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe181796a00 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for audio/mp4a-latm: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe181797c00 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for video/avc: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe181796a00 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for video/avc: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe181797f00 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for audio/mp4a-latm: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe181797f00 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for video/avc: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, BackgroundThreadPool #1] WARNING: 7fe1838484c0 OpenCubeb() failed to init cubeb: file ./dom/media/AudioStream.cpp:281
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe17c60cd00 [OnMediaSinkAudioError]: file ./dom/media/MediaDecoderStateMachine.cpp:4604

    The last two lines occur when I click on the "unmute" button in the
    video (on the above web page) which is muted by default.

    Any idea what might be going on and/or how to track it down further?


    Stefan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Monnier@21:1/5 to All on Wed Aug 14 22:50:02 2024
    I have a machine here running a freshly updated and rebooted Debian
    testing where I can't get Firefox (more specifically `firefox-esr`) to
    use audio.

    Check if installing apulse helps. It's supposed to make obstinate apps like Firefox act as though pulseaudio is installed, dead technology, which is not needed when pipewire and wireplumber are working.

    Hmm... let's see.
    Hmm... no, didn't make a difference: after installing `apulse` the same `firefox -P` still behaves identically (with the same error messages),
    and so does `apulse firefox -P`.


    Stefan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From songbird@21:1/5 to Stefan Monnier on Thu Aug 15 00:40:01 2024
    Stefan Monnier wrote:
    I have a machine here running a freshly updated and rebooted Debian
    testing where I can't get Firefox (more specifically `firefox-esr`) to
    use audio.

    i'm running the unstable firefox (otherwise the rest is
    testing) with no issues that i've noticed so far on audio.

    i do have pulseaudio installed along with pipewire-pulse.


    Check if installing apulse helps. It's supposed to make obstinate apps like >> Firefox act as though pulseaudio is installed, dead technology, which is not >> needed when pipewire and wireplumber are working.

    Hmm... let's see.
    Hmm... no, didn't make a difference: after installing `apulse` the same `firefox -P` still behaves identically (with the same error messages),
    and so does `apulse firefox -P`.

    hmmm...


    songbird

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to Max Nikulin on Thu Aug 15 07:00:01 2024
    On Thu, Aug 15, 2024 at 09:10:18AM +0700, Max Nikulin wrote:
    On 15/08/2024 02:32, Stefan Monnier wrote:
    Error no decoder found for audio/mp4a-latm

    It relies on non-free AAC codec that you likely do not have installed. Perhaps chromium has a built-in implementation.

    Max, you rock.

    Cheers
    --
    t

    -----BEGIN PGP SIGNATURE-----

    iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZr2I8AAKCRAFyCz1etHa RuC0AJ0freAV30rzI0NgjlnckKXIVQp/BACdFlkz2GubjCtyic1gn4PZ2nWUFQQ=
    =SK1M
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to Stefan Monnier on Thu Aug 15 06:50:01 2024
    On Wed, Aug 14, 2024 at 03:32:31PM -0400, Stefan Monnier wrote:
    I have a machine here running a freshly updated and rebooted Debian
    testing where I can't get Firefox (more specifically `firefox-esr`) to
    use audio. E.g. I go to

    https://tekeye.uk/html/html5-video-test-page

    and none of the videos give me any audio output.

    I'm using pipewire and it generally works fine with other applications.
    E.g. `paplay` successfully plays my music files, and `chromium` on the
    same web page gives me audio output just fine.

    Aha -- so you are using pipewire's pulseaudio emulation?

    Search engineering (hah) turns up some noises like this [1] which at
    least suggest to tinker with sandbox settings. They might have painted themselves again into a corner by not allowing some processes to see
    some paths in the file system. Granted, this is just a thin thing to
    go by, sorry.

    I hate browsers. Both of them. Bah.

    Cheers

    [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1839852
    --
    t

    -----BEGIN PGP SIGNATURE-----

    iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZr2IrgAKCRAFyCz1etHa RnlPAJ9jjStD7KaQWlsL6qYlinwitKQXewCeKcaO/6XDe+bjEwT/Ox5BySLtWnA=
    =ZocG
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to Felix Miata on Thu Aug 15 06:40:01 2024
    On Wed, Aug 14, 2024 at 03:47:33PM -0400, Felix Miata wrote:
    Stefan Monnier composed on 2024-08-14 15:32 (UTC-0400):

    I have a machine here running a freshly updated and rebooted Debian
    testing where I can't get Firefox (more specifically `firefox-esr`) to
    use audio.

    Check if installing apulse helps. It's supposed to make obstinate apps like Firefox act as though pulseaudio is installed, dead technology, which is not needed when pipewire and wireplumber are working.

    Apulse won't reconcile Firefox with pulseaudio, it just does a LD_PRELOAD trick to convince Firefox it's talking to pulseaudio while it is actually talking (through a shim) to ALSA.

    I've been using it successfully with oldstable. With stable and Firefox ESR (115.12.0esr-1~deb12u1) I haven't succeeded, alas.

    So I doubt it'll work with apulse if it refuses to work with pulseaudio.

    And -- don't forget: you have to call the browser "through" apulse, i.e. "apulse firefox <params>" to let apulse do its LD_PRELOAD trick.

    Cheers
    --
    t

    -----BEGIN PGP SIGNATURE-----

    iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZr2GfwAKCRAFyCz1etHa Rn1vAJ9F1XA9kKSzed/ay+qbYHUwrEIbSgCfcvXMpd11O2S8aXkypAzfIra2MDs=
    =u51v
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Monnier@21:1/5 to All on Thu Aug 15 13:50:01 2024
    Aha -- so you are using pipewire's pulseaudio emulation?

    Yes.

    Search engineering (hah) turns up some noises like this [1] which at
    least suggest to tinker with sandbox settings. They might have painted themselves again into a corner by not allowing some processes to see
    some paths in the file system. Granted, this is just a thin thing to
    go by, sorry.

    I have no idea what sandbox settings you're referring to.
    How/where can I find those to "tinker" with?


    Stefan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to Stefan Monnier on Thu Aug 15 14:00:01 2024
    On Thu, Aug 15, 2024 at 07:46:19AM -0400, Stefan Monnier wrote:
    Error no decoder found for audio/mp4a-latm
    It relies on non-free AAC codec that you likely do not have installed.

    That's a side-issue: the web page I pointed to has various videos in
    various formats and none of them work (hence the error messages
    mentioning other "decoder not found" mime types).

    Darn.

    Cheers
    --
    t

    -----BEGIN PGP SIGNATURE-----

    iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZr3s8gAKCRAFyCz1etHa RkYEAJ0VnC/pSH6rgL4iqkV3/fXs9RlwkgCeIMCXZbOoH2mYfQluTyBG1jyBe+c=
    =mF8E
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Monnier@21:1/5 to All on Thu Aug 15 14:00:01 2024
    Error no decoder found for audio/mp4a-latm
    It relies on non-free AAC codec that you likely do not have installed.

    That's a side-issue: the web page I pointed to has various videos in
    various formats and none of them work (hence the error messages
    mentioning other "decoder not found" mime types).


    Stefan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Monnier@21:1/5 to All on Thu Aug 15 15:50:01 2024
    I have no idea what sandbox settings you're referring to.
    How/where can I find those to "tinker" with?
    [1a] also: about:config -> security.sandbox.*

    Hmm... I set both `security.sandbox.socket.process.level` and `security.sandbox.content.level` to 0 as well as `media.cubeb.sandbox`
    to false (and restarted Firefox) but it didn't help.

    My current test is to open

    firefox file:///my/music/storage/

    and click on an Ogg file.

    [Child 17314, MediaDecoderStateMachine #1] WARNING: 7f92bdd47ee0 OpenCubeb() failed to init cubeb: file ./dom/media/AudioStream.cpp:281
    [Child 17314, MediaDecoderStateMachine #1] WARNING: Decoder=7f92beb9cf00 [OnMediaSinkAudioError]: file ./dom/media/MediaDecoderStateMachine.cpp:4604
    [Child 17314, MediaDecoderStateMachine #1] WARNING: Decoder=7f92beb9cf00 Decode error: NS_ERROR_DOM_MEDIA_MEDIASINK_ERR (0x806e000b) - OnMediaSinkAudioError: file ./dom/media/MediaDecoderStateMachineBase.cpp:164


    - Stefan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Monnier@21:1/5 to All on Thu Aug 15 16:00:02 2024
    If you have libavcodec installed (from "Recommends") then it might be some testing issue. There is no problem in bookworm.

    I do have it installed. I also tried to install `libavcodec-extra` at
    some point (when I saw that `mp4a-latm` 🙂), but it made no difference
    of course.

    Firefox exposes some codec info in about:support#media

    Thanks. When I "disable sandboxing" (by setting the three vars
    I mentioned in my answer to Tomas) it says:

    Audio Backend: alsa
    Max Channels: 0
    Preferred Sample Rate: 44100
    Roundtrip latency (standard deviation): ...
    Codec Support Information:
    VP8 SW
    VP9 SW
    AV1 SW
    Theora SW
    FLAC SW
    MP3 SW
    Opus SW
    Vorbis SW
    Wave SW

    with no input nor output devices.

    So it looks like the codecs are found in that case, but the audio
    backend is wrong (it should be Pulse, AFAIK) and the max channels shows
    that there's really no output.

    If I leave the sandboxing options at their default setting, then I get
    a similar result except that the list of codecs is empty.


    Stefan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Monnier@21:1/5 to All on Thu Aug 15 16:30:01 2024
    I have not found the real source of the problem, but I have found out
    why it worked on other machines and not on this one: some months
    (years?) ago I made this i386 machine use `firefox-esr:amd64` because
    Firefox tabs kept crashing (even for fairly simple pages).

    [ I've been using the i386 version of `firefox-esr` without problem on
    other machines, so I don't know why it crashed on this one, but
    switching to the amd64 version did "solve" the problem back then.
    My crystal ball told me that it was probably due to the relatively
    large about of RAM (24G) available in this machine confusing Firefox
    into the illusion that it can allocate a lot more memory than the i386
    architecture really allows, and thus getting memory allocation
    failure. ]

    I had completely forgotten about this detail.

    I have now switched back to `firefox-esr:i386` and the audio works again
    (and it looks like the old problem I had with it has disappeared in the
    mean time). I guess it's time I switch this machine to an amd64-only install.

    Thank you all for your help.


    Stefan


    Stefan Monnier [2024-08-14 15:32:31] wrote:

    I have a machine here running a freshly updated and rebooted Debian
    testing where I can't get Firefox (more specifically `firefox-esr`) to
    use audio. E.g. I go to

    https://tekeye.uk/html/html5-video-test-page

    and none of the videos give me any audio output.

    I'm using pipewire and it generally works fine with other applications.
    E.g. `paplay` successfully plays my music files, and `chromium` on the
    same web page gives me audio output just fine.

    When I have `pavucontrol` open, I can "see" that Firefox does not appear
    in the "Playback" tab, contrary to `paplay` and `chromium`.

    When I try `firefox -P` and use a fresh new profile, the same
    problem occurs. Also I can see errors in the output such as:

    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe182f6a100 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for audio/mp4a-latm: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe182875800 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for audio/mp4a-latm: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe181797300 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for audio/mp4a-latm: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe181797300 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for video/avc: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe181797c00 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for audio/mp4a-latm: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe181796a00 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for audio/mp4a-latm: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe181797c00 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for video/avc: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe181796a00 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for video/avc: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe181797f00 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for audio/mp4a-latm: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe181797f00 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - Error no decoder found for video/avc: file ./dom/media/MediaDecoderStateMachineBase.cpp:164
    [Child 13905, BackgroundThreadPool #1] WARNING: 7fe1838484c0 OpenCubeb() failed to init cubeb: file ./dom/media/AudioStream.cpp:281
    [Child 13905, MediaDecoderStateMachine #1] WARNING: Decoder=7fe17c60cd00 [OnMediaSinkAudioError]: file ./dom/media/MediaDecoderStateMachine.cpp:4604

    The last two lines occur when I click on the "unmute" button in the
    video (on the above web page) which is muted by default.

    Any idea what might be going on and/or how to track it down further?


    Stefan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to Stefan Monnier on Thu Aug 15 16:40:02 2024
    On Thu, Aug 15, 2024 at 10:21:01AM -0400, Stefan Monnier wrote:
    I have not found the real source of the problem,

    It's a browser, after all ;-D

    but I have found out why it worked on other machines and not on this one:

    \o/

    some months
    (years?) ago I made this i386 machine use `firefox-esr:amd64` because
    Firefox tabs kept crashing (even for fairly simple pages).

    [ I've been using the i386 version of `firefox-esr` without problem on
    other machines, so I don't know why it crashed on this one, but
    switching to the amd64 version did "solve" the problem back then.
    My crystal ball told me that it was probably due to the relatively
    large about of RAM (24G) available in this machine confusing Firefox
    into the illusion that it can allocate a lot more memory than the i386
    architecture really allows, and thus getting memory allocation
    failure. ]

    Congrats :-)

    Cheers
    --
    t

    -----BEGIN PGP SIGNATURE-----

    iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZr4QzgAKCRAFyCz1etHa RuFSAJ4xI7DkoUfEZjs1rFg8uyuelT09eQCdHocBz0vdUL/vx4gl5zrQXquEB78=
    =V8es
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Monnier@21:1/5 to All on Fri Aug 16 15:30:01 2024
    I do have it installed. I also tried to install `libavcodec-extra` at
    some point (when I saw that `mp4a-latm` 🙂), but it made no difference
    of course.
    You do not have AAC in the list of supported codecs and I am unsure if it is due to alsa backend or due to a missed package (libfdk-aac2, gstreamer1.0-fdkaac?).

    I'm not too worried about that for now. The lack of audio device was the
    more pressing concern 🙂

    Firefox exposes some codec info in about:support#media
    Thanks. When I "disable sandboxing" (by setting the three vars
    I mentioned in my answer to Tomas) it says:
    I would revert these settings to defaults unless you have confirmed that
    they are really necessary.

    Of course.

    Audio Backend: alsa
    I have pulse-rust here.

    Same for me when things work 🙂

    If you still have motivation to debug i386 vs. amd64 issue, have you
    tried to start firefox with a clean profile (--profile /some/dir)?

    Yup, no difference.

    I would check if there are earlier messages related to audio backend, maybe during firefox startup. Perhaps verbosity of some component should be increased

    https://firefox-source-docs.mozilla.org/xpcom/logging.html

    Thanks for the pointer!


    Stefan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)