Bug 462337

Summary: Update of udev/unmute rules is completely broken
Product: [Fedora] Fedora Reporter: Bill Nottingham <notting>
Component: alsa-utilsAssignee: Jaroslav Kysela <jkysela>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: bgamari, dwalsh, hdegoede, jik, ma, olivares14031, rvokal, stransky, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-09-30 17:17:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 462677    
Bug Blocks: 438943    

Description Bill Nottingham 2008-09-15 14:09:33 UTC
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):

1.0.18-1.rc3

How reproducible:

Every time.

Steps to Reproduce:
1. Reboot
2. Wait for unmute/volume restore
  
Actual results:

Doesn't happen, or restores wrongly.

Expected results:

Works.

Comment 1 Jaroslav Kysela 2008-09-17 07:21:54 UTC
Ad 3) Which scripts uses /sbin/salsa (except udev rules)? Thanks.

Comment 2 Bill Nottingham 2008-09-17 20:55:03 UTC
/etc/init.d/halt - mainly to insulate itself from underlying alsa file changes, etc.

Comment 3 Jaroslav Kysela 2008-09-18 08:49:19 UTC
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.

Comment 4 Bill Nottingham 2008-09-23 17:53:18 UTC
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?

Comment 5 Bill Nottingham 2008-09-23 17:53:42 UTC
Running 'alsactl restore' by hand seems to DTRT, though.

Comment 6 Bill Nottingham 2008-09-23 17:56:13 UTC
*** Bug 463043 has been marked as a duplicate of this bug. ***

Comment 7 Daniel Walsh 2008-09-23 19:19:47 UTC
It is much easier to maintain the file context on /etc/alsa/ then trying to make sure it is correct in the /etc directory.

Comment 8 Bill Nottingham 2008-09-23 22:16:19 UTC
*** Bug 463030 has been marked as a duplicate of this bug. ***

Comment 9 Antonio A. Olivares 2008-09-23 22:34:48 UTC
Which one has been depracated /sbin/salsa or /sbin/alsactl?

It appears that salsa.

[olivares@localhost ~]$ which alsactl
/usr/sbin/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.  

Antonio

Comment 10 Hans de Goede 2008-09-24 09:28:42 UTC
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.

Comment 11 Jaroslav Kysela 2008-09-29 07:04:13 UTC
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.

Comment 12 Jaroslav Kysela 2008-09-29 07:17:28 UTC
*** Bug 464005 has been marked as a duplicate of this bug. ***

Comment 13 Bill Nottingham 2008-09-29 20:14:45 UTC
(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.

Comment 14 Bill Nottingham 2008-09-29 20:19:41 UTC
To be blunt:

The default udev rules ignore saved /etc/asound.state completely. Running 'alsactl restore' by hand works.

Comment 15 Jaroslav Kysela 2008-09-30 09:09:02 UTC
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.

Comment 16 Bill Nottingham 2008-09-30 14:54:44 UTC
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?

Comment 17 Jaroslav Kysela 2008-09-30 16:36:20 UTC
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.

Comment 18 Bill Nottingham 2008-09-30 17:17:38 UTC
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.