LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 11-11-2006, 04:56 AM   #1
Vitalie Ciubotaru
Member
 
Registered: Dec 2005
Location: Osaka, Japan
Distribution: Ubuntu Trinity
Posts: 153

Rep: Reputation: 30
Question init script doesn't save ALSA settings


There are two [probably inter-related] problems:
1. Each time I boot LFS, I find sound controls muted and have to unmute them and set volumes. BTW, I installed the script from "blfs-bootscripts" and created /etc/asound.state file to store the settings just as the BOOK says.
2. If I try to store the volumes manually by running
Code:
alsactl store
but it complains about finding neither dialog nor whiptail
Code:
...
which : dialog not found
which : whiptail not found
Error, dialog or whiptail not found.
They are not installed by any (B)LFS package, aren't they?

Vitalie CIUBOTARU

Last edited by Vitalie Ciubotaru; 11-11-2006 at 06:57 PM.
 
Old 11-11-2006, 05:44 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
[edit]
Above post is edited.
This post became irrelevant.
Removed.
[\edit]

Last edited by druuna; 11-12-2006 at 05:01 AM.
 
Old 11-11-2006, 06:57 PM   #3
Vitalie Ciubotaru
Member
 
Registered: Dec 2005
Location: Osaka, Japan
Distribution: Ubuntu Trinity
Posts: 153

Original Poster
Rep: Reputation: 30
Removed as a consequence of removing the post above

Last edited by Vitalie Ciubotaru; 11-12-2006 at 01:23 PM. Reason: Removed as a consequence of removing the post above
 
Old 11-12-2006, 05:32 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

A google search gives me this, among others:

BLFS - Ticket #1342 (defect)
Alsa troubleshooting

Search engines are great, try using them.
 
Old 11-12-2006, 02:08 PM   #5
Vitalie Ciubotaru
Member
 
Registered: Dec 2005
Location: Osaka, Japan
Distribution: Ubuntu Trinity
Posts: 153

Original Poster
Rep: Reputation: 30
Thank you very much, druuna!
I followed the links above and now I know what to do. I'll report on my (in)successes.

Vitalie CIUBOTARU

P.S.: I did [and do] "try using" search engines!
 
Old 11-20-2006, 05:43 AM   #6
Vitalie Ciubotaru
Member
 
Registered: Dec 2005
Location: Osaka, Japan
Distribution: Ubuntu Trinity
Posts: 153

Original Poster
Rep: Reputation: 30
Thank you, druuna!
The solution druuna kindly pointed to was very [however, not exhaustively] helpful. It can be summarized this way: if we want our ALSA to store the volume settings, we have to: (1) (re)configure the kernel and include all sound driver components that we need as loadable modules, not compiled into the kernel itself and (b) install dialog.
Now "alsactl store" doesn't complain about not finding dialog or whiptail. It definitely saves the volumes. The script [/etc/dev.d/snd/alsa.dev] created per BLFS book doesn't restore the volumes at bootup as it should.
I tried to run it by myself but it says something like
Code:
/etc/dev.d/snd/alsa.dev : unsupported option
I know it must be run during the boot-time, not run-time, but still...
By the way, running manually
Code:
alsactl restore
nicely restores the volumes. I am stuck here -- any ideas?

Vitalie CIUBOTARU
 
Old 11-20-2006, 08:51 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Looking back on how I solved this I now notice that I had problems as well with the alsa.dev script.

I did the following: I did not tamper any further with the installed alsa parts (the blfs related alsa parts to be precise). The only thing not working was the restore. Instead I added the following lines:

boot_mesg " - restoring alsa"
/usr/sbin/alsactl restore -f /etc/asound.state


to my personal boot script, which solved the restore problem.
In case you don't know how to set up your own boot scripts: There is an example present (/etc/rc.d/init.d/template) that you can use. Mine looks like this:
Code:
/etc/rc.d/init.d $ cat druuna-extra 

#!/bin/sh
########################################################################
# Begin $rc_base/init.d/
#
# Description : Set/modify some sane defaults
#
# Authors     : druuna
#
# Version     : 00.01
#
# Notes       :
#
########################################################################

. /etc/sysconfig/rc
. ${rc_functions}

case "${1}" in
        start)
                boot_mesg "Personal settings:"
                boot_mesg " - restoring alsa"
                /usr/sbin/alsactl restore -f /etc/asound.state
                boot_mesg " - changing max-user-freq to 1024"
                /bin/echo "1024" > /proc/sys/dev/rtc/max-user-freq
                boot_mesg " - running ldconfig"
                /sbin/ldconfig
                boot_mesg " - evaluate sensors"
                /usr/local/bin/sensors -s
                ;;

        *)
                echo "Usage: ${0} {start}"
                exit 1
                ;;
esac

# End $rc_base/init.d/
It is linked to rc3.d only (I don't use RL5, only RL3).
Code:
/etc/rc.d $ ls -la * | grep druuna
-rwxr-x---   1 root root   771 Sep  2 20:42 druuna-extra
lrwxrwxrwx   1 root root   22 Aug 25 18:39 S80druuna-extra -> ../init.d/druuna-extra
I'll have another look at the way BLFS tries to set it up and report back if I have an answer.

Hope this helps.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Save gVIM Settings! simsjr Programming 13 07-03-2015 05:45 AM
settings won't save miner49er Debian 1 04-01-2006 12:27 PM
How do I save my settings? laverscheval DamnSmallLinux 2 10-08-2004 08:44 PM
alsa settings don't save after a reboot moger Slackware 7 07-19-2004 10:56 AM
how to save wireless settings? trey85stang Linux - Wireless Networking 1 05-17-2004 07:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 12:00 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