1

I am wanting to make my laptop mute its sound when I suspend, as well as hibernate. I have attempted this by writing a simple script and placing it in my /etc/pm/sleep.d folder and making the script executable. However when I suspend my laptop nothing happens. Can someone tell me what I need to do to make this goal of mine to work?

#!/bin/bash
#script to make  system mute sound on  suspend


    amixer -q -D pulse sset Master toggle
philipballew
  • 2,469

1 Answers1

1

Here's how the script in /etc/pm/sleep.d should look like. Name it 20_mute_audio

#! /bin/sh
case $1 in
     suspend|suspend_hybrid|hibernate)
         amixer -q -D pulse sset Master toggle
        ;;
esac