LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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

Reply
 
Search this Thread
Old 07-11-2007, 09:58 AM   #1
halfpower
Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 195

Rep: Reputation: 30
How do I get ALSA mixer to remember the its settings?


I'm pretty sure they are being reset every time I boot up. This causes a relay or something in my sound card to make a clicking noise on every boot.

EDIT: It's not when I boot up, it's when I start KDE.
 
Old 07-11-2007, 11:12 AM   #2
BrianHenderson
Member
 
Registered: Aug 2004
Location: Oregon, USA
Distribution: Ubuntu 6.06; Debian Testing
Posts: 40

Rep: Reputation: 15
The command "alsactl store" will tell alsa to store the settings.
 
Old 07-11-2007, 11:15 AM   #3
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
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.

That should do the trick.. Let us know
 
Old 07-19-2007, 06:52 PM   #4
halfpower
Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 195

Original Poster
Rep: Reputation: 30
Thanks.

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.
 
Old 07-25-2007, 09:04 AM   #5
halfpower
Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 195

Original Poster
Rep: Reputation: 30
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.
 
Old 07-25-2007, 09:55 AM   #6
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,846

Rep: Reputation: 128Reputation: 128
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!
 
Old 07-25-2007, 11:11 AM   #7
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
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)..
 
Old 07-25-2007, 11:20 AM   #8
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
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?
 
Old 08-01-2007, 02:55 AM   #9
Cringe
LQ Newbie
 
Registered: Aug 2007
Location: KC, MO
Distribution: Fedora 7
Posts: 10

Rep: Reputation: 0
Quote:
Originally Posted by tredegar
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.

Good luck!
 
Old 08-01-2007, 03:50 AM   #10
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
Cringe,
Thanks for the follow-up, and welcome to LQ!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alsa restores mixer settings on reboot Dswissmiss Linux - Software 2 10-20-2005 05:51 PM
ALSA mixer settings preserve? adds2one Linux - General 2 09-02-2005 02:38 AM
ALSA not saving user mixer settings abk4523 Linux - Software 3 12-29-2004 12:29 AM
alsa problem- crashes and mixer settings lubond Linux - Hardware 3 04-15-2004 09:37 AM
ALSA Mixer Not Saving Settings... shiny_spoon Linux - Software 6 11-02-2003 11:36 AM


All times are GMT -5. The time now is 02:33 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration