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.

Hello I have tryed out the programm "EarCandy", now I had/have a lot of problems. At first I did not get any sound and now it is very low volume. PS Earcandy is now deleted from my harddisk.

When Im opening the Alsamixer with:

alsamixer

I see that the volume for the speakers is zero. Now I push it to the max volume. But after every restart, I have to open alsamixer again and have to set the volume to max again. Can I save the settings for alsamixer or is there any other way to fix the problem ? enter image description here

share|improve this question

5 Answers 5

Execute:

sudo alsactl store

This should save alsamixer configurations to /etc/asound.state which gets loaded every startup.

share|improve this answer
3  
My laptop continues to reset my configuration, even after running the above command. It claims to be storing it to /var/lib/alsa/asound.state. Is there any other reason for it not working? –  Azmisov Aug 31 '13 at 3:35
    
I have exactly the same problem, and exactly the same behaviour when I try sudo alsactl store. –  mattshepherd Oct 18 '14 at 19:15
    
@Azmisov: You can further experiment with the system like following: (1) store the configuration (2) start alsamixer and change master level (2) restore the configuration (3) check that master level was restored. If above is as expected, check that restore is actually triggered at system boot (chkconfig alsa-utils should display alsa-utils on). –  dma_k Mar 12 at 10:54

You could also save the mixer settings into a custom file with alsactl:

alsactl --file ~/.config/asound.state store

Reloading:

alsactl --file ~/.config/asound.state restore
share|improve this answer

After running sudo alsamixer the mixer should should retain the changes you make.

See Sound does not work once my profile loads. on which answers you can find a clue also.

Good luck!

share|improve this answer

Alsa-Json-Gateway https://github.com/fulup-bzh/AlsaJsonGateway supports store/restore of sound card sessions from JSON/REST API

  • list sessions /jsonapi?request=session-list&cardid=hw:0
  • store session /jsonapi?request=session-store&cardid=hw:0&args=MySoundConfig
  • restore /jsonapi?request=session-load&cardid=hw:0&args=MySoundConfig
share|improve this answer

Seppo Erviälä's answer is right but not complete. As dma_k already noted, man alsactl clearly states at the end that,

/var/lib/alsa/asound.state (or whatever file you specify with the -f flag) is used to store current settings for your soundcards.

palacsinit appropriately noted that you can store config into your file with

alsactl --file ~/.config/asound.state store

and reload with

alsactl --file ~/.config/asound.state restore

This can be further improved with placing the second line, the restore command into a .desktop file.

You will need to run sudo nano ~/.config/autostart/alsarestore.desktop, which will open nano text editor and create ~/.config/autostart/alsarestore.desktop file. ~/.config/autostart/ entries are used to autostart programs and services for specific user on startup/graphical login.

The contents of the .desktop file should be the following:

[Desktop Entry]
Type=Application
Terminal=false
Name=alsaresotre
Exec=alsactl --file ~/.config/asound.state restore

Among other things, you could store your config in /etc/asound.state and symlink it to /var/lib/alsa/asound.state, but this one is more of a suggestion rather than tested solution

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.