LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-13-2006, 11:49 PM   #1
Krelian
LQ Newbie
 
Registered: Jun 2006
Distribution: Mandriva
Posts: 16

Rep: Reputation: 0
Changing volume/mute status permanently?


Distribution: Mandriva 2006
Sound card: Aureal vortex au8820 (vortex 1)

When I turn on my computer, I get no sound in Linux. However, if I run alsamixer and unmute the "Master" and "PCM" controls, then I get sound. However, the changes to these are only temporary; they disappear if I turn off the computer. How can I change these sound settings permanently?

Thanks.
 
Old 07-14-2006, 12:50 AM   #2
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 31
Run, as root:
Code:
alsactl store
To load the settings, run:
Code:
alsactl restore
but chances are that is run automatically with each boot. If it isn't, making it run automatically with every boot isn't difficult.
 
Old 07-14-2006, 08:43 PM   #3
Krelian
LQ Newbie
 
Registered: Jun 2006
Distribution: Mandriva
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks, that does work, except it doesn't appear to run "alsactl restore" on startup. How can I make this happen?

Thanks again for your help.
 
Old 07-14-2006, 08:46 PM   #4
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Solus
Posts: 2,254

Rep: Reputation: 47
If your running KDE use the KDE mixer (volume control), edit the settings to restore on startup.
 
Old 07-15-2006, 12:09 AM   #5
FreeDoughnut
Member
 
Registered: Jun 2006
Distribution: Slackware 10.2, Debian Testing/Unstable, Ubuntu Breezy Badger, working on LFS
Posts: 228

Rep: Reputation: 30
Edit one of the init scripts.
 
Old 07-15-2006, 11:54 AM   #6
Krelian
LQ Newbie
 
Registered: Jun 2006
Distribution: Mandriva
Posts: 16

Original Poster
Rep: Reputation: 0
Can you give me an example of "one of these init scripts" and where they are located?
 
Old 07-18-2006, 08:41 PM   #7
FreeDoughnut
Member
 
Registered: Jun 2006
Distribution: Slackware 10.2, Debian Testing/Unstable, Ubuntu Breezy Badger, working on LFS
Posts: 228

Rep: Reputation: 30
Put
Quote:
#!/bin/sh
# Load the mixer settings and OSS compatibility for ALSA.
# (the Advanced Linux Sound Architecture)

# A function to load the ALSA mixer settings:
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
}

# A function to load the ALSA OSS compat modules:
load_alsa_oss_modules() {
if ! cat /proc/modules | tr _ - | grep -wq snd-pcm-oss ; then
echo "Loading OSS compatibility modules for ALSA."
modprobe snd-pcm-oss
modprobe snd-mixer-oss
modprobe snd-seq-oss
fi
}

# If hotplug or something else has loaded the ALSA modules, then
# simply load the mixer settings and make sure the OSS compat
# modules are loaded:
if [ -d /proc/asound ]; then
load_alsa_mixer
load_alsa_oss_modules
else
# If there are ALSA modules defined in /etc/modules.conf, but
# ALSA is not yet loaded, then load the modules now:
DRIVERS=`modprobe -c | grep -E "^[[:space:]]*alias[[:space:]]+snd-card-[[:digit:]]" | awk '{ print $3 }'`
if [ ! "$DRIVERS" = "" ]; then
echo "Loading ALSA kernel modules."
for module in $DRIVERS; do
modprobe $module
done
fi
# If ALSA is now up, then load the mixer settings and OSS modules:
if [ -d /proc/asound ]; then
load_alsa_mixer
load_alsa_oss_modules
fi
fi
in /etc/rc.d/rc.alsa and make it executable.
 
  


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
mute/volume buttons to work? microsoft/linux Linux - Laptop and Netbook 7 08-20-2005 03:35 PM
Dell Inspiron 9200 Volume, Play, Mute Quick Buttons and Sound with Suse 9.3 elliotfuller Linux - Hardware 1 06-08-2005 11:38 PM
Volume Up/Down/Mute keys not working Blargity Linux - Laptop and Netbook 10 06-02-2005 11:56 AM
Script to Mute Windows' Volume mijenks Programming 1 12-14-2004 06:30 PM
Changing network driver permanently jvk Linux - Newbie 7 10-08-2004 09:27 AM


All times are GMT -5. The time now is 06:43 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration