Solved Firefox no sound

jbo@

Developer
A couple of weeks ago there was a swat of people complaining about www/firefox no longer producing any sounds. My workstation at the office was affected by this too but patience did not seem to help in this case.

The system in question is running FreeBSD 13.2-STABLE with www/firefox 113.0.2_1,2.
Firefox was built with these options (and they didn't change since sound is no longer working):
Code:
Options        :
    ALSA           : off
    CANBERRA       : off
    DBUS           : on
    DEBUG          : off
    FFMPEG         : on
    JACK           : off
    LIBPROXY       : off
    LTO            : off
    OPTIMIZED_CFLAGS: on
    PROFILE        : on
    PULSEAUDIO     : off
    SNDIO          : on
    TEST           : off

The system is running sndiod:
Code:
➜  ~ service sndiod status
sndiod is running as pid 1312.

Other applications are having no problems playing any form of audio/sound. The correct SND device is selected, volume is up. A simple cat /dev/random > /dev/dsp succeeds and playing a video or audio file via multimedia/mpv works fine.

In Firefox's about:config there is no media.cubeb.backend record. But I did previously have set this to either oss and sndio.
Furthermore, my very-similar FreeBSD workstation at home has no problems playing audio via Firefox (same 13.2-STABLE version, "same" hardware, same www/firefox version with also no media.cubeb.backend config.

I'm a bit lost on this one. My last step was to unplug the external USB sound card and using a 3.5mm jack to directly connect from the mainboards on-board audio. Again, everything works, all other applications produce sound output - just not Firefox.

Any ideas?
 
  • Like
Reactions: mro
Does it works if you open pavucontrol ? I experimented removing the media.cubeb.backend not so long ago, and I notice that sound will not work if pavucontrol is not running (a little bit after I close it, no sound goes to my headphone).
Also maybe using www/firefox-esr could fix your issue, also see PR 270436.
 
Without pulse-audio and with sndiod it works. Compile everything with options sndio,sndiod.
Try to play a sound with vlc or smplayer.
 
Does it works if you open pavucontrol ?
My system doesn't run anything pulseaudio.

Yes. If you have installed multimedia/ffmpeg version 6 try
pkg install ffmpeg4
multimedia/ffmpeg4 was already installed on this system.

Without pulse-audio and with sndiod it works. Compile everything with options sndio,sndiod.
Try to play a sound with vlc or smplayer.
I'll assume that you didn't read the opening post properly. Remember: With forum posts quality usually goes over quantity.
But I do appreciate your efforts.

So I walked back up to the machine, added media.cubeb.backend = oss back in and suddenly Firefox is fine playing audio again.
I do not know what changed. This is what I had in there before a lot of people reported having this exact problem. Not sure why the exact same setup does work differently on my workstation at home.
 
My system doesn't run anything pulseaudio.


multimedia/ffmpeg4 was already installed on this system.


I'll assume that you didn't read the opening post properly. Remember: With forum posts quality usually goes over quantity.
But I do appreciate your efforts.

So I walked back up to the machine, added media.cubeb.backend = oss back in and suddenly Firefox is fine playing audio again.
I do not know what changed. This is what I had in there before a lot of people reported having this exact problem. Not sure why the exact same setup does work differently on my workstation at home.

media.cubeb.backend = oss

It works for me also. Thank you very much!
 
  • Thanks
Reactions: mro
If you build firefox yourself you can add:

www_firefox_UNSET=ALSA
www_firefox_UNSET=PULSEAUDIO
www_firefox_UNSET=SNDIO

to your make.conf. Then you will have just one backend.
 
Back
Top