Upgraded Firefox and now no audio

Hi everyone,

I'm running 13.1-RELEASE-p6 with an onboard Realtek ALC255 and OSS as my audio system. Tonight I upgraded to Firefox 112.0 and now there's no sound in Firefox. System audio works; I tested it using VLC. I do have "media.cubeb.backend" set to "oss" in Firefox. I confirmed that PulseAudio didn't get installed during the update process. A quick Web search didn't seem to turn up anything useful. I'm at a loss since FreeBSD's sound system works so well I'm not sure what else to look for to troubleshoot.
 
I can confirm, that hack is not working anymore and I'm on FreeBSD 13.2-RELEASE. Basically if pulseaudio is not installed, audio on Firefox-112.0_1,2 is not working. I've tried with oss, sndio and nothing works.

Offtopic:
Also someone, doesn't say who (those who use Macintosh to develop FreeBSD) F***** the audio mixer, that I have to spent half a day trying nids just to have sound. Can't wait for the mess is yet to come in 14.0 when mixer was "redesigned".
 
I had the same problem on 13.2-RELEASE, package version 112.0,2 ("latest" repository).

No sound from local files or web media streams. I tried the oss audio backend. That got me sound from local media files, but not from web content.

Firefox defaults to sndio when build with PULSEAUDIO and SNDIO enabled. On my system audio/sndio is installed as a dependency to another application. I took a closer look at its packages files list. There I noticed it comes with a rc.d service script.

After enabling the sndiod service (with audio backend set to sndio) the sound is there again, local files and web stream .
 
In my case sndio came as a dependency of chromium. Even though about:support page reports Audio Backend as oss it appears as firefox is still using sndio. Removing chromium and sndio fixed audio in firefox and resinstalling them breaks it again. Excitingly, despite depending on sndio, chromium works without sndiod running. I went a terrible way and replaced in /usr/local/lib/firefox/libxul.so (using hex editor) first 4 occurrences of sndio to sndix. I suppose this broke sndio detection in my firefox and force it to use oss backend.
 
I had the same problem on 13.2-RELEASE, package version 112.0,2 ("latest" repository).

No sound from local files or web media streams. I tried the oss audio backend. That got me sound from local media files, but not from web content.

Firefox defaults to sndio when build with PULSEAUDIO and SNDIO enabled. On my system audio/sndio is installed as a dependency to another application. I took a closer look at its packages files list. There I noticed it comes with a rc.d service script.

After enabling the sndiod service (with audio backend set to sndio) the sound is there again, local files and web stream .

Thank you for your input on this issue. If I can't get things working otherwise, I'll install sndio to see if that might resolve FF's audio issue.
 
After enabling the sndiod service (with audio backend set to sndio) the sound is there again, local files and web stream
How?

I have sndio package installed, I put in about:config

media.cubeb.backend=sndio

But no success. It starts pulseaudio. I kill it, and it restarts it.
 
I do not understand why a daemon is necessary to have audio, be it sndiod or pulseaudio.

Looking at the manuals of sndio:
sndio(7)
Code:
DESCRIPTION
     Programs access audio and MIDI hardware using the sndio library.  It
     allows both access through the sndiod(8) server and raw access to the
     hardware.
     ...
     Usually, programs access the hardware via the sndiod(8) server, because
     raw access to the hardware is exclusive and requires additional
     privileges.

sndiod(8)
Code:
DESCRIPTION
     The sndiod daemon is an intermediate layer between audio or MIDI programs
     and the hardware.
     ...
     sndiod operates as follows: it exposes at least one sub-device that any
     number of audio programs can connect to and use as if it was audio
     hardware.  During playback, sndiod receives audio data concurrently from
     all programs, mixes it and sends the result to the hardware device.
     ...
                                       ... Since audio data flows through the
     sndiod process, it has the opportunity to process audio data on the fly:

           •   Change the sound encoding to overcome incompatibilities between
               software and hardware.
           •   Route the sound from one channel to another, join stereo or
               split mono.
           •   Control the per-application playback volume as well as the
               master volume.
           •   Monitor the sound being played, allowing one program to record
               what other programs play.
 
Only installing audio/sndio isn't enough. The package provides a daemon which must run before Firefox is started.

Delete the media.cubeb.backend preferency in about:config, enable sndiod in /etc/rc.conf and start the service:

service sndiod enable
service sndiod start.
That did the trick, thank you. Sound in FF 112.0 is working perfectly now!
 
I had the same problem on 13.2-RELEASE, package version 112.0,2 ("latest" repository).
From where did you take firefox-112.0.2 when in the main ports the version is www/firefox-112.0_1,2?

Only installing audio/sndio isn't enough. The package provides a daemon which must run before Firefox is started.

Delete the media.cubeb.backend preferency in about:config, enable sndiod in /etc/rc.conf and start the service:

service sndiod enable
service sndiod start.

sndiod is the default audio, yet, don't know why but on my system is not working.

Code:
cat /etc/make.conf
OPTIONS_UNSET+=PULSE
OPTIONS_UNSET+=PULSEAUDIO
OPTIONS_SET+=SNDIO

cat /etc/rc.conf | grep sndiod
sndiod_enable="YES"

service sndiod status
sndiod is running as pid 814.

Also no media.cubeb.backend present in firefox config.
 
From where did you take firefox-112.0.2 when in the main ports the version is www/firefox-112.0_1,2?
You misread the version number of the package I have installed. The version number is 112.0 comma 2 not 112.0 dot 2. The version I have is the version before the one currently in ports.

sndiod is the default audio, yet, don't know why but on my system is not working.
Check about:support#media if the audio backend is really set to "sndio".

What does pkg options firefox | grep SNDIO return?

Running the sndiod daemon works for others as well. See comments after my comment as Newton Terry in PR www/firefox: 112.⋯: no sound with sndio backend
 
Check about:support#media if the audio backend is really set to "sndio".

What does pkg options firefox | grep SNDIO return?

Running the sndiod daemon works for others as well. See comments after my comment as Newton Terry in PR www/firefox: 112.⋯: no sound with sndio backend
Frankly I've given up and switched to esr version after trying reinstall, profiles purged, restarted without addons, cleand pkg's cache, etc. nothing worked.
Now everything works as expected, without that cancer pulseaudio installed which most of the time messed my mixer that sometimes volume jumped from 30% to 65% and so on.

Code:
pkg options firefox-esr | grep SNDIO
firefox-esr - SNDIO: on
 
Thanks for the warning, I locked the package to the currently installed version 111.0.1_2,2 and I'll wait for the problem to be fixed before upgrading it any further. I don't really want to run an additional sound server just for Firefox...
 
I'm wondering whether OSS support has been fatfingered or maybe removed or somehow deliberately changed in upstream FF. The patches in the FreeBSD port seem to be silent on the OSS issue.

I wish the thing wasn't so big that it is almost impossible to see anything in truss.
 
I'm wondering whether OSS support has been fatfingered or maybe removed or somehow deliberately changed in upstream FF. The patches in the FreeBSD port seem to be silent on the OSS issue.

I wish the thing wasn't so big that it is almost impossible to see anything in truss.

Mozilla uses their own cross platform audio backend cubeb with firefox. It still supports OSS (AFAIK OSS support was patched in from FreeBSD folks). Used it just the other day with emulators/pcsx2, which also uses cubeb and sound through OSS works.

Maybe the backend selection inside firefox is broken now...

EDIT: I don't use firefox, I use www/qutebrowser.
 
Now everything works as expected, without that cancer pulseaudio installed which most of the time messed my mixer that sometimes volume jumped from 30% to 65% and so on.

Code:
pkg options firefox-esr | grep SNDIO
firefox-esr - SNDIO: on
Start a video with audio and run:

ps -ax | grep pulse

What do you get?
 
I locked the package to the currently installed version 111.0.1_2,2 and I'll wait for the problem to be fixed before upgrading it any further.
Well, after an extensive package upgrade (quarterly 2023Q1 -> 2023Q2), my locked fox wouldn't run anymore (incompatibility with another piece of software that was upgraded), so I finally upgraded it to version 112.0_1,2 too. But to my good surprise... no issues with audio so far. It works like before with the OSS backend.

It seems that the bug is in fact in the sndio backend: https://github.com/mozilla/cubeb/issues/746

I think it works for me because I don't have sndio installed, while I guess those affected by the bug had sndio installed but not running.
 
Back
Top