Red Hat Bugzilla – Bug 462337
Update of udev/unmute rules is completely broken
Last modified: 2014-03-16 23:15:47 EDT
Description of problem:
1) ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", \
RUN+="/sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/lib/alsa/init/00main restore $name"
The alsa init scripts are in /lib64/alsa... on x86_64 and other lib64 architectures, so it doesn't run at all.
2) moved /etc/alsa/asound.state back to /etc/asound.state
All this does is completely break any existing configuration with stored
volumes - you just get the defaults now.
3) You removed /sbin/salsa... which other scripts actually call.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
2. Wait for unmute/volume restore
Doesn't happen, or restores wrongly.
Ad 3) Which scripts uses /sbin/salsa (except udev rules)? Thanks.
/etc/init.d/halt - mainly to insulate itself from underlying alsa file changes, etc.
The alsa-utils-1.0.18-3.rc3 package should fix issues 1 and 2. I uploaded a patch for /etc/rc.d/init.d/halt script in bug#462677. I don't think that we need longer the salsa utility. alsactl contains all necessary functionality now.
I've tried this - while it moves asound.state to a new location, it doesn't actually read it. It only sets default values.
Also, I believe the reason that /etc/alsa was used was for SELinux - Dan?
Running 'alsactl restore' by hand seems to DTRT, though.
*** Bug 463043 has been marked as a duplicate of this bug. ***
It is much easier to maintain the file context on /etc/alsa/ then trying to make sure it is correct in the /etc directory.
*** Bug 463030 has been marked as a duplicate of this bug. ***
Which one has been depracated /sbin/salsa or /sbin/alsactl?
It appears that salsa.
[olivares@localhost ~]$ which alsactl
[olivares@localhost ~]$ which salsa
/usr/bin/which: no salsa in (/usr/lib/qt4/bin:/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/libexec/sdcc:/home/olivares/bin:/usr/local/bin/:/usr/libexec/sdcc)
Thanks for posting this.
I was having issues due to this to, I can confirm that alsa-utils-1.0.18-3.rc3 fixes things to where atleast the soundcard gets unmuted at startup and adding the patch from bug#462677 also fixes sound volume save / restore.
This is with selinux targeted enforcing, so appearantly the /etc/alsa/asound.state -> /etc/asound.state move does not cause any selinux problems atleast not with the targeted policy.
I would like to suggest to make the new alsa-utils-1.0.18-3.rc3 part of the beta (request tagging it into the beta to rel-eng) and maybe also the initscript fix, if we do not fix atleast the not unmuting on x86_64 issue we are bound to get lots of unnecessary bug reports about this from people trying the beta.
To comment#4 - it's not necessary to read the configuration (I assume that user have booted system properly using old tools so the actual configuration is stored in the driver). Of course, if you had a reboot "broken" version of packages, you need to restore configuration manually.
To comment#7 - I think that it's better to leave common files in the same place as upstream packages do. Users get confused when some howtos refers /etc/asound.conf or /etc/asound.state and RH packages have this location different. I left /etc/alsa/ directory for RH and user specific configuration.
To comment#9 - salsa (redhat specific) utility was removed.
*** Bug 464005 has been marked as a duplicate of this bug. ***
(In reply to comment #11)
> To comment#4 - it's not necessary to read the configuration (I assume that user
> have booted system properly using old tools so the actual configuration is
> stored in the driver). Of course, if you had a reboot "broken" version of
> packages, you need to restore configuration manually.
What do you mean 'properly'? If the previous configuration was moved from /etc/alsa/asound.state to /etc/asound.state, it is still read incorrectly.
To be blunt:
The default udev rules ignore saved /etc/asound.state completely. Running 'alsactl restore' by hand works.
Bill, does command '/sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/lib/alsa/init/00main restore /dev/snd/controlC0' work for you?
This command should be called from udevd.
With the prior saved configuration that the alsa-utils update moved into place, no.
With a newly saved configuration, yes.
Did we change the format of the save file as well?
I'm not aware of any format change. Please, could you upload old state file (/etc/alsa/asound.state) and new working state file (/etc/asound.state) for comparison? Thanks.
I don't have the old file, unfortunately; it gets overwritten when you do a 'store'. I'll close this and reopen if it persists.