Skip to content

Instantly share code, notes, and snippets.

@jastreb
Last active May 1, 2026 19:19
Show Gist options
  • Select an option

  • Save jastreb/a1314a4e835503f8237177f85a3905ae to your computer and use it in GitHub Desktop.

Select an option

Save jastreb/a1314a4e835503f8237177f85a3905ae to your computer and use it in GitHub Desktop.
Fix annoying buzzing speakers on linux

observe output of inxi -A

If your device is using driver: snd_hda_intel and Server-1: PipeWire this will work fo you, otherwise I cant guarantee it.

Your buzzing is coming from AMD Starship/Matisse HD Audio (snd_hda_intel), which is a known power-state / codec init issue on Fedora + PipeWire.

The Fix - WirePlumber codec rule (Fedora 43, PipeWire 1.4+)

What this does?

  • Targets HDA codecs only

  • Disables power-saving / suspend at the codec level

  • Prevents buzzing, popping, and noise floor issues

  • Survives reboots, kernel updates, PipeWire updates

1️⃣ Create WirePlumber rules directory

mkdir -p ~/.config/wireplumber/main.lua.d

2️⃣ Create the codec rule file

nano ~/.config/wireplumber/main.lua.d/51-amd-hda-no-buzz.lua

Paste exactly:

  matches = {
    {
      { "device.name", "matches", "alsa_card.*" },
      { "device.bus", "equals", "pci" },
      { "api.alsa.driver", "equals", "snd_hda_intel" },
      { "device.profile.name", "matches", "analog-output.*" },
    },
  },

  apply_properties = {
    ["api.alsa.disable-power-save"] = true,
    ["api.alsa.disable-suspend"] = true,
  },
}

table.insert(alsa_monitor.rules, rule)

3️⃣ Restart WirePlumber

systemctl --user restart wireplumber

4️⃣ Verify it applied

Run:

wpctl status

You should no longer hear buzzing, especially:

  • after login
  • after idle
  • after screen blank / suspend

🧠 Why this works (hardware-specific)

  • snd_hda_intel aggressively power-gates the codec
  • AMD Starship/Matisse chips are sensitive to this
  • WirePlumber can override ALSA power behavior safely
  • This is better than kernel parameters or PipeWire restarts

Optional (only if buzzing still exists)

You can force a fixed sample rate (some AMD codecs need this):

Add inside apply_properties:

["audio.rate"] = 48000,

Optional (even tighter: speaker port only)

If you still hear buzzing only when idle, add this line inside apply_properties:

["session.suspend-timeout-seconds"] = 0,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment