Re: Re: sound volume not persistent between reboots

2006-06-07 Thread Gonghua Guo
Hi all,

I write a simple init shell script to support the persistence.

I recommend Debian maintainer of alsa-utils package to review this script and
if possible, create a debian package called alsapersist and make it the
recommended package for alsa-utils. Majority of users including me like the
persistence feature and advanced user could choose not to install this package.

1. 
here is the content of /etc/init.d/alsapersist surrounded by  mark.

#! /bin/sh
# /etc/init.d/alsapersist: restoring/storing mixer setting for all the sound
cards
# Author: Gonghua Guo
# Released under GPL version 2 or later.
#

PATH=/bin:/usr/bin:/sbin:/usr/sbin

test -f /usr/sbin/anacron || exit 0

case $1 in
  start)
alsactl restore

echo Restoring the mixer setting for all the sound cards
;;
  restart|force-reload)
# nothing to do
:
;;
  stop)
alsactl store

echo Storing the mixer setting for all the sound cards
;;
  *)
echo Usage: /etc/init.d/alsapersist start|stop
exit 1
;;
esac



2. fxg:/etc/rc2.d# ln -sf ../init.d/alsapersist S99alsapersist

Thanks for your hard work,

Gonghua

In-Reply-To=[EMAIL PROTECTED]

Subject=Re:%20Re: sound volume not persistent between reboots

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: sound volume not persistent between reboots

2006-04-14 Thread Rick Reynolds
Found the problem.  There was a script in /etc/rc.boot that was calling 
aumix.  Since rc.boot gets called after the rcS.d scripts (and before 
rcrunlevel.d scripts) it was negating what alsactl had done for me.


This is just one of several little 2.4.x - 2.6.x kernel upgrade tweaks 
I've needed to root out of my system.


Thanks for asking me good questions which inspired me to keep digging 
until I found it.


Thanks,
Rick Reynolds
--
Released in 1996, Microsoft Visual Basic 6.0 cemented the product as 
the first choice of buggy front-ends to databases everywhere. In fact, 
if you wanted a buggy front-end to your corporate database, there was no 
better choice. -- Andrew Orlowski



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: sound volume not persistent between reboots

2006-04-12 Thread Lubos Vrbka
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160


 wouldn't just running alsamixer and setting the desired levels solve
 this problem?
 I tried exactly this in the past.  Still didn't keep my settings. 
 Although I noticed that the Gnome volume control accurately reflected
 the changes I made via alsamixer (before reboot, that is).
 one more thing that comes to my mind. i recall seeing something like
 'previous alsa settings found. will not touch mixer'
 during the boot process - however, i'm not sure whether it went to
 /var/log/messages or /var/log/bootlog. also, i don't have access to my
 box at the moment, so i cannot check what the exact form of the message
 is (i'm pretty sure that the 'will not touch mixer' is there) and when
 is it issued. i'll try to check it out tomorrow.
 
 maybe this is directly related to your problem? do you see something
 like that during the boot?
by the way, i realized today that the same message is issued during the
shutdown as well. do you have it there? if not, maybe some links related
to alsa starting with K in /etc/... are missing?

regards,
- --
Lubos
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (MingW32)

iD8DBQFEPPnD5EqL/d2IfcARA0lPAKCUoifR7//u0Mbcn2SU8iwTeF94cwCcDP1W
SGSV73oIeCCo0oXE1mVITdk=
=qRnR
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: sound volume not persistent between reboots

2006-04-11 Thread Liam O'Toole
On Tue, 11 Apr 2006 10:29:48 -0400
Rick Reynolds [EMAIL PROTECTED] wrote:

 A few topics similar to this have been recently discussed, and I was 
 waiting for this particular question to be hit, but it never did (at 
 least that I saw).
 
 My sound works great.  My only problem is that the settings I apply
 to the Gnome volume control applet don't persist across reboots
 (although they do across restarts of X).
 
 I'm guessing there is some alsa-something that just needs to be 
 reconfigured.  Anyone have a pointer for me?
 
 Thanks,
 Rick Reynolds

The alsa-utils package provides the script /etc/init.d/alsa-utils for
this purpose.

-- 

Liam


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: sound volume not persistent between reboots

2006-04-11 Thread Lubos Vrbka
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

Rick Reynolds napsal(a):
 A few topics similar to this have been recently discussed, and I was
 waiting for this particular question to be hit, but it never did (at
 least that I saw).
 
 My sound works great.  My only problem is that the settings I apply to
 the Gnome volume control applet don't persist across reboots (although
 they do across restarts of X).
 
 I'm guessing there is some alsa-something that just needs to be
 reconfigured.  Anyone have a pointer for me?
wouldn't just running alsamixer and setting the desired levels solve
this problem?

i recall having the same issue and after installing alsamixer and
running it i don't have the problem any more...

regards,

- --
Lubos
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (MingW32)

iD8DBQFEO8Ck5EqL/d2IfcARA9DmAJ4xZbGIMakeMZPACPQCnOujYr847ACePDBJ
toOsqmS5jczTyrxRo+rznRk=
=ERGC
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: sound volume not persistent between reboots

2006-04-11 Thread Rick Reynolds

Liam O'Toole wrote:


On Tue, 11 Apr 2006 10:29:48 -0400
Rick Reynolds [EMAIL PROTECTED] wrote:
 


My sound works great.  My only problem is that the settings I apply
to the Gnome volume control applet don't persist across reboots
(although they do across restarts of X).
   


The alsa-utils package provides the script /etc/init.d/alsa-utils for
this purpose.
 



Checking...

Yes, that script is there.  And it is pointed to by 
/etc/init.d/rcS.d/S50alsa-utils.


I see that it wants access to

-rw-r--r--  1 root root 7668 2006-03-24 06:59 /var/lib/alsa/asound.state

which is there and rw by root. 


Didn't see anything about alsa in /var/log/messages or /var/log/syslog.

I see this in my boot log:

Tue Apr 11 07:58:32 2006: Usage: /etc/init.d/alsa 
{unload|reload|force-unload|force-reload|suspend|resume}

Tue Apr 11 07:58:32 2006: ALSA driver is already running.

which indicates that maybe something isn't sending the right parameter 
to /etc/init.d/alsa, but that isn't alsa-utils so I'm not sure how 
significant that is.


Not sure what to check next.

Thanks,
Rick Reynolds
--
If you have any trouble sounding condescending, find a Unix user to 
show you how it's done -- Scott Adams



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: sound volume not persistent between reboots

2006-04-11 Thread Rick Reynolds

Lubos Vrbka wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

Rick Reynolds napsal(a):
 


A few topics similar to this have been recently discussed, and I was
waiting for this particular question to be hit, but it never did (at
least that I saw).

My sound works great.  My only problem is that the settings I apply to
the Gnome volume control applet don't persist across reboots (although
they do across restarts of X).

I'm guessing there is some alsa-something that just needs to be
reconfigured.  Anyone have a pointer for me?
   


wouldn't just running alsamixer and setting the desired levels solve
this problem?

i recall having the same issue and after installing alsamixer and
running it i don't have the problem any more...
 



I tried exactly this in the past.  Still didn't keep my settings.  
Although I noticed that the Gnome volume control accurately reflected 
the changes I made via alsamixer (before reboot, that is).


Thanks,
Rick Reynolds
--
He who breaks a thing to find out what it is, has left the path of 
wisdom. -- Gandalf



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: sound volume not persistent between reboots

2006-04-11 Thread Rick Reynolds

Kim Christensen wrote:


On 4/11/06, Rick Reynolds [EMAIL PROTECTED] wrote:
 


A few topics similar to this have been recently discussed, and I was
waiting for this particular question to be hit, but it never did (at
least that I saw).

My sound works great.  My only problem is that the settings I apply to
the Gnome volume control applet don't persist across reboots (although
they do across restarts of X).

I'm guessing there is some alsa-something that just needs to be
reconfigured.  Anyone have a pointer for me?
   



What you're looking for is probably alsactl, which allows you to read
and store settings for your soundcard in different configuration
files.
 



Yes, that tool is installed, and I see that it is called from 
/etc/init.d/alsa-utils.


I'm hoping to just tweak whatever is necessary to make this just work 
in the way that it should (via proper config of packages).  I could 
probably hack in my own controlling scripts, but I'd rather get the init 
infrastructure that is already in there working properly.


Thanks,
Rick Reynolds
--
Outside of a dog, a book is man's best friend.  Inside of a dog, it's 
too dark to read. -- Groucho Marx



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: sound volume not persistent between reboots

2006-04-11 Thread Liam O'Toole
On Tue, 11 Apr 2006 10:50:02 -0400
Rick Reynolds [EMAIL PROTECTED] wrote:

 Liam O'Toole wrote:
 
 On Tue, 11 Apr 2006 10:29:48 -0400
 Rick Reynolds [EMAIL PROTECTED] wrote:
   
 
 My sound works great.  My only problem is that the settings I apply
 to the Gnome volume control applet don't persist across reboots
 (although they do across restarts of X).
 
 
 The alsa-utils package provides the script /etc/init.d/alsa-utils for
 this purpose.
   
 
 
 Checking...
 
 Yes, that script is there.  And it is pointed to by 
 /etc/init.d/rcS.d/S50alsa-utils.

I think that should be '/etc/rcS.d/S50alsa-utils'.

 
 I see that it wants access to
 
 -rw-r--r--  1 root root 7668 2006-03-24
 06:59 /var/lib/alsa/asound.state
 
 which is there and rw by root. 
 
 Didn't see anything about alsa in /var/log/messages
 or /var/log/syslog.
 
 I see this in my boot log:
 
 Tue Apr 11 07:58:32 2006: Usage: /etc/init.d/alsa 
 {unload|reload|force-unload|force-reload|suspend|resume}
 Tue Apr 11 07:58:32 2006: ALSA driver is already running.
 
 which indicates that maybe something isn't sending the right
 parameter to /etc/init.d/alsa, but that isn't alsa-utils so I'm not
 sure how significant that is.
 
 Not sure what to check next.
 
 Thanks,
 Rick Reynolds

What happens if you manually invoke '/etc/init.d/alsa-utils start'? Do
you now have the required volume?

-- 

Liam


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: sound volume not persistent between reboots

2006-04-11 Thread Rick Reynolds



Checking...

Yes, that script is there.  And it is pointed to by 
/etc/init.d/rcS.d/S50alsa-utils.
   



I think that should be '/etc/rcS.d/S50alsa-utils'.
 



Oops.  You're right, of course

more snip


What happens if you manually invoke '/etc/init.d/alsa-utils start'? Do
you now have the required volume?



Yes, indeed!  So the plumbing is all there, it just isn't getting fired 
up correctly on boot and/or shutdown.  Actually, this test probably 
indicates that the problem is at boot since there were settings there 
for the script to pick up (presumably placed there on shutdown).


Interestingly enough, the output I get when running alsa-utils is:

Setting up ALSA...done.

I see that in my boot log 27 lines above where it gives the error about 
/etc/init.d/alsa being called incorrectly.  I wonder if it is doing the 
right thing, but then later undoing it because of the bad call to the 
other alsa script.  Should both of these be getting called?


Maybe I should remove the symlinks to /etc/init.d/alsa and see what 
happens since alsa-util is already getting called earlier.  Any thoughts?


There are two links to alsa scripts in the /etc/rc2.d dir:  alsa and 
alsasound.  Plus the call to alsa-util from /etc/rcS.d makes three.  I'm 
really starting to wonder if all three of these are meant to be called 
at startup.


Thanks,
Rick Reynolds
--
Think like a man of action, act like a man of thought -- Henry Bergson


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: sound volume not persistent between reboots

2006-04-11 Thread Liam O'Toole
On Tue, 11 Apr 2006 11:23:44 -0400
Rick Reynolds [EMAIL PROTECTED] wrote:

SNIP

 
 Maybe I should remove the symlinks to /etc/init.d/alsa and see what 
 happens since alsa-util is already getting called earlier.  Any
 thoughts?
 
 There are two links to alsa scripts in the /etc/rc2.d dir:  alsa and 
 alsasound.  Plus the call to alsa-util from /etc/rcS.d makes three.
 I'm really starting to wonder if all three of these are meant to be
 called at startup.
 
 Thanks,
 Rick Reynolds

The following is from /etc/init.d/alsa:

# There is no longer any need to run this script on bootup or shutdown.
# It must remain in /etc/init.d/ for now, though, because certain
# other scripts expect to find it there.

So yes, I would remove the symlinks to it. I don't know about the
alsasound script. What package does it belong to?

-- 

Liam


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: sound volume not persistent between reboots

2006-04-11 Thread Rick Reynolds

Liam O'Toole wrote:


On Tue, 11 Apr 2006 11:23:44 -0400
Rick Reynolds [EMAIL PROTECTED] wrote:

SNIP

 

Maybe I should remove the symlinks to /etc/init.d/alsa and see what 
happens since alsa-util is already getting called earlier.  Any

thoughts?

There are two links to alsa scripts in the /etc/rc2.d dir:  alsa and 
alsasound.  Plus the call to alsa-util from /etc/rcS.d makes three.

I'm really starting to wonder if all three of these are meant to be
called at startup.

Thanks,
Rick Reynolds
   



The following is from /etc/init.d/alsa:

# There is no longer any need to run this script on bootup or shutdown.
# It must remain in /etc/init.d/ for now, though, because certain
# other scripts expect to find it there.
 



Duh.  I could have (and *should* have) seen that.  Thanks.


So yes, I would remove the symlinks to it. I don't know about the
alsasound script. What package does it belong to?
 



Interestingly:

Tue 12:35pm [/etc/init.d] (547)# dpkg -S alsasound
dpkg: *alsasound* not found.
Tue 12:36pm [/etc/init.d] (548)# dpkg -S /etc/init.d/alsasound
dpkg: /etc/init.d/alsasound not found.

maybe it's cruft from something removed.  I've removed the symlink to it 
in rc2.d anyway.  Hopefully this will fix the issue.  Not able to reboot 
at the moment to check (system in use here at work), but I will know by 
tomorrow.


Thanks,
Rick Reynolds
--
Do not meddle in the affairs of Wizards, for they are subtle and quick 
to anger. -- J. R. R. Tolkien





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: sound volume not persistent between reboots

2006-04-11 Thread Sumo Wrestler (or just ate too much)

Rick Reynolds wrote:

[...]
I see that in my boot log [...]


What is the boot log? I'm using Sarge, and I don't see a 
/var/log/boot.log or anything similar.





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: sound volume not persistent between reboots

2006-04-11 Thread Lubos Vrbka
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160


 wouldn't just running alsamixer and setting the desired levels solve
 this problem?
 I tried exactly this in the past.  Still didn't keep my settings. 
 Although I noticed that the Gnome volume control accurately reflected
 the changes I made via alsamixer (before reboot, that is).
one more thing that comes to my mind. i recall seeing something like
'previous alsa settings found. will not touch mixer'
during the boot process - however, i'm not sure whether it went to
/var/log/messages or /var/log/bootlog. also, i don't have access to my
box at the moment, so i cannot check what the exact form of the message
is (i'm pretty sure that the 'will not touch mixer' is there) and when
is it issued. i'll try to check it out tomorrow.

maybe this is directly related to your problem? do you see something
like that during the boot?

also, as a last resort, maybe purging and re-installing alsa would help
- - that might however require removal of too many packages - i don't
know...

regards,

- --
Lubos
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (MingW32)

iD8DBQFEPAK+5EqL/d2IfcARA4nXAJ9pJfzmCWKEAHymKamvCHH2nB86mgCgjDRu
rY//kQ7nRWLomLPkOICkySQ=
=06A4
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: sound volume not persistent between reboots

2006-04-11 Thread Lubos Vrbka
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

Sumo Wrestler (or just ate too much) napsal(a):
 Rick Reynolds wrote:
 [...]
 I see that in my boot log [...]
 
 What is the boot log? I'm using Sarge, and I don't see a
 /var/log/boot.log or anything similar.
that's output of the boot process after init is started, iirc. sometimes
this file can contain things that are emitted to the console but not
written to /var/log/messages.

you can enable it in
/etc/defaults/bootlogd.

regards,

- --
Lubos
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (MingW32)

iD8DBQFEPAO15EqL/d2IfcARA6qmAKCKJz0uU1EqXPLPl1qEJzbVLrmQWgCcCNlD
QAN/iH7ydPb9Sg+eVxVOzds=
=1mBz
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: sound volume not persistent between reboots

2006-04-11 Thread Rick Reynolds


wouldn't just running alsamixer and setting the desired levels solve
this problem?

I tried exactly this in the past.  Still didn't keep my settings.
Although I noticed that the Gnome volume control accurately reflected
the changes I made via alsamixer (before reboot, that is).

one more thing that comes to my mind. i recall seeing something like
'previous alsa settings found. will not touch mixer'
during the boot process - however, i'm not sure whether it went to
/var/log/messages or /var/log/bootlog. also, i don't have access to my
box at the moment, so i cannot check what the exact form of the message
is (i'm pretty sure that the 'will not touch mixer' is there) and when
is it issued. i'll try to check it out tomorrow.

maybe this is directly related to your problem? do you see something
like that during the boot?

also, as a last resort, maybe purging and re-installing alsa would help
- - that might however require removal of too many packages - i don't
know...


Funny you mention that.  I reboot the machine (after taking out the 
other two alsa links) and that's the message I see -- it wasn't there 
before:


Saved ALSA mixer settings detected; aumix will not touch mixer.

But it still doesn't come back with the volume settings restored.

I'll keep hunting...

Thanks,
Rick Reynolds
--
He who breaks a thing to find out what it is, has left the path of 
wisdom. -- Gandalf



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: sound volume not persistent between reboots

2006-04-11 Thread Kim Christensen
On 4/11/06, Rick Reynolds [EMAIL PROTECTED] wrote:
 A few topics similar to this have been recently discussed, and I was
 waiting for this particular question to be hit, but it never did (at
 least that I saw).

 My sound works great.  My only problem is that the settings I apply to
 the Gnome volume control applet don't persist across reboots (although
 they do across restarts of X).

 I'm guessing there is some alsa-something that just needs to be
 reconfigured.  Anyone have a pointer for me?

What you're looking for is probably alsactl, which allows you to read
and store settings for your soundcard in different configuration
files.

--
Kim Christensen