Strange Audio Issues After Updating

On NixOS unstable with flakes and home-manager, and I use hyprland for my DE. I also use Wireplumber for audio.

I recently updated my nixpkgs and I’m having very strange audio issues. The vast majority of programs’ audio are crackling, stuttering, and even bitcrushing. This ranges sporadically from once every few seconds, to constantly.

But interestingly, audio from videos specifically do not have this issue. For example, watching a Youtube video, there is zero issue with the sound. Also, watching a video within VLC has no audio issues, but playing an audio file does. Videos are the only thing I have found so far that do not have audio issues currently.

I didn’t make any changes to my audio configuration before updating, and this was not a problem before then. I have tried with multiple audio sources, and they all have the same problem. Also, I switched to KDE Plasma to see if that would solve the issue, but it was still present in that environment.

I’m having a very similar issue after updating to 24.11, except that it’s all audio, including youtube in chrome and videos in vlc.

I booted back into 24.05 and verified the issue doesn’t happen.

While troubleshooting, I determined that the issue seems to go away if I disconnect my docking station (a Dell WD19TB). I reconnected it and verified the issue returns. I then simply moved the video window from my external monitor to the built in monitor and the stuttering went away! I move it back to the external monitor and it returns.

Post your config for more info.
Also, did you consult nixpkgs/nixos/doc/manual/release-notes/rl-2411.section.md at 3eeff54780a1a8c73c82ca51987962b62bd4219e · K900/nixpkgs · GitHub already ?

If you can, please do a first-parent bisect between the 24.05 branch-off and the current 24.11 to figure out when roughly when this regression was introduced.

https://wiki.nixos.org/wiki/Bisecting

I experience the similar behavior.

After updating nixpkgs to 24.11 I noticed that all audio is stuttering/cracking (sometimes it’s every few seconds, sometimes more like every minute, haven’t noticed any pattern). The issue is present for both headphones directly connected via jack port on motherboard and speakers connected through an USB audio card.

The issue is not present when I boot to 24.05.

My configuration is available on GitHub:

  • main branch: configuration used before upgrading from 24.05 to 24.11
  • feat/upgrade-24.11 branch: configuration with nixpkgs upgraded to 24.11 (and some minor tweaks not related with audio)

I was testing it for my PC machine. I haven’t applied the config for my laptop yet, I can try to check if the issue is present there as well.

@Atemu Could you please provide more info how to do the bisecting thing? Should I keep replacing the nixpkgs channel with a specific commit hash (until I find a specific one that breaks the audio)?

The linked wiki article explains it.

To test each commit, you’d nixos-rebuild test -I nixpkgs=/path/to/your/nixpkgs/checkout/.