LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-12-2005, 10:25 AM   #1
Johnburrell
Member
 
Registered: May 2004
Distribution: FC3
Posts: 87

Rep: Reputation: 27
Sound always muted when I boot


Could someone please sort out the sound on my laptop. I have just finished messing around with blfs.

When I boot the machine, the sound is off. After each boot, I have to go into alsamixer as root and turn the sound on.

Also, when I boot the machine, the files in /dev/snd are created from scratch and they have permissions 660. So as a user I cannot read these files so the sound won't work until I give users read access.

I really would like the sound to work without all this messing about. Can someone tell me how I can boot the machine, put on the phones and sit back and enjoy?

Thanks
 
Old 09-12-2005, 11:18 AM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
After setting up your volume levels and unmuting everything in alsamixer, run:

alsactl store

And it should store your mixer settings and restore them at the next bootup.
 
Old 09-12-2005, 11:24 AM   #3
pcmind
LQ Newbie
 
Registered: Sep 2005
Location: Lisbon
Distribution: slackware 10.1, minislack, mandrake
Posts: 6

Rep: Reputation: 0
I had the same problem.

What i did was: booting as root changing setting using alsamixer after you boot with your user and never more you'll have to change your settings at boot.
 
Old 09-13-2005, 08:26 AM   #4
Johnburrell
Member
 
Registered: May 2004
Distribution: FC3
Posts: 87

Original Poster
Rep: Reputation: 27
I tried doing

alsactl store

after setting up alsamixer but on the next boot everything is muted again.
What does alsactl do exactly? I would like to check that it is working correctly and things are being set as they should.
 
Old 09-13-2005, 01:29 PM   #5
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 09-13-2005, 05:14 PM   #6
Vgui
Member
 
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496

Rep: Reputation: 31
This sounds like a perfect candidate for rc.local. Depending on your distro, check out /etc/rc.d/rc.local. This file is run right before your login terminal is displayed. You could raise the alsa volume, store it, then copy that configuration file to a new location. Then in your rc.local script have it move the max volume configuration file over the current (muted) alsa file.
You could also change the permissions of your /dev/snd device in the rc.local script.
Basically, you just use rc.local to cleanup and mess or misconfiguration a reboot did.
Hope that helps
 
Old 09-14-2005, 06:55 AM   #7
Johnburrell
Member
 
Registered: May 2004
Distribution: FC3
Posts: 87

Original Poster
Rep: Reputation: 27
Sorry, I'm green when it comes to using alsa.

When you say 'move the max volume configuration file over the current (muted) alsa file' could you be more precise please.

Do I put something like -

alsactl -f configfilename restore

in rc.local?
 
Old 09-14-2005, 04:38 PM   #8
Vgui
Member
 
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496

Rep: Reputation: 31
Okay, when you raise the volume with alsamixer, then do "alsactl store", it will create a configuration file (one that has the volume turned up). You would copy this file somewhere else, let's say "alsaconf.on". Then in rc.local you would do something like "cp alsaconf.on alsaconf.default", ie: overwrite the muted alsa configuration file with the one that has volume. The alsactl restore option might work as well, I hadn't looked too heavily into what is available for alsactl.
So basically:
Code:
1. Turn up volume with alsamixer
2. Store with alsactl store
3. Copy loud file to an alternate filename
4a. In rc.local, add a line to copy the loud alsa configuration over the default
4b. Run alsactl restore using the loud configuration file
Basically you want to restore your "loud" settings on reboot.
Hope that clarifies a bit more. I would offer to give you the exact code, but I only ran into this problem a few distros ago, and the rc.local file from there is long gone.
 
Old 09-15-2005, 04:47 AM   #9
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
You can run alsamixer as a normal user, but you should run "alsactl store" as root, so that the volume levels are restored to whatever you set when the sysem boots up. I don't think there is any need to put alsa stuff in rc.local.
 
Old 09-15-2005, 12:12 PM   #10
Johnburrell
Member
 
Registered: May 2004
Distribution: FC3
Posts: 87

Original Poster
Rep: Reputation: 27
okay - here's where I've got to with this -

I have created rc.local in /etc/rc.d with the following lines -

cp /etc/alsamix.conf /etc/asound.state
/usr/sbin/alsactl restore 0
chmod 666 /dev/snd


that's all that's in rc local. When I do

source /etc/rc.d/rc.local

as root, the sound works fine.
alsamix.conf is the alsa configuration file that I created from alsactl store with the sound turned on. chmod gives the user access to the sound files.

now the next problem. I am running lfs and lfs doesn't use rc.local so this file is not read at boot time. Where should I put these coomands to ensure they are executed after /dev/snd has been set up? Remember I want this to work when logging in as a user.
 
Old 09-28-2005, 01:57 PM   #11
ironwalker
Member
 
Registered: Feb 2003
Location: 1st hop-NYC/NewJersey shore,north....2nd hop-upstate....3rd hop-texas...4th hop-southdakota(sturgis)...5th hop-san diego.....6th hop-atlantic ocean! Final hop-resting in dreamland dreamwalking and meeting new people from past lives...gd' night.
Distribution: Siduction, the only way to do Debian Unstable
Posts: 506

Rep: Reputation: Disabled
For LFS try this;

http://www.linuxfromscratch.org/blfs...lsa-utils.html


Sorry if this is old but I see it was left unresolved.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
KMix muted, sound still happens? scm86 Linux - Newbie 1 09-15-2005 01:01 AM
Sound muted at boot, ntpd.conf rewritten spaceballs Slackware 1 02-22-2005 01:14 AM
Slackware 10 sound muted DreameR-X Slackware 2 12-05-2004 02:18 AM
sound always muted on boot Muddy Linux - Software 4 06-10-2003 12:32 AM
Sound muted in dual boot system XP/Redhat 8.0 deedee2 Linux - Hardware 0 01-15-2003 06:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

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
Open Source Consulting | Domain Registration