Audio stops working after a few seconds of silence

I'm using a monitor with speakers plugged into my laptop. The audio works fine so long as it is playing, but after the client that is playing the audio disconnects, the audio on my laptop stops working altogether (although the audio output remains unchanged).

To get sound working again I can open settings and change the audio output to Internal Speakers, and the back to HDMI.

Things work until the next period of silence.

Here's a brief example:

  • pactl info: Default Sink: alsa_output.pci-0000_00_1f.3.hdmi-stereo
  • aplay someclip.wav # Audio is OK
  • (immediately re-run command)
  • aplay someclip.wav # Audio is still OK
  • (wait about 10 seconds after the audio clip finishes and re-run)
  • aplay someclip.wav # Audio no longer works system wide
  • pactl info: Default Sink: alsa_output.pci-0000_00_1f.3.hdmi-stereo

Any ideas? It seems related to Pulse Audio and perhaps the timeout for connected audio clients? I'm not sure where to even begin debugging this one, so any info would be appreciated!

Thanks!

Try this command in Terminal and report back:

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

It turns off power saving on audio.

Unfortunately this didn't change the behavior.

Is there a way I can see verbose logs of what pulseaudio is doing?

Are you dual-booted? I just replied to someone else's post about sound - have to do a full shutdown in Win before booting Zorin.

Nope, I bought the laptop and gave Windows the boot immediately.

I'm going to try killing pulseaudio and bring it up in a console and see if I can get some info as to what's happening.

I'll report back here. I'm starting to think it's related to the dock and/or monitor I'm using. What's odd is if I use the audio "self test" on the monitor (firmware) and quit out of it, it no longer seems to kill the sound, although even that workaround isn't 100% reliable.

Here's what I'm seeing when audio stops for a few seconds:

I: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1f.3.hdmi-stereo idle for too long, suspending ...
I: [alsa-sink-HDMI 0] alsa-sink.c: Device suspended...
I: [pulseaudio] core.c: All sinks and sources are suspended, vacuuming memory
I: [pulseaudio] core.c: All sinks and sources are suspended, vacuuming memory
I: [pulseaudio] sink-input.c: Freeing input 2 "Playback"
I: [pulseaudio] client.c: Freed 7 "Brave"
I: [pulseaudio] protocol-native.c: Connection died.
I: [pulseaudio] sink-input.c: Freeing input 0 "Playback"
I: [pulseaudio] client.c: Freed 5 "Brave"
I: [pulseaudio] protocol-native.c: Connection died.

Once I start again (there's no sound coming out at this point):

I: [pulseaudio] client.c: Created 8 "Native client (UNIX socket client)"
I: [pulseaudio] protocol-native.c: Got credentials: uid=1000 gid=1000 success=1
I: [pulseaudio] sink-input.c: Trying to change sample spec
I: [pulseaudio] module-stream-restore.c: Restoring volume for sink input sink-input-by-application-name:Brave.
I: [alsa-sink-HDMI 0] alsa-sink.c: Trying resume...
I: [alsa-sink-HDMI 0] alsa-sink.c: Resumed successfully...
I: [alsa-sink-HDMI 0] alsa-sink.c: Starting playback.
I: [pulseaudio] resampler.c: Forcing resampler 'copy', because of fixed, identical sample rates.
I: [pulseaudio] sink-input.c: Created input 3 "Playback" on alsa_output.pci-0000_00_1f.3.hdmi-stereo with sample spec float32le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] sink-input.c:     application.icon_name = "brave-browser"
I: [pulseaudio] sink-input.c:     media.name = "Playback"
I: [pulseaudio] sink-input.c:     application.name = "Brave"
I: [pulseaudio] sink-input.c:     native-protocol.peer = "UNIX socket client"
I: [pulseaudio] sink-input.c:     native-protocol.version = "33"
I: [pulseaudio] sink-input.c:     application.process.id = "6439"
I: [pulseaudio] sink-input.c:     application.process.user = "jonathan"
I: [pulseaudio] sink-input.c:     application.process.host = "jonathan-portable"
I: [pulseaudio] sink-input.c:     application.process.binary = "brave"
I: [pulseaudio] sink-input.c:     application.language = "en_US.UTF-8"
I: [pulseaudio] sink-input.c:     window.x11.display = ":0"
I: [pulseaudio] sink-input.c:     application.process.machine_id = "9ea4b574179c4a08b31c4ced28dd8462"
I: [pulseaudio] sink-input.c:     module-stream-restore.id = "sink-input-by-application-name:Brave"
I: [pulseaudio] protocol-native.c: Requested tlength=69.66 ms, minreq=11.61 ms
I: [pulseaudio] protocol-native.c: Final latency 223.13 ms = 99.95 ms + 2*11.61 ms + 99.95 ms
I: [pulseaudio] client.c: Created 9 "Native client (UNIX socket client)"
I: [pulseaudio] protocol-native.c: Got credentials: uid=1000 gid=1000 success=1
I: [pulseaudio] sink-input.c: Trying to change sample spec
I: [pulseaudio] sink.c: Cannot update sample spec, SINK_IS_RUNNING, will keep using s16le and 44100 Hz
I: [pulseaudio] module-stream-restore.c: Restoring volume for sink input sink-input-by-application-name:Brave.
I: [pulseaudio] resampler.c: Forcing resampler 'copy', because of fixed, identical sample rates.
I: [pulseaudio] remap_sse.c: Using SSE2 mono to stereo remapping
I: [pulseaudio] sink-input.c: Created input 4 "Playback" on alsa_output.pci-0000_00_1f.3.hdmi-stereo with sample spec float32le 1ch 44100Hz and channel map mono
I: [pulseaudio] sink-input.c:     application.icon_name = "brave-browser"
I: [pulseaudio] sink-input.c:     media.name = "Playback"
I: [pulseaudio] sink-input.c:     application.name = "Brave"
I: [pulseaudio] sink-input.c:     native-protocol.peer = "UNIX socket client"
I: [pulseaudio] sink-input.c:     native-protocol.version = "33"
I: [pulseaudio] sink-input.c:     application.process.id = "6439"
I: [pulseaudio] sink-input.c:     application.process.user = "jonathan"
I: [pulseaudio] sink-input.c:     application.process.host = "jonathan-portable"
I: [pulseaudio] sink-input.c:     application.process.binary = "brave"
I: [pulseaudio] sink-input.c:     application.language = "en_US.UTF-8"
I: [pulseaudio] sink-input.c:     window.x11.display = ":0"
I: [pulseaudio] sink-input.c:     application.process.machine_id = "9ea4b574179c4a08b31c4ced28dd8462"
I: [pulseaudio] sink-input.c:     module-stream-restore.id = "sink-input-by-application-name:Brave"
I: [pulseaudio] protocol-native.c: Requested tlength=69.66 ms, minreq=11.61 ms
I: [pulseaudio] protocol-native.c: Final latency 223.13 ms = 99.95 ms + 2*11.61 ms + 99.95 ms
I: [pulseaudio] module-device-restore.c: Storing volume/mute for device+port sink:alsa_output.pci-0000_00_1f.3.hdmi-stereo:hdmi-output-0.

For reference:

$ cat /sys/module/snd_hda_intel/parameters/power_save
0

That's odd, stumped me.. My issues were Win taking over the sound bus through a restart; full shutdown in Win solves it but, probably not that. I did have same similar issue on another laptop - had to boot a Win installer then shutdown, sound came back.. Weird, it would work on boot but then fade out with a weird squeal. :face_with_monocle:

Hope you get it figured out though - sorry wasn't much help!

1 Like

Can you please run

sudo nano /etc/pulse/default.pa

Arrow key down to the line load-module module-suspend-on-idle and comment that line out. It will then look like #load-module module-suspend-on-idle

Tap the keyboard shortcut ctrl+o to overwrite. Then the enter key to save the current configuration. Then the ctrl+x to exit the editor.

Restart the pulseaudio service or just restart your computer.

Test audio.

I wonder, did you fail to turn off Windows "Fast Startup" before dumping Windows. One of the pieces of advice here: Before you install

Also, does audio fail on all apps where sound is played or just browser?

1 Like

Isn't this Auto Mute Mode of Alsamixer?

It would be worth seeing a screenshot of @apostoles alsamixer settings.
In alsamixer hit F5 to show "All" alsamixer channels then post a screenshot.

If [Auto-Mute] channel is set "Enabled", then move to it and toggle it to "Disabled" to check effect.

To save alsamixer setting changes, use:

sudo alsactl store

1 Like

Auto Mute is disabled on my setup.

One REALLY strange this is that when this issue happens, if I perform the internal monitor self test, which plays a tone, when it completes the audio comes back immediately.

I tried playing a YouTube video, and once I did the self test I could hear the already-playing video.

I'm starting to wonder if this is a monitor issue? It's an HP Omen 27" qs (new this month). I can't fathom how there's even communication to the OS when I do a self-test on the monitor.

Is it a monitor with integrated speakers? If so, I'm not an expert on cables and input/output methods but I suppose you need an audio cable to plug your computer to the external monitor.

How is the monitor connected to your computer?

If HDMI, there are different HDMI cables, some sub-equipped, some directional. Maybe try another HDMI cable.

I have always used the Zorin "Speaker Test" to confirm audio output when I had my sound problems.
Zorin>Settings>Sound and find it. Just click on speaker and a voice will announce e.g. "Top Left" etc.

1 Like

I've tried it numerous ways to help isolate where the issue is. This particular behavior seems to be tied to using DisplayPort. There was a hub in between, but I've eliminated that to keep it as simple as possible.

Here's what I tested:

  1. A/V over DisplayPort using Linux Mint: Audio drops out after a few seconds of silence (same as Zorin)
  2. A/V over DisplayPort using MacOS: Audio does NOT drop out
  3. A/V over HDMI on Zorin: Audio does NOT drop out

Based on the above, it's not specific to Zorin, and is related to audio over DisplayPort, and does not appear to be an issue with the monitor itself (at least not directly).

I'm going to keep cracking at it, but if anyone has any ideas based on this new info, please chime in, thanks!

I recognise there seems to be more issues when displayport connections are used compared with HDMI. But HDMI can be prone to issues if incorrect cable is used or used in wrong direction (directional cable).

Search on forum here gave this: No sound from Monitor Speakers on DisplayPort

Maybe websearch using "displayport sound problem Ubuntu 20.04" will also reveal some advice.

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