Speakers keep turning off on PipeWire - Not the case with PulseAudio

The output of my inxi -Aa is as follows at the bottom. Recently I had an issue where my speakers connected via optical cable turn themselves off, seemingly because of something with pipewire. I think it’s something to do with something timing out.

My speakers are device 2, my headphones (Device-5) are my primary audio output. It’s becoming a real pain to have to turn the speakers back on, then go into audio settings and press the test button to get the system to provide output again. I’d really appreciate any help, and will provide any further information upon request!

Audio:
  Device-1: NVIDIA GA106 High Definition Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s bus-ID: 08:00.1 chip-ID: 10de:228e
    class-ID: 0403
  Device-2: Advanced Micro Devices [AMD] Starship/Matisse HD Audio
    vendor: ASUSTeK driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s
    lanes: 16 bus-ID: 0a:00.4 chip-ID: 1022:1487 class-ID: 0403
  Device-3: Blue Microphones Yeti Stereo Microphone
    driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
    lanes: 1 mode: 1.1 bus-ID: 1-1:2 chip-ID: b58e:9e84 class-ID: 0300
    serial: REV8
  Device-4: Logitech Webcam C270 driver: snd-usb-audio,uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-2:3 chip-ID: 046d:0825
    class-ID: 0102 serial: 9FD0DF00
  Device-5: Corsair VOID ELITE Wireless Gaming Dongle
    driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
    lanes: 1 mode: 1.1 bus-ID: 3-3:3 chip-ID: 1b1c:0a51 class-ID: 0300
  API: ALSA v: k6.6.65-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.2.7 status: active with: 1: pipewire-pulse
    status: active 2: pipewire-media-session status: active 3: pipewire-alsa
    type: plugin tools: pactl,pw-cat,pw-cli

This sounds like a real similar issue I had (no pun intended).

Try this:

amixer --card=1 sset 'Auto-Mute Mode' Disabled

sudo alsamixer --card=1

to locate ‘Auto-Mute Mode’ and to change to ‘Disabled’

to Locate ‘Front’ output and raise volume to 100 ‘Front’

Done! Will test and reply in a few minutes whether or not the issue reoccurs.

Believe it or not, as soon as I was about to click the solution button, it cut out again. Going to double check again to make sure any changes saved.

Does not appear that the changes weren’t saved, so I think this unfortunately isn’t the solution.

Try to execute this command in Terminal:

pw-metadata -n settings 0 node.suspend-on-idle false

EDIT: otherwise, try this method:
https://wiki.archlinux.org/title/PipeWire#Noticeable_audio_delay_or_audible_pop/crack_when_starting_playback
Then:

systemctl --user restart wireplumber.service && systemctl --user restart pipewire.service pipewire-pulse.service

Oh yeah. Forgot to tell you when you reboot the setting might be lost so you need to do it again. I checking out why, perhaps every time Manjaro updates.

The setting works great in Gnome. In KDE the audio mutes and cracks like its trying to fight between headphones out and line out. Keeping it bellow 100% volume seemed to help me to keep it that way. It usually changes when you go from having nothing playing audio to launching a video. That surge/spike in volume caused the mute/cracking to me in KDE.

ALSA mixer settings are saved to /var/lib/alsa/asound.state and should be restored when system is booted

Advanced Linux Sound Architecture/Tips and Tricks - ArchWiki

Disabling auto mute on startup

Auto-Mute Mode can be configured on startup with amixer. For example, to disable it:

sudo amixer -c 0 sset "Auto-Mute Mode" Disabled

Alternatively, the ncurses based interface can be utilized through alsamixer.
In order to save any modifications, use:

sudo alsactl store

Advanced Linux Sound Architecture/Troubleshooting - ArchWiki

Output is muted after reboot

Run the following command:

sudo alsactl restore

Gave this a shot, will update with feedback on whether effective or not ASAP

You can also try
pw-metadata -n settings 0 node.pause-on-idle = false

I use both and I solved the issues that you describe.

This seems to have solved my issue! Thank you everyone!

Keep in mind, that the commands that I suggests to you
pw-metadata -n settings 0 node.pause-on-idle = false
pw-metadata -n settings 0 node.suspend-on-idle false

Are not permanent; you have to edit/create the config file:
/etc/wireplumber/wireplumber.conf

And add the following content on the bottom of the file:

monitor.alsa.rules = [
  {
    matches = [
      # This matches the value of the 'node.name' property of the node.
      {
        node.name = "~alsa_output.*"
      }
    ]
    actions = {
      # Apply all the desired node specific settings here.
      update-props = {
        session.suspend-timeout-seconds = 0
        session.idle-timeout-seconds = 0
        node.pause-on-idle = false
        node.suspend-on-idle = false
      }
    }
  }
]

Then restart all audio services:

systemctl --user restart wireplumber.service pipewire.service pipewire-pulse.service

Then you can verify the settings with the following command in Terminal:

pw-dump | grep -e pause -e suspend -e idle

EDIT:
You can also add these settings:

node.suspend-on-idle = false
node.pause-on-idle = false

in the file /etc/pipewire/pipewire.conf in the section
## Properties for the DSP configuration.

@ImmortalEren , sorry, in the wireplumber.conf file, I forget to add another element, to have this file applied:

monitor.alsa.rules = [

content

]

Look above: I edited the configuration.

1 Like

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