PipeWire: Difference between revisions

Dvaerum (talk | contribs)
m Comment Reasontly, this config broke my wireplumber, so that the listed option was no longer available as audio codecs
Zonni (talk | contribs)
Eliminating audio startup delays after suspend or boot on NVIDIA graphics in Home Theather systems
Line 314: Line 314:
</ol>
</ol>


=== Eliminating audio startup delay after suspend or boot ===
In addition to audio popping, some HTPC systems may experience a delay when audio playback starts after resuming from suspend or system boot. This occurs even if suspension is disabled as described above.


<ol>
<li>'''Identify your sink''' using the method in the previous section.</li>
<li>'''Enhance configuration''':
<syntaxhighlight lang="nix">
# Disable node suspend on NVIDIA graphics
services.pipewire.wireplumber.extraConfig."99-disable-suspend"."monitor.alsa.rules" = [
  {
    matches = [ { "node.name" = "alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1"; } ];
    actions.update-props = {
      "session.suspend-timeout-seconds" = 0;
      "node.always-process" = true;
      "dither.method" = "wannamaker3";
      "dither.noise" = 1;
    };
  }
];
</syntaxhighlight>
This configuration prevents audio popping and keeps the audio pipeline active, effectively reducing startup delay from ~5s to ~1s. Adding the dither settings further eliminates the remaining delay.
</li>




Line 321: Line 344:
==See also==
==See also==
* https://github.com/NixOS/nixpkgs/issues/102547
* https://github.com/NixOS/nixpkgs/issues/102547
* https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3858


[[Category:Audio]]
[[Category:Audio]]