How do I get ALSA mixer to remember the its settings?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When the system boots, it should execute a file called something like /etc/rc.d/rc.alsa.
This in turn will read a file called /etc/alsa-something (I cannot recall the exact name -- my system's down right now) but it's in /etc and its called alsa-restore or alsa-settings or alsa.conf or something like this.
If that file is not there, then you ought to run (from a console as root) 'alsamixer' and this should bring up the alsa mixer control panel.
Use your arrow and space keys to configure the settings, and when done, exit (ESC I think) then type 'alsactl store' which should save the settings into the config file in /etc.
Now make sure your system is executing rc.alsa when it boots, and that the rc.alsa file IS executable.
I found a file called /etc/rc.d/rc.alsa. It is a shell script that contains the following script segment
Code:
load_alsa_mixer() {
if [ -r /etc/asound.state ]; then
echo "Loading ALSA mixer settings: /usr/sbin/alsactl restore"
/usr/sbin/alsactl restore
else
echo "ALSA warning: No mixer settings found in /etc/asound.state."
echo " Sound may be muted. Use 'alsamixer' to unmute your sound card,"
echo " and then 'alsactl store' to save the default ALSA mixer settings"
echo " to be loaded at boot."
fi
}
I made the changes to alsamixer and then successfully ran the command
Code:
alsactl store
I think that did the trick, but I'll have to reboot twice to see find out if it worked.
Okay. That didn't work. For some reason the configuration that is enabled by "alsactl restore" is getting reset when I start KDE. I think KDE must be activating some other configuration somehow.
I had something similar with KDE when I upgraded from 11.0 to 12.0. I never found what it was, but if I created a new user, they didn't have any problems using sound in KDE. I also found that running alsactl restore as root restored the sound. It seemed as though KDE was doing something to the sound...
Thus, the 'solution' I found was to move ~/.kde to ~/.kde.old, log out, log back in again, and the sound problem was magically fixed. There was obviously something in ~/.kde that broke the sound. The only downside was I had to reconfigure KDE from scratch, but that only took a few minutes in the end. Oh, and I then deleted ~/.kde.old to save disk space If you found this solved the problem, you could try and see which of the files in ~/.kde was responsible for the problem, but I didn't have the patience!
Another thought would be to make sure you are actually using the ALSA sound system, and not one of the other sound engines (whatever they're called I can't recall, but enlightenment sound daemon and 'open'/threaded sound system come to mind)..
Try this:
Set your volume control as you like it.
Close all open windows.
Then System -> KDE Components -> Session Manager
Set it to "Resoore manually saved session"
Click Apply, close the window.
Then K -> Save session. This saves the (empty) session, including your volume level.
Logout, login. Better?
Try this:
Set your volume control as you like it.
Close all open windows.
Then System -> KDE Components -> Session Manager
Set it to "Resoore manually saved session"
Click Apply, close the window.
Then K -> Save session. This saves the (empty) session, including your volume level.
Logout, login. Better?
I had the same problem as Halfpower, and this didn't fix it. I did, however, find out that I had another program overwriting ALSA's levels. The culprit was KMix, you can get to it via K/Multimedia/KMix or $ kmix. Go to Settings/Configure and uncheck "Restore Volumes at Login."
You may have a different program doing it, but that's how you need to get it done.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.