Audio skipping on Firefox/Youtube

To be completely honest I have no idea what forum to post this in, but didn’t have this issue until I switched from Windows to NixOS, so I guess its going in the Nix forums.

In short, I have had this issue for the past week where audio from Youtube sounds corrupted for a second or two every so often. It sounds like crackles or pops, and occasionally audio skipping or just missing audio for short period of time.

The problem seems to manifest whenever there is a spike on the network traffic graph on the “stats for nerds” ui when playing a video. The issue is not exclusive to these spikes, but often when skipping occurs there is a spike:

My current config (as it relates to audio) is this:

  xdg.portal.enable = true;
  services.pulseaudio.enable = false;
  security.rtkit.enable = true;
  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    pulse.enable = true;
    wireplumber.enable = true;
    #jack.enable = true;
  };

I am running Firefox 139.0.1 on Nixos 25.05.

Not sure if it’s the same underlying issue, but I have similar issues I’ve noticed recently recently with youtube. It also happens with netflix, and firefox based games.

It does not happen with all audio devices, switching to a different one works. And it does not happen with steam games or steam video. So what I’m experiencing seems to be somehow a firefox-specific issue.

Do you see this outside of firefox? Do you see it with other websites inside firefox? Does an alternative audio output work as expected?

Edit: pw-top shows 0 under the ERR column while the problem is occuring, suggesting it’s not an issue that it’s a pipewire-side buffer configuration issue, if I understand correctly.

Edit 2: The issue manifests consistently for me, all the time.

It seems to be a mainly Firefox issue for me. I have been using the speaker-test command with different flags, and I haven’t had the issue manifest. For whatever reason it seems to be more pronounced for me on the youtube website. Ex. the website https://chatreplay.stream/ (which is essentially a wrapper for youtube VODs) has the issue less frequently.

I can also corroberate pw-top having a 0 in the err colomn.

Edit: I have also had it happen on similar sites to you.

I also had major audio and bluetooth problems with my Sony WH-1000XM3’s and Nixos 25.05.

I took me a week to find the solution.

I turned out not enabling alsa and alsa.support32bit worked for me.

I tried commenting out the alsa.enable and alsa.support32bit lines, but it had no effect. Neither did setting both to false. Strange considering I’m running WH-1000XM4’s on the same OS version.

An update:

When running journalctl --follow and starting a Youtube video, the following error is returned:

Jun 18 23:10:08 nix-top .xdg-desktop-po[1330]: Backend call failed: Cannot invoke method; proxy is for the well-known name org.freedesktop.ScreenSaver without an owner, and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag

This occurs every time a Youtube video is unpaused or started. I don’t know if this is related to the core issue, but it seems likely.

Edit: After looking arround, several others have the aforementioned error, but I have yet to find it resolved.

It’s unlikely. That message is about the service preventing your screen from turning off while you’re watching a video not existing, it has nothing to do with audio.

Update: the problem is no longer Firefox specific. I tested music playback on Qutebrowser (chromium based) and results were the same. I have been having another issue where randomly all audio is muted. Not in the traditional sense where you can un-mute it. I can still see levels in pavucontrol, but no sound is auditory. The only way to fix it (that I know of) is to disconnect and reconnect my Bluetooth headphones.