Mute speakers until I say otherwise

This seems like a dumb question. I’ve been looking at PulseAudio config and it tells you how to do all these complicated things I don’t understand and will never need, but it doesn’t tell me how to default my speakers to mute. I allow sound from my laptop less than once a week. I don’t want notification sounds. I just want the speakers muted until I want to listen to something.

I copied /etc/pulse/client.conf to /.config/pulse/client.conf but I have no idea how to proceed from there.

If you were running a decent desktop, you could just mute the speakers there. click done. We don’t know that…because you didn’t tell us though. Maybe you’re running CLI only.

@jrenaut ,

yay -S pulseaudio-ctl
pulseaudio-ctl mute # toggles muting as a shortcut command
pulseaudio-ctl set 0 # into Autostart

man pulseaudio-ctl # up down by 5% etc.

1 Like

Sorry I wasn’t clear. Muting is no problem, I can get it to mute (Using the desktop icon, though I could figure out the command line if necessary). My problem is that every time I reboot or wake it up from sleeping, it’s back to un-mute. I want it to default to mute and only un-mute when I actively tell it to

Set volume to zero maybe :person_shrugging:

On KDE and Cosmic, it stays muted for me. Those are the two desktops I use with any frequency, though I normally prefer sounds, occasionally muted (due to company or sleeping).

You could run this comand during login to mute your default audio device::

pactl set-sink-mute @DEFAULT_SINK@ true

I’m using XFCE

Is that something I can set in the PulseAudio client.conf as well?

I am not so much familiar with XFCE but I am sure you can set start commands in XFCE which are executed on every login.

… > Settings > Session and Startup > Application Autostart > Add

Add the command @mbod recommended and set the trigger to “on login”.

Ok, trying this, thanks. This seems like a hack, though - I’m surprised I can’t set PulseAudio to default to mute.

On my XFCE systems the last assigned volume is kept after a restart. Don’t know why it doesn’t for you.

1 Like

Update - @mbod’s command works and @2000’s instructions to add to startup work BUT the volume still comes back on as soon as the computer wakes up (and the “on login” scripts don’t run at this time). I have very vanilla settings and a pretty recent OS install. How do I track down what is making the sound reset whenever the computer goes to sleep?

I’m using Xfce and the volume stay muted when the system wakes up.

Try setting mute with ALSA mixer instead, see if it survives reboot/resume:

amixer -D default set Master playback off

Still went back to volume on after resume

Does it happen it if the speakers are unplugged before startup/resume?

I ask this because jack sensing is a possible cause.

As another workaround, you could create a systemd service that runs the script after your machine wakes up from sleep (suspend or hibernate), not just on login.