Pops and clicks from headphones

When I connect headphones I can hear lot of pops and clicks when I don’t turn on any autio application (I use tidal from AUR and Youtube in Firefox)

I use Acer Spin 5 SP513-55N

When I listen to music or any sound, there is no problem.
When I turn the source of the sound off, then pops and clicks start.
Quite random but very often.

I have no idea what is going on but when I searched for “linux intel pops”, “linux intel heapdhone problem” then It appeared that I’m not alone with this problem.

I tried to follow tutorials like:

To observe the current values:
cat /sys/module/snd_hda_intel/parameters/power_save
1
cat /sys/module/snd_hda_intel/parameters/power_save_controller
Y
echo ‘N’ > /sys/module/snd_hda_intel/parameters/power_save_controller
echo ‘0’ > /sys/module/snd_hda_intel/parameters/power_save

I tried to unload module with:
rmmod snd_hda_intel
and load with
modprobe snd_hda_intel power_save=0

I tried with wireplumber settings like:


apply_properties = {
      --["node.nick"]              = "My Node",
      --["priority.driver"]        = 100,
      --["priority.session"]       = 100,
      ["node.pause-on-idle"]     = false,
      --["resample.quality"]       = 4,
      --["channelmix.normalize"]   = false,
      --["channelmix.mix-lfe"]     = false,
      --["audio.channels"]         = 2,
      --["audio.format"]           = "S16LE",
      --["audio.rate"]             = 44100,
      --["audio.allowed-rates"]    = "32000,96000"
      --["audio.position"]         = "FL,FR",
      --["api.alsa.period-size"]   = 1024,
      --["api.alsa.headroom"]      = 0,
      --["api.alsa.disable-mmap"]  = false,
      --["api.alsa.disable-batch"] = false,
      ["session.suspend-timeout-seconds"] = 0,  -- 0 disables suspend

Nothing helped.

Today I found something interesting.
I use dual boot. Second system is Windows 10.
When I boot into the Windows and do a restart into Linux (not shut down and boot Linux, but restart) than in Linux there are no problems with pops and clicks.

Device-1: Intel Tiger Lake-LP Smart Sound Audio
    driver: sof-audio-pci-intel-tgl

Multimedia audio controller: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20)
	Subsystem: Acer Incorporated [ALI] Device 150a
	Flags: bus master, fast devsel, latency 32, IRQ 205, IOMMU group 14
	Memory at 601f2b8000 (64-bit, non-prefetchable) [size=16K]
	Memory at 601f000000 (64-bit, non-prefetchable) [size=1M]
	Capabilities: [50] Power Management version 3
	Capabilities: [80] Vendor Specific Information: Len=14 <?>
	Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Kernel driver in use: sof-audio-pci-intel-tgl
	Kernel modules: snd_hda_intel, snd_sof_pci_intel_tgl