Open Bug 1624110 Opened 2 years ago Updated 6 months ago

No sound in firefox 74.0 with ALSA on a certain website


(Core :: Audio/Video: cubeb, defect, P5)

74 Branch





(Reporter: monsterovich, Unassigned)



User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0

Steps to reproduce:

  1. Build firefox 74.0 with --enable-alsa option.
  2. Open
  3. Play any track.

Actual results:

While a track is playing, there is no sound at all.

Expected results:

The sound should've played.

P.S. If you set dom.webaudio.enabled to false, the sound will work again.

I discovered this solution here:

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core
Component: Audio/Video: Playback → Web Audio

Nikolay, can you get us logs:

MOZ_LOG=cubeb:5,MediaTrackGraph:4 ./firefox


Flags: needinfo?(monsterovich)

dom.webaudio.enabled is true

Flags: needinfo?(monsterovich)

dom.webaudio.enabled is false: sound is working

In both logs I play two random tracks. Warnings are present in both cases.

Something is off when Firefox tries to open an ALSA backend, but there are no logs there. The error is probably in alsa_stream_init_single if you want to debug (in media/libcubeb/src/cubeb_alsa.c). I'm thinking maybe the latency requested is too small ?

Component: Web Audio → Audio/Video: cubeb
Priority: -- → P5

I am seeing the same behavior with sites like where the sound effects will only play sometimes, like if I open youtube, play something with sound, and then go back to Its really bizarre.

I can reproduce the issue using a short JavaScript snippet. This snippet works fine with plain ALSA:

var elem = new Audio('some_file.mp3');;

This snippet doesn't work with plain ALSA. It'll produce the mute button in the tab header indicating that Firefox thinks it's playing sound but no sound comes out. It works fine when I build Firefox with pulseaudio support (even with pulseaudio shim like apulse):

var ctx = new window.AudioContext();
var elem = new Audio('some_file.mp3');
var track = ctx.createMediaElementSource(elem);
Duplicate of this bug: 1644784

Hi, I would like to know if this is considered a bug to be fixed, or if Firefox is only going to support pulseaudio and there is no intention to fix this to support ALSA.

Please see for details on the different audio backends and their level of support. To summarize, patches for ALSA are always appreciated and the ALSA code is supported by community contributions.

You need to log in before you can comment on or make changes to this bug.