Closed Bug 1955839 Opened 1 year ago Closed 1 month ago

Disruption in music playback when switching tab to X/Twitter

Categories

(Core :: Audio/Video: cubeb, defect, P2)

Firefox 136
Desktop
Linux
defect

Tracking

()

RESOLVED FIXED
151 Branch
Tracking Status
firefox151 --- fixed

People

(Reporter: degaussrk, Assigned: kinetik)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Attached file firefox.txt

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0

Steps to reproduce:

Firefox 136.0.1 (64-bit) on Ubuntu Linux

1.Play Youtube/Youtube Music, and concurrently open a new X/Twitter story in a different tab
2. I was unable to reproduce this with any other website - Instagram, Hacker News, other youtube videos. Only happens with X.
3. Also not able to reproduce with Firefox Nightly 137.0a1 (2025-02-24) (64-bit)

The system is well provisioned CPU/GPU wise.

Actual results:

The audio playback is disrupted for a fraction of a second

Turned on logging to file through about:logging and tried getting log samples. When the audio gets disrupted, I can see the Stream coming to a stop and indicating that Draining is in progress. I'm attaching the log file this same.

Expected results:

Audio should not be disrupted.

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jmathies)
Severity: -- → S3
Flags: needinfo?(jmathies)
Duplicate of this bug: 2016063

See dupe bug 2016063 for more detail.

Component: Audio/Video: Playback → Audio/Video: cubeb
Flags: needinfo?(kinetik)
Priority: -- → P2
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → Linux
Hardware: Unspecified → Desktop

I'm unable to reproduce this locally. Given the cubeb logs show the audio stream draining, that suggests the audio is being stopped from the content side for some reason. It'd be useful to have a broader set of logs to give us a better view of what's happening in this situation.

@RK and @Kitsu - would you mind collecting some additional logs for us to confirm exactly what's happening, please?

If you follow the instructions in https://paul.cx/public/about-logging-presentation.webm to enable audio logs, that will start the Firefox profiler recording (toolbar icon will glow) and capture the needed logs. Once that's done, reproduce the bug, then stop the profiler recording by clicking the glowing icon. That'll open a new tab with the profiler results - click "Upload Local Profile" then "Upload" and share the link in this bug please.

Flags: needinfo?(degaussrk)
Flags: needinfo?(7smv1d46z)
Flags: needinfo?(kinetik)
Duplicate of this bug: 2021805
Flags: needinfo?(fernandommuniz)

I started playing "The Hampster Dance Song" on YouTube, opened a tweet two times from my own profile by wheel-clicking them.
That resulted in the music being muted for 1 second twice.

https://share.firefox.dev/4uNiFBD

Flags: needinfo?(fernandommuniz)

For me, when I open or refresh Twitter/X tab, the Youtube video's audio keeps running but the videos pauses for a split second.

https://share.firefox.dev/4c0T8h4

Flags: needinfo?(7smv1d46z)

Thanks, that's much appreciated!

@Fernando I can see the problem in this case, it's a Linux-specific bug and it's likely the same as @RK's issue but it would still be good to have a profile from them to check as well. Working on a fix for this now.

@Kitsu I'll reopen your original bug since it's clear this is a different issue, not a dupe of this one. I don't know the root cause yet, but I see from the profile audio continues playing fine but video decode freezes for ~500ms.

Assignee: nobody → kinetik
Status: NEW → ASSIGNED
No longer duplicate of this bug: 2016063
Attached file GitHub Pull Request

So it's a PulseAudio workaround that becomes a issue for PipeWire?

Firefox uses the PulseAudio API on Linux right now; PulseAudio -> PipeWire compatibility is handled by pipewire-pulse. The fix I linked is removing an unnecessary delay in Gecko's PulseAudio backend when stopping audio streams; the delay wasn't a workaround for anything related to PulseAudio or PipeWire, only internal implementation details.

Redirect a needinfo that is pending on an inactive user to the triage owner.
:karlt, since the bug has recent activity, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(degaussrk) → needinfo?(karlt)
Flags: needinfo?(karlt)
Pushed by mgregan@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/54c559dc77b9 https://hg.mozilla.org/integration/autoland/rev/a38c72d2b268 Update cubeb-pulse-rs to c0b3bce1f1d1cc565a2ccacd9c38e945ef8d033c. r=cubeb-reviewers,pehrsons
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 151 Branch
QA Whiteboard: [qa-triage-done-c152/b151]
See Also: → 1999582
Duplicate of this bug: 1999582
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: