Excessive log flooding from ASoC trigger (failure on Meteor Lake): "ASoC: error at soc_dai_trigger ... -22"
Summary: My system log is getting flooded with about 1,000 lines / second from the SOF/ASoC driver on a Meteor Lake laptop. The excessive logging causes high disk I/O and log file growth at >100KB/sec eventually eating up all disk space, impacting system stability.
Coincidentally this seems to be coming at times where the audio is not functional. This issue report however is focusing specifically at the log flooding aspect of this, rather than the underlying problem.
Example log lines
kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ASoC: error at soc_dai_trigger on Analog CPU DAI: -22
kernel: HDA Analog: ASoC: error at dpcm_be_dai_trigger on HDA Analog: -22
kernel: HDA Analog: ASoC: trigger FE cmd: 1 failed: -22
... (repeating endlessly) ...
System details:
$ uname -a
Linux my-laptop 6.11.0-29-generic #29~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jun 26 14:16:59 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.2 LTS
Release: 24.04
Codename: noble
$ apt policy firmware-sof-signed
firmware-sof-signed:
Installed: 2023.12.1-1ubuntu1.5
Candidate: 2023.12.1-1ubuntu1.6
Version table:
2023.12.1-1ubuntu1.6 500
500 http://il.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages
*** 2023.12.1-1ubuntu1.5 100
100 /var/lib/dpkg/status
2023.12.1-1ubuntu1 500
500 http://il.archive.ubuntu.com/ubuntu noble/main amd64 Packages
What I expected: Error messages should somehow be throttled, either through rate-limiting or with exponential back-off when encountering errors. The driver should not flood the log with duplicate errors.
See also
- https://lkml.iu.edu/hypermail/linux/kernel/2104.3/06095.html
@kwikwag Do you have longer log file that would have some context preceding the error? The error message is coming from ALSA ASoC core, so it's not emitted from SOF driver code but rather in layers above it. The kernel shouldn't retry operations on this on its own, so it must be some user-space process that is continuously trying to do something that fails.
Also output of alsa-info.sh would be useful to provide context.
@kwikwag, these messages are coming from ASoC core, they are tricky to be silenced as they are printed to indicate why the stream failed to start. I can only guess, but I believe your system have dGPU and the i915 HDMI codec is not connected. Pulseaudio/Pipewire is trying to probe the SOF HDMI PCMs and this fails.
Can you confirm this?
This has been an issue for a long time, affecting limited number of users, the solution that we have is going to be available in 6.17: https://lore.kernel.org/linux-sound/[email protected]/ The HDMI PCMs will be hidden from user space if the iDisp HDA codec is not present.