Bug 245526 - www/firefox: Firefox 75 makes a buzzing sound after audio finishes with JACK=ON (Jack audio backend)
Summary: www/firefox: Firefox 75 makes a buzzing sound after audio finishes with JACK=...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-gecko (Nobody)
URL: https://bugzilla.mozilla.org/show_bug...
Keywords: needs-patch
Depends on:
Reported: 2020-04-11 04:07 UTC by Yuri Victorovich
Modified: 2020-05-07 17:54 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (gecko)


Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 2020-04-11 04:07:02 UTC
For example, if you would watch some video on YouTube, and then would click on the "Back" button - you would hear a low frequency buzzing sound.

This makes Firefox almost unusable.

FreeBSD 12.1
Comment 1 Jan Beich freebsd_committer 2020-04-11 06:22:00 UTC
What does "Audio Backend" in about:support show? Mozilla only maintains "pulse" and "pulse-rust" on Linux, the rest is by community with varying level of quality. Audio backend is selected based on media.cubeb.backend preference or whichever is installed according to https://searchfox.org/mozilla-central/rev/06985b12a4ab/media/libcubeb/src/cubeb.c#188-226 probe order.

If this issue affects only one backend (e.g., jack) then you need to report upstream. And if it's not specific to Firefox but affects other cubeb consumers (e.g., cubeb tests, dolphin, citra, yuzu) then report to https://github.com/kinetiknz/cubeb/issues
Comment 2 Yuri Victorovich freebsd_committer 2020-04-11 07:33:13 UTC
Audio backend shows "jack". I am not sure what it was in firefox-74.
Comment 3 Yuri Victorovich freebsd_committer 2020-04-11 07:35:40 UTC
JACK=on is because I've rebuilt it myself, and before it was "pulse" as installed by pkg.
Comment 4 Yuri Victorovich freebsd_committer 2020-04-11 07:37:36 UTC
Jack requires that the audio buffer should be set to 0 when not used, otherwise it would keep playing the last fragment from the supplied buffer.

This is a bug in the Jack backend code.
Comment 5 Jan Beich freebsd_committer 2020-04-11 10:54:12 UTC
(In reply to Yuri Victorovich from comment #3)
> JACK=on is because I've rebuilt it myself, and
> before it was "pulse" as installed by pkg.

If that's the only reason you've rebuilt www/firefox then consider switching back to binary packages and set media.cubeb.backend=jack in about:config (as documented in pkg-message). By default Firefox is built to support as many audio backends as possible but except ALSA (fallback) the dependencies are build-only.
Comment 6 Yuri Victorovich freebsd_committer 2020-04-11 17:08:35 UTC
(In reply to Jan Beich from comment #5)

I know, thanks. I tried JACK=on long time ago, and it worked. Now after accidentally rebuilding it from source instead of using the binary package this issue got exposed.
Comment 7 Yuri Victorovich freebsd_committer 2020-04-11 17:08:56 UTC
Add the upstream bug report.