Firefox 89 on Ubuntu locks Pulseaudio sample rate
Categories
(Core :: Audio/Video: Playback, defect)
Tracking
()
People
(Reporter: mrc, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0
Steps to reproduce:
Start Firefox on Ubuntu 18.04. In a terminal, enter "pacmd list-sink-inputs".
Actual results:
Whenever Firefox is running, even if no windows or tabs have audio, it creates a "zombie" pulseaudio stream. This has volume set to zero (negative infinity) and is always there. Any windows or tabs that play audio, create additional streams.
The problem is that this always-on audio stream breaks Pulseaudio behavior. It locks Pulseaudio into the default sample rate, so all audio on the computer gets resampled to the default rate. Even if you configure Pulseaudio to avoid resampling, this Firefox stream always existing whenever Firefox is running (even if it's not playing audio) prevents pulseaudio from doing that.
Expected results:
Firefox should not create any audio streams unless it is actually playing audio. This is how versions prior to 89 worked. This new "zombie" audio stream started appearing in version 89.
Here are details on the zombie audio stream, from "pacmd list-sink-inputs":
index: 5824
driver: <protocol-native.c>
flags: START_CORKED
state: RUNNING
sink: 0 <alsa_output.pci-0000_04_02.0.iec958-stereo>
volume: front-left: 0 / 0% / -inf dB, front-right: 0 / 0% / -inf dB
balance 0.00
muted: no
current latency: 186.85 ms
requested latency: 200.00 ms
sample spec: float32le 2ch 44100Hz
channel map: front-left,front-right
Stereo
resample method: copy
module: 12
client: 7245 <Firefox>
properties:
media.name = "AudioStream"
application.name = "Firefox"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "32"
application.process.id = "20240"
application.process.user = "mclements"
application.process.host = "clements4"
application.process.binary = "firefox"
application.language = "en_US.UTF-8"
window.x11.display = ":0.0"
application.process.machine_id = "03aebf2b5c4443bc8f085d59ffa91157"
application.process.session_id = "c3"
application.icon_name = "firefox"
module-stream-restore.id = "sink-input-by-application-name:Firefox"
Comment 2•5 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: cubeb' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 3•5 years ago
|
||
We haven't changed anything recently on this, and I just verified that this isn't the case on my Ubuntu 20.04 LTS with Firefox 89 (current release) and Firefox Nigthly.
You must have something that tries to use an HTMLMediaElement: the name "AudioStream" in media.name above is the name Firefox gives to streams that are used by HTMLMediaElement: <audio> or <video>. Maybe an extension, or a page that loads automatically or something ?
Running the following might help:
MOZ_LOG=cubeb:4,nsMediaElement:4,AudioStream:4 firefox
after having closed all Firefox instances, and report what it says here, thanks!
Updated•5 years ago
|
Updated•5 years ago
|
I just tested again, and you're right. I closed all windows & tabs, closed Firefox. Then opened it with a single window & tab pointed to "about:blank" and that zombie audio stream disappeared. I opened a few tabs and windows that don't have audio, and the zombie stream did not appear.
I thought I did this before reporting the bug, but apparently it didn't work.
I'll close this bug as "invalid".
Comment 5•5 years ago
|
||
Thanks for double-checking quickly, please don't hesitate to re-open (or open another bug) if you see something strange !
Description
•