15

Sometimes I forget to enable mute before shutting down my laptop.

Can I set it up to be muted by default every time Ubuntu boots, before the login screen is displayed?


When I try DoR's suggestion of sudo alsactl store, the settings stored in /var/lib/alsa/asound.state are lost on the next reboot. Something is using this file to automatically save the current volume settings every time I reboot.

screenshot

ændrük
  • 78,496

3 Answers3

8

I think this needs two parts:

  1. To mute the sound in GDM, put:

    amixer sset Master 0
    amixer sset Master off
    

    in the file /etc/rc.local (make sure exit 0 is the last line in that file). This will set the volume level to 0 on the Master channel and mute it.

  2. To mute the sound in your session, add the above to the startup applications:

    System > Preferences > Startup Applications, then click on Add and create the new startup entry:

    • Name: Mute Sound
    • Command: /bin/bash -c "amixer sset Master 0 ; amixer sset Master off"
    • Comment: Set Master channel volume to 0 and mute it

    Click on Add and Close, and you should be done.

You can skip part one, if you turn off the login sound in System > Administration > Login Screen (untick the Play login sound checkbox).

ændrük
  • 78,496
htorque
  • 66,086
1

Mute the volume and then run the following command:

sudo alsactl store  

This will store your current sound settings, so from now on the sound will be muted on startup. I tested this out and it mutes both the GDM sound and the login sound.

Isaiah
  • 60,750
0

This need to be addressed in 'Upstart', which has taken over from using 'sudo alsactl store' or similar.

( I will report back, on what I find. )

david6
  • 14,528
  • 5
  • 38
  • 46