Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question

3 Answers 3

up vote 4 down vote accepted

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).

share|improve this answer
    
are you sure about the command given? It didn't seem to work for me. I went the long way round and made a script with the commands you mentioned and then pointed to it using the Browse button. Essentially the same thing...would it be because I'm using Netbook Edition? I'm having some weird and wonderful problems with UNE... –  user11486 Feb 26 '11 at 14:42

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.

share|improve this answer
    
This is promising, but the stored settings appear to revert every time I reboot. I've included a screenshot above. –  ændrük Feb 1 '11 at 4:39
    
I have the same issue. The sound settings revert on rebooting. –  MountainX Jun 5 '12 at 21:29

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. )

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.