LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   How do I change the default muted alsa setting in Core 2? (https://www.linuxquestions.org/questions/fedora-35/how-do-i-change-the-default-muted-alsa-setting-in-core-2-a-167344/)

enderjm 04-07-2004 12:06 PM

How do I change the default muted alsa setting in Core 2?
 
I am running Fedora Core 2, and soudn works fine, except that its mute by default (why?) Everytime I restart the sound settings revert to mute. How do I change the default setting, where is/what is the config file?

aikempshall 04-07-2004 03:19 PM

Are you running ALSA? If so.

When ALSA stops it should do a

alsactl store 0

the 0 (zero) is what ALSA has numbered your soundcard. This stores the mixer settings in /etc/asound.state.

When ALSA starts it should do a

alsactl restore 0

which restores the mixer settings from /etc/asound.state.

Clearly this is not happening. Check the ALSA script in your /etc/rc.d/init.d.

If you're not using ALSA I've got no further suggestions.

AK

LordMorgul 04-07-2004 09:09 PM

This is supposed to be saving the alsa device state:
Code:

-$-> fgrep -H alsa /etc/rc.d/init.d/*
/etc/rc.d/init.d/halt:grep -q "\(alsa\)" /proc/devices
/etc/rc.d/init.d/halt:if [ $? = 0 -a -x /usr/sbin/alsactl ]; then
/etc/rc.d/init.d/halt:  runcmd $"Saving mixer settings" alsactl store

However, it does not work on my test system either :)
There is nothing present to restore the settings, it should be done by the driver module loading (using modprobe.conf install commands -- see below).

Using alsactl manually to save your initial settings (and then to restore them) works, or you could use the quick and dirty method for getting them to restore on boot (add the command to /etc/rc.d/rc.local, make sure the soundcard module has loaded first)... or you can setup your soundcard module to reload the settings in this fashion.
(I've included the entire section of my modprobe.conf that relates to the driver so that you can see how it works together, note that if you're not using an audigy/emu10k1 card that module name should be the only part that requires changing, hopefully. Also, \ denotes a line break where one does not exist.. for the forum to be readable (its all one line in the config file itself.)
Code:

alias sound-slot-0 snd-card-0
alias snd-card-0 snd_emu10k1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

install snd-card-0 /sbin/modprobe --ignore-install snd-card-0 && \
  { /sbin/modprobe snd_emu10k1 && \
  /usr/sbin/alsactl restore 0 > /dev/null 2>&1 || :; }
remove snd-card-0 { /usr/sbin/alsactl store 0 > /dev/null 2>&1 || :; }; \
  /sbin/modprobe -r snd_emu10k1 && \
  /sbin/modprobe -r --ignore-remove snd-card-0

Another option would be to create an alsa startup script an add it to the init.d scripts as suggested by aikempshall, it would work fine.
I believe anaconda (the Fedora installer) should have created the modprobe.conf entries to handle this for you.

enderjm 04-07-2004 09:22 PM

I do not see an alsa script in init.d. I did an upgrade from Core 2 test 1 to Core 2 test 2 and am using the defaults it has for sound.

aikempshall 04-08-2004 02:27 AM

So you have alsa and you use alsamixer to unmute the settings?

Do you have the script /etc/rc.d/inet.d/alsasound

Also can you check out /etc/rcn.d directories where n is 1 thru 6 signifying run level. Possibly in
/etc/tc5.d there will be two files called Snnalsasound and Knnalsasound where nn is a number in the range of 1 thru 99.

AK

enderjm 04-08-2004 11:36 AM

There is no alsasound script in my /etc/rc.d/init.d nor in /etc/rc.d/rc5.d :confused: Is that unusual? How do I go about creating one?

THX75 04-08-2004 12:35 PM

Ah yes... the ol' kernel 2.6 and ALSA problem. Take a look at a post I submitted a few weeks ago with my attempts at getting ALSA to work with kernel 2.6 and getting alsamixer to work. It was with FC1, but I think it should apply to FC2 as well.

http://www.linuxquestions.org/questi...862#post809862

I had to install the ALSA drivers so I could get the utils to work, which is where alsamixer is located. I never could get alsamixer and altctl to save my sound volumes, so I used a work around with Kmix in KDE. There's a link within the link above that talks about it in detail. You basically open Kmix, set the volume and close Kmix by closing the application window (not going through the menus to quit). Kmix will then load each time KDE starts. It's a cheap fix and it limits you to KDE, but hopefully they'll get if fixed by the time FC2 is final.

Good luck!


All times are GMT -5. The time now is 12:13 AM.