Firefox audio stops working, only silence is played
On latest master (7b40ca4f) + wireplumber next branch (7ee69a9a479f8ec8), I'm seeing audio drop out randomly when playing to Bluetooth devices.
To reproduce:
- Connect Bluetooth device, set as default sink
- Play a long Youtube video in Firefox on Fedora 38
- Do some actions: wait, pause/resume video playback, seek video around, or let it play longer
- Don't have pavucontrol running, but have filter-chain virtual sinks running (not sure if relevant).
- It occurs randomly, and not very often, but at some point audio drops out. This can happen in the middle of playback with no user action taken.
Inspection of sent audio packets with sudo btmon -A
indicates that audio continues to be sent to the device, but it is silence.
In helvum, first removing the link Firefox:output_FL -> device:playback_FL and then creating it again restores sound in left channel. Right channel remains silent. Doing the same for output_FR->playback_FR restores sound also in right channel.
In the broken state, other applications can start playing audio normally, only Firefox produces no audio.
It can also happen that Firefox audio drops only for one of the channels, whereas the other continues playing normally.
It looks like the audio somehow becomes silence before it makes it to bluetooth media-sink (the sink won't generate silence itself for A2DP and won't send data to device if there's nothing to send, so the audio buffers it gets probably contain silence). As you can restore left/right channels separately and the links appear active, it's probably not in the Pulseaudio layer.
I'd need to take a better look with debug logs to know more... On the default PW log levels in journalctl, no errors/warnings from pipewire/pipewire-pulse/wireplumber appear. I saw this occur on two different computers and BT devices on PW master.