Audio crackling issue on pipewire

so i am using my lenovo laptop with garuda linux and i am facing this werid issue where my audio just starts crackling after some sound and sometimes it fixes automatically sometime i need to restart pipewire services please help me fix this problem

System:
  Kernel: 6.4.7-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.1.1
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=722c5358-2390-4040-bd30-796be0b675ef rw rootflags=subvol=@
    quiet quiet rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3
    ibt=off
  Desktop: KDE Plasma v: 5.27.6 tk: Qt v: 5.15.10 wm: kwin_wayland vt: 1
    dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 82K1 v: IdeaPad Gaming 3 15IHU6
    serial: <superuser required> Chassis: type: 10 v: IdeaPad Gaming 3 15IHU6
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0T76465 WIN
    serial: <superuser required> UEFI: LENOVO v: H4CN22WW(V1.07)
    date: 11/18/2021
Battery:
  ID-1: BAT1 charge: 24.5 Wh (55.8%) condition: 43.9/45.0 Wh (97.6%)
    volts: 11.8 min: 11.5 model: Sunwoda L20D3PC2 type: Li-ion serial: <filter>
    status: not charging
CPU:
  Info: model: 11th Gen Intel Core i5-11300H bits: 64 type: MT MCP
    arch: Tiger Lake gen: core 11 level: v4 note: check built: 2020
    process: Intel 10nm family: 6 model-id: 0x8C (140) stepping: 1
    microcode: 0xAA
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 320 KiB desc: d-4x48 KiB; i-4x32 KiB L2: 5 MiB desc: 4x1.2 MiB L3: 8 MiB
    desc: 1x8 MiB
  Speed (MHz): avg: 2155 high: 4000 min/max: 400/4400 scaling:
    driver: intel_pstate governor: powersave cores: 1: 4000 2: 732 3: 2942
    4: 1300 5: 4000 6: 1038 7: 1242 8: 1989 bogomips: 49766
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities: <filter>
Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] vendor: Lenovo
    driver: i915 v: kernel arch: Gen-12.1 process: Intel 10nm built: 2020-21
    ports: active: eDP-1 empty: DP-1, DP-2, DP-3, HDMI-A-1 bus-ID: 00:02.0
    chip-ID: 8086:9a49 class-ID: 0300
  Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] vendor: Lenovo
    driver: nvidia v: 535.86.05 alternate: nouveau,nvidia_drm non-free: 535.xx+
    status: current (as of 2023-07) arch: Turing code: TUxxx
    process: TSMC 12nm FF built: 2018-22 pcie: gen: 1 speed: 2.5 GT/s lanes: 4
    link-max: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 02:00.0
    chip-ID: 10de:1f9d class-ID: 0302
  Device-3: Bison Integrated Camera driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-6:3 chip-ID: 5986:212b
    class-ID: 0e02
  Display: wayland server: X.org v: 1.21.1.8 with: Xwayland v: 23.1.2
    compositor: kwin_wayland driver: X: loaded: modesetting,nvidia
    unloaded: nouveau alternate: fbdev,intel,nv,vesa dri: iris
    gpu: i915,nvidia display-ID: 0
  Monitor-1: eDP-1 res: 1920x1080 size: N/A modes: N/A
  API: OpenGL v: 4.6 Mesa 23.1.4 renderer: Mesa Intel Xe Graphics (TGL GT2)
    direct-render: Yes
Audio:
  Device-1: Intel Tiger Lake-LP Smart Sound Audio vendor: Lenovo
    driver: sof-audio-pci-intel-tgl
    alternate: snd_hda_intel,snd_sof_pci_intel_tgl bus-ID: 00:1f.3
    chip-ID: 8086:a0c8 class-ID: 0401
  API: ALSA v: k6.4.7-zen1-1-zen status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: PipeWire v: 0.3.76 status: active with: 1: pipewire-pulse
    status: active 2: pipewire-media-session status: active 3: pipewire-alsa
    type: plugin 4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli
Network:
  Device-1: Intel Wi-Fi 6 AX201 driver: iwlwifi v: kernel bus-ID: 00:14.3
    chip-ID: 8086:a0f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    port: 3000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp3s0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-10:5 chip-ID: 8087:0026
    class-ID: e001
  Report: bt-adapter ID: hci0 rfk-id: 2 state: down
    bt-service: enabled,running rfk-block: hardware: no software: yes
    address: <filter>
Drives:
  Local Storage: total: 476.94 GiB used: 232.39 GiB (48.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Toshiba
    model: KBG40ZNT512G MEMORY size: 476.94 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: 0109AELA temp: 61.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 38.97 GiB size: 38.97 GiB (100.00%)
    used: 23.93 GiB (61.4%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
  ID-2: /boot/efi raw-size: 667 MiB size: 665.7 MiB (99.80%)
    used: 580 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p4 maj-min: 259:4
  ID-3: /home raw-size: 58.59 GiB size: 58.59 GiB (100.00%)
    used: 51.76 GiB (88.3%) fs: btrfs dev: /dev/nvme0n1p10 maj-min: 259:10
  ID-4: /var/log raw-size: 38.97 GiB size: 38.97 GiB (100.00%)
    used: 23.93 GiB (61.4%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
  ID-5: /var/tmp raw-size: 38.97 GiB size: 38.97 GiB (100.00%)
    used: 23.93 GiB (61.4%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 7.55 GiB used: 2.58 GiB (34.2%)
    priority: 100 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 53.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 321 Uptime: 2h 48m wakeups: 1 Memory: total: 8 GiB note: est.
  available: 7.55 GiB used: 5.31 GiB (70.4%) Init: systemd v: 253
  default: graphical tool: systemctl Compilers: gcc: 13.1.1 Packages: 1441
  pm: pacman pkgs: 1427 libs: 413 tools: octopi,paru,yay pm: flatpak pkgs: 14
  Shell: Bash v: 5.1.16 running-in: konsole inxi: 3.3.28
Garuda (2.6.16-1):
  System install date:     2023-06-29
  Last full system update: 2023-07-29
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager mkinitcpio nvidia-dkms
  Windows dual boot:       Probably (Run as root to verify)
  Failed units:      

It seems you are using deprecated session manager for pipewire. Please follow along the below post to reinstall pipewire with the latest session manager wireplumber. Please note following the below steps would ask you to remove pipewire-media-session confirm it’s removal since we will be using wireplumber in it’s place following this reinstall.

3 Likes

not fixed still happening

Do you have audio processor like jamesdsp or easyeffects installed? Also can you provide the output of

systemctl status --user wireplumber
systemctl status --user pipewire
systemctl status --user pipewire-pulse
cat /etc/security/limits.d/99-realtime-privileges.conf
groups $USER

If you get "stuck" after running these commands as in you can't type any more commands just press q and you will have your prompt to type commands back.

● wireplumber.service - Multimedia Service Session Manager
     Loaded: loaded (/usr/lib/systemd/user/wireplumber.service; enabled; preset: enabled)
     Active: active (running) since Mon 2023-07-31 08:39:00 IST; 8min ago
   Main PID: 10100 (wireplumber)
      Tasks: 6 (limit: 9195)
     Memory: 10.0M
        CPU: 251ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/wireplumber.service
             └─10100 /usr/bin/wireplumber

Jul 31 08:39:00 devilmaycryy-82k1 systemd[10088]: Started Multimedia Service Session Manager.
Jul 31 08:39:00 devilmaycryy-82k1 wireplumber[10100]: [0:02:01.692743307] [10100] ERROR IPAModule ipa_module.cpp:172 Symbol ipaModuleInfo not found
Jul 31 08:39:00 devilmaycryy-82k1 wireplumber[10100]: [0:02:01.692756737] [10100] ERROR IPAModule ipa_module.cpp:292 v4l2-compat.so: IPA module has no valid info
Jul 31 08:39:00 devilmaycryy-82k1 wireplumber[10100]: [0:02:01.692776184] [10100]  INFO Camera camera_manager.cpp:284 libcamera v0.1.0
Jul 31 08:39:01 devilmaycryy-82k1 wireplumber[10100]: <WpPortalPermissionStorePlugin:0x559e0386b180> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera
Jul 31 08:39:01 devilmaycryy-82k1 wireplumber[10100]: <WpPortalPermissionStorePlugin:0x559e0386b180> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera
Jul 31 08:39:02 devilmaycryy-82k1 wireplumber[10100]: Failed to get percentage from UPower: org.freedesktop.DBus.Error.NameHasNoOwner
● pipewire.service - PipeWire Multimedia Service
     Loaded: loaded (/usr/lib/systemd/user/pipewire.service; enabled; preset: enabled)
     Active: active (running) since Mon 2023-07-31 08:39:00 IST; 11min ago
TriggeredBy: ● pipewire.socket
   Main PID: 10098 (pipewire)
      Tasks: 3 (limit: 9195)
     Memory: 17.6M
        CPU: 1.944s
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire.service
             └─10098 /usr/bin/pipewire

Jul 31 08:39:00 devilmaycryy-82k1 systemd[10088]: Started PipeWire Multimedia Service.
Jul 31 08:39:01 devilmaycryy-82k1 pipewire[10098]: [0:02:01.828193929] [10098] ERROR IPAModule ipa_module.cpp:172 Symbol ipaModuleInfo not found
Jul 31 08:39:01 devilmaycryy-82k1 pipewire[10098]: [0:02:01.828206360] [10098] ERROR IPAModule ipa_module.cpp:292 v4l2-compat.so: IPA module has no valid info
Jul 31 08:39:01 devilmaycryy-82k1 pipewire[10098]: [0:02:01.828222964] [10098]  INFO Camera camera_manager.cpp:284 libcamera v0.1.0
● pipewire-pulse.service - PipeWire PulseAudio
     Loaded: loaded (/usr/lib/systemd/user/pipewire-pulse.service; disabled; preset: enabled)
     Active: active (running) since Mon 2023-07-31 08:39:07 IST; 9min ago
TriggeredBy: ● pipewire-pulse.socket
   Main PID: 12629 (pipewire-pulse)
      Tasks: 2 (limit: 9195)
     Memory: 3.9M
        CPU: 82ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire-pulse.service
             └─12629 /usr/bin/pipewire-pulse

Jul 31 08:39:07 devilmaycryy-82k1 systemd[10088]: Started PipeWire PulseAudio.
@realtime - rtprio 98
@realtime - memlock unlimited
@realtime - nice -11
wheel input lp video realtime devilmaycryy

Hmm, the above info looks fine…

What about this? @Piyushraj

2 Likes

i have easy effects but its happening before installing it

Still. Try disabling it. We have just changed your pipewire session manager so maybe things have changed this time around. We should make sure of it.

kill -SIGKILL $(pgrep easyeffects)
systemctl restart --user pipewire-pulse.socket pipewire.socket wireplumber.service

Perhaps this is the work of a faulty configuration in easyeffects + the deprecated session manager. With the above commands it should be easy to figure this out.

2 Likes

okk i will do this and then see whats happening

not fixed still happening

i reckon, this happends on my machine too.. but only on bluetooth headset (airpods pro).. the audio is fine until i play a game.. it happens randomly like 10mins later or few secods later after alt-tabbing between apps.. the audio cracking.. i can quickly fix it by switching to hsp/hfp then back to a2dp again.

1 Like

In my case crackling sound was caused by audio-card goes to sleep for power save reason at startup and so it crack when return active so probably most crackling issue will be solved with this comand on terminal:
echo options snd-hda-intel power_save=0 power_save_controller=N | sudo tee /etc/modprobe.d/hda.conf
terminal will respond : options snd-hda-intel power_save=0 power_save_controller=N
now restart your system and see if issue is solved

yess u are right i happens mostly when i play games in bottles and alt tabbing fixes this problem

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.