These days I had problems with alsamixer settings on my Ubuntu version 18.04.5, it wasnt being restored when restarting the system. I solved the problem by doing this:
Open the alsamixer
1- sudo alsamixer
Make the changes you want. Save changes with
2- sudo alsactl --file ~/.config/asound.state store
Open bashrc
3- sudo nano ~/.bashrc
Add this line at the end
4- alsactl --file ~/.config/asound.state restore
save and reboot.
Top comments (9)
Every time i am starting my PC, Alsamixer changes don't work until I start the terminal once. It is working fine after i just open the terminal and close it.
Is there any way i don't have to open the terminal to see the changes.
Please tell me if you have any idea.
To solve it I did the next thing.
Only execute in a terminal the first and second command of the guide above.
Then you have to make a .sh file, launch a text editor and then save the file with the .sh at the end.
In the file you have to type this:
Then save the file, in my case is get_sound.sh .After that, you have to launch "startup application" and click on add. In the name part you can type whatever you want but in command you have to put this:
You can find out the path to the file by clicking on Properties.
Then click on save and you are ready, every time you log in your computer this command will be executed.
Sorry for my English, it is not my native language.
Here are the steps I would recommend to save ALSA mixer settings automatically on startup
Open a terminal and run
alsamixer
to verify it works. Make any changes and exit.Run
alsactl store
to manually save the changes.Create a shell script called
alsa-save.sh
containing:chmod +x alsa-save.sh
sudo mv alsa-save.sh /usr/local/bin/
Open System Settings > Applications > Startup
Click the "+" button and select "Custom"
For Command, enter:
/usr/local/bin/alsa-save.sh
Give it a name like "Save ALSA Mixer"
Ensure it's toggled On
Log out and back in to test
This creates a simple executable script that runs alsactl store on startup. Let me know if any of these steps don't work or if the settings are still not saving automatically.
Did you ever figure out a fix? I'm having the exact same issue
Here are the steps I would recommend to save ALSA mixer settings automatically on startup in
Open a terminal and run
alsamixer
to verify it works. Make any changes and exit.Run
alsactl store
to manually save the changes.Create a shell script called
alsa-save.sh
containing:chmod +x alsa-save.sh
sudo mv alsa-save.sh /usr/local/bin/
Open System Settings > Applications > Startup
Click the "+" button and select "Custom"
For Command, enter:
/usr/local/bin/alsa-save.sh
Give it a name like "Save ALSA Mixer"
Ensure it's toggled On
Log out and back in to test
This creates a simple executable script that runs alsactl store on startup. Let me know if any of these steps don't work or if the settings are still not saving automatically.
This worked for my 3 Ubuntu-based distros. And I tried so many other things for so long to fix the inability to unmute S/PDIF HDMI outputs. I hope others see this post and it saves you some trouble too.
I have the exact same problem as Abhishek Dubey. Any suggestions on how to fix this?
Did you ever figure out a fix? I'm having the exact same issue
Thanks a lot !
It works perfectly