How to disable audio timeout in 26.04 Cinnamon?

My A/V reciever keeps having to “wake up” each time a new sound stream played, meaning I don’t hear notifications or alerts, and longer sounds are cut off at the beginning.

I’ve read that the problem is probably Pipewire going into power saving mode after 5 seconds.

The fixes I’ve seen online for previous releases don’t seem to work.

What can I try for Resolute?

1 Like

You could have a look at powertop, if the sound device or audio codec are set to powersave mode. If powertop reports “good”, that means it’s enabled and could be the root cause.

This is most likely caused by PipeWire / WirePlumber suspending the audio device after a short idle period (typically ~5 seconds), which leads to delay and audio being cut off at the start of playback.

A reliable fix is to disable the suspend timeout entirely:

Copy the WirePlumber config to your user directory:

mkdir -p ~/.config/wireplumber/main.lua.d/

cp /usr/share/wireplumber/main.lua.d/50-alsa-config.lua ~/.config/wireplumber/main.lua.d/

Edit the file and set:

["session.suspend-timeout-seconds"] = 0

Restart services:

systemctl --user restart wireplumber pipewire pipewire-pulse

This disables the idle suspend behavior and should prevent the receiver from “sleeping”, eliminating the delay and truncated audio.

WirePlumber’s “main.lua.d” folder does not exist in that directory on my machine. :frowning:

There were some changes in 0.5. Try:

grep -rF suspend-timeout-seconds /usr/share/wireplumber

For me, who is still on 24.04, this outputs:

/usr/share/wireplumber/bluetooth.lua.d/50-bluez-config.lua:      --["session.suspend-timeout-seconds"] = 5,  -- 0 disables suspend
/usr/share/wireplumber/bluetooth.lua.d/50-bluez-midi-config.lua:      --["session.suspend-timeout-seconds"] = 5,  -- 0 disables suspend
/usr/share/wireplumber/main.lua.d/50-alsa-config.lua:      --["session.suspend-timeout-seconds"] = 5,  -- 0 disables suspend
/usr/share/wireplumber/scripts/suspend-node.lua:      -- honor "session.suspend-timeout-seconds" if specified
/usr/share/wireplumber/scripts/suspend-node.lua:          tonumber(node.properties["session.suspend-timeout-seconds"]) or 5

Since you didn’t say what your A/V receiver is, but it does go to sleep when suspended, I am suspecting, you’ll want to adapt your equivalent of bluetooth.lua.d/50-bluez-config.lua. And the modified version needs to be placed in exactly the same sub-directory in ~/.config/wireplumber.

But I still think you should check with powertop first, because disabling power save mode there is easily done and you can check if it helped immediately. Just need to find the audio device and audio codec in the tunables tab.

P.S.: Or just hack your own keepalive :wink:

# no point in low-latency and mono is enough
pw-play --latency=1s --channels=1 - </dev/zero

You can even target the sink directly to circumvent filters in the chain, for instance, which would just add CPU load for no gain.

I’m using a Sony STR-DH790 7.1 receiver through HDMI, not Bluetooth.

Your code output:

/usr/share/wireplumber/scripts/node/suspend-node.lua: – honor “session.suspend-timeout-seconds” if specified
/usr/share/wireplumber/scripts/node/suspend-node.lua: tonumber(node.properties[“session.suspend-timeout-seconds”]) or 5

I can try toying with that when I get back from work, but suggestions are still welcome.

So my assumption was wrong. I think you just need a rule that disables suspending that particular sink on idle timeout. See that documentation link and the one contained in there about migration from 0.4.

Especially that one should be left alone! If it even still exists. It’s a helper script to make stuff like session.suspend-timeout-secondswork, so don’t mess with it!