Screeching static sound when opening applications and playing audio

A screeching static sound is playing through my TV when I open an application for about 2 seconds. I also hear it when I start to play any kind of audio such as spotify, youtube, clementine etc. My computer is connected to a TV through HDMI cable.

Update 9/12/22: I upgraded the new stable manjaro release which updated Pipewire to 0.3.57 but this didn’t fix the issue.

System:
  Kernel: 5.19.1-3-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.1.1
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.19-x86_64
    root=UUID=b916fe20-71bb-4c35-b117-9148dc097e93 rw quiet apparmor=1
    security=apparmor resume=UUID=939a4204-b488-49c3-952a-2345f8e444de
    udev.log_priority=3
  Desktop: KDE Plasma v: 5.24.6 tk: Qt v: 5.15.5 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop System: Micro-Star product: MS-7C02 v: 1.0
    serial: <superuser required>
  Mobo: Micro-Star model: B450 TOMAHAWK (MS-7C02) v: 1.0
    serial: <superuser required> UEFI: American Megatrends v: 1.E0
    date: 06/09/2020
Battery:
  Device-1: hidpp_battery_0 model: Logitech M310 serial: <filter> charge: 55%
    (should be ignored) rechargeable: yes status: discharging
CPU:
  Info: model: AMD Ryzen 5 3600 bits: 64 type: MT MCP arch: Zen 2 gen: 3
    level: v3 built: 2020-22 process: TSMC n7 (7nm) family: 0x17 (23)
    model-id: 0x71 (113) stepping: 0 microcode: 0x8701021
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB
    L3: 32 MiB desc: 2x16 MiB
  Speed (MHz): avg: 2459 high: 3600 min/max: 2200/4208 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 2200 2: 2514
    3: 2200 4: 2200 5: 3594 6: 2200 7: 3600 8: 2200 9: 2200 10: 2200 11: 2200
    12: 2200 bogomips: 86424
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed mitigation: untrained return thunk; SMT enabled with STIBP
    protection
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, STIBP:
    always-on, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
    vendor: Gigabyte driver: amdgpu v: kernel arch: GCN-4 code: Arctic Islands
    process: GF 14nm built: 2016-20 pcie: gen: 3 speed: 8 GT/s lanes: 16
    ports: active: HDMI-A-1 empty: DP-1,DP-2,DP-3 bus-ID: 26:00.0
    chip-ID: 1002:67df class-ID: 0300
  Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.3
    compositor: kwin_x11 driver: X: loaded: amdgpu unloaded: modesetting
    alternate: fbdev,vesa gpu: amdgpu display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: HDMI-A-1 mapped: HDMI-A-0 model: Samsung built: 2012
    res: 1920x1080 hz: 60 dpi: 43 gamma: 1.2 size: 1124x627mm (44.25x24.69")
    diag: 470mm (18.5") ratio: 16:9 modes: max: 1920x1080 min: 720x400
  OpenGL: renderer: AMD Radeon RX 570 Series (polaris10 LLVM 14.0.6 DRM 3.47
    5.19.1-3-MANJARO) v: 4.6 Mesa 22.1.6 direct render: Yes
Audio:
  Device-1: AMD Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]
    vendor: Gigabyte driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s
    lanes: 16 bus-ID: 26:00.1 chip-ID: 1002:aaf0 class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 28:00.4 chip-ID: 1022:1487 class-ID: 0403
  Sound Server-1: ALSA v: k5.19.1-3-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.21 running: no
  Sound Server-3: PulseAudio v: 16.1 running: yes
  Sound Server-4: PipeWire v: 0.3.56 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Micro-Star MSI driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: f000 bus-ID: 22:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp34s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: wgivpn state: unknown speed: N/A duplex: N/A mac: N/A
Drives:
  Local Storage: total: 931.51 GiB used: 269.5 GiB (28.9%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Sabrent model: Rocket Q
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: RKT30Q.1 temp: 27.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 914.08 GiB size: 898.66 GiB (98.31%) used: 269.5 GiB
    (30.0%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) used: 288 KiB
    (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 17.13 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
Sensors:
  System Temperatures: cpu: 60.5 C mobo: N/A gpu: amdgpu temp: 45.0 C
  Fan Speeds (RPM): N/A gpu: amdgpu fan: 836
Info:
  Processes: 321 Uptime: 2h 14m wakeups: 6 Memory: 15.57 GiB used: 3.39 GiB
  (21.8%) Init: systemd v: 251 default: graphical tool: systemctl Compilers:
  gcc: 12.1.1 clang: 14.0.6 Packages: 1481 pm: pacman pkgs: 1464 libs: 402
  tools: pamac,yay pm: flatpak pkgs: 17 Shell: Bash v: 5.1.16
  running-in: konsole inxi: 3.3.21

I always start with that

And then you can try this popping/crackling sound (hdmi audio) (#2451) · Issues · PipeWire / pipewire · GitLab

Is there something you recommend doing with PulseAudio or PipeWire?

Of did you just mean to try the fixes on the Gitlab link?

I’m using pipewire now, but some people prefer pulseaudio. The gitlab fix works for pipewire.

Based on my configuration, how would I change to manjaro-pulse or manjaro-pipewire?

Do I uninstall pulseaudio and pipewire and then install one of them?

Ok, I found another thread with similar issues and ran this command:

sudo pacman -Ru --nodeps pulseaudio  pulseaudio-jack pulseaudio-lirc pulseaudio-rtp pulseaudio-zeroconf pulseaudio-bluetooth  pulseaudio-alsa pulseaudio-ctl manjaro-pulse

Then I installed manjaro-pipewire and rebooted and the screeching is gone!

I checked inxi -Faxy again and it shows this for sound:

Sound Server-1: ALSA v: k5.19.1-3-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.21 running: no
  Sound Server-3: PulseAudio v: 16.1 running: no
  Sound Server-4: PipeWire v: 0.3.56 running: yes

Did I do everything right? Is there something else I should uninstall or disable?

There were some pipewire packages already installed before I installed manjaro-pipewire so I want to be sure I did it right.

Is all you needed to do because that is a metapakage and does all for you …

Well, that was the issue to be fixed, right?

The screeching is back but it is much better. It only lasts a split second compared to 2-3 seconds previously.

I tried the fix on gitlab but it didn’t work.

The fix was adding this:

context.properties = {
    default.clock.allowed-rates  = [ 48000 ]
}

to /etc/pipewire/pipewire.conf.d/sample-rates.conf

Any other ideas?

may you check the following if the problem persist after

echo 0 | sudo tee /sys/module/snd_hda_intel/parameters/power_save 

echo N | sudo tee /sys/module/snd_hda_intel/parameters/power_save_controller 

if it disappeared you can make the changes permanent with

echo "options snd-hda-intel power_save=0 power_save_controller=N" | sudo tee /etc/modprobe.d/hda.conf 

Unfortunately these two commands didn’t work. Thanks for trying.