EDIT: the problem magically disappeared as mysteriously as it appeared, and then reappeared. I suspect it was fixed by kernel update on March 9th, from 6.11.0-17 to 6.11.0-19, and then resurfaced by a kernel update on March 30th, from 6.11.0-19 to 6.11.0-21.
I have previously been affected like many others by the issue of crackling audio with occasional pauses, but in the past few days I have a completely new problem: on the laptop speakers, audio works for about 3 seconds and then stops.
I can get it to work for an extra three seconds if I run systemctl restart --user pipewire. When I do so, the first two seconds also have a weird chirping sound overlaid on top of the actual thing being played.
The earphones jack actually plays nothing. Well, almost nothing: I hear this weird faint low-frequency beating, which at first I was afraid was my heart (which shouldn't be beating so fast!) but then realized it stops, then rustles for a bit, then continues, when I run systemctl restart --user pipewire.
Bluetooth audio works just fine.
I recorded two audio clips (warning: these are loud! and don't start immediately) on my mobile device of how the audio sounds like - one is for a pure 440hz tone, the second is when I use the Test Speakers options in the Sounds Settings screen - right after running the above command. The audio stopping is not me cropping the audio clip, it's the computer not playing any more audio after 3 seconds. You can also hear the distortion I am talking about.
I am running Ubuntu 24.04.2 LTS dual-booted with Windows on a rather modern laptop (ASUS Vivobook S 14 S5406MA with Intel Core Ultra 9 185H). All of the options (speakers, headphone jack, Bluetooth audio) run fine on Windows. The audio controller reported on alsainfo is Intel Corporation Meteor Lake-P HD Audio Controller [8086:7e28]. Pipewire is at version 1.0.5.
Some more info:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) []
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 3: HDMI1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 4: HDMI2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 5: HDMI3 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 31: Deepbuffer HDA Analog (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
$ cat /proc/asound/cards
0 [sofhdadsp ]: sof-hda-dsp - sof-hda-dsp
ASUSTeKCOMPUTERINC.-ASUSVivobookS14S5406MA_S5406MA-1.0-S5406MA
$ sudo dmesg | egrep -i '(hda|audio)'
[ 32.484968] snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[ 32.570541] sof-audio-pci-intel-mtl 0000:00:1f.3: enabling device (0000 -> 0002)
[ 32.570714] sof-audio-pci-intel-mtl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[ 32.599347] sof-audio-pci-intel-mtl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 32.605971] sof-audio-pci-intel-mtl 0000:00:1f.3: use msi interrupt mode
[ 32.630200] sof-audio-pci-intel-mtl 0000:00:1f.3: hda codecs found, mask 5
[ 32.630203] sof-audio-pci-intel-mtl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[ 32.630207] sof-audio-pci-intel-mtl 0000:00:1f.3: DMICs detected in NHLT tables: 2
[ 32.636960] sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware paths/files for ipc type 1:
[ 32.636963] sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware file: intel/sof-ipc4/mtl/sof-mtl.ri
[ 32.636964] sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware lib path: intel/sof-ipc4-lib/mtl
[ 32.636965] sof-audio-pci-intel-mtl 0000:00:1f.3: Topology file: intel/sof-ace-tplg/sof-hda-generic-2ch.tplg
[ 32.639528] sof-audio-pci-intel-mtl 0000:00:1f.3: Loaded firmware library: ADSPFW, version: 2.11.1.1
[ 32.765710] sof-audio-pci-intel-mtl 0000:00:1f.3: Booted firmware version: 2.11.1.1
[ 32.792758] sof-audio-pci-intel-mtl 0000:00:1f.3: Topology: ABI 3:29:1 Kernel ABI 3:23:1
[ 32.793002] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: Parent card not yet available, widget card binding deferred
[ 32.813930] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC294: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[ 32.813936] snd_hda_codec_realtek ehdaudio0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 32.813938] snd_hda_codec_realtek ehdaudio0D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[ 32.813939] snd_hda_codec_realtek ehdaudio0D0: mono: mono_out=0x0
[ 32.813940] snd_hda_codec_realtek ehdaudio0D0: inputs:
[ 33.164880] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3
[ 33.181876] input: sof-hda-dsp Headphone as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input13
[ 33.181942] input: sof-hda-dsp HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input14
[ 33.182056] input: sof-hda-dsp HDMI/DP,pcm=4 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input15
[ 33.182226] input: sof-hda-dsp HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input16
Happy to provide any information required in order to solve this issue.