Bug 462337 - Update of udev/unmute rules is completely broken
Update of udev/unmute rules is completely broken
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: alsa-utils (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jaroslav Kysela
Fedora Extras Quality Assurance
:
: 463030 463043 464005 (view as bug list)
Depends On: 462677
Blocks: F10Blocker/F10FinalBlocker
  Show dependency treegraph
 
Reported: 2008-09-15 10:09 EDT by Bill Nottingham
Modified: 2014-03-16 23:15 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-30 13:17:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Bill Nottingham 2008-09-15 10:09:33 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):

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 03:21:54 EDT
Ad 3) Which scripts uses /sbin/salsa (except udev rules)? Thanks.
Comment 2 Bill Nottingham 2008-09-17 16:55:03 EDT
/etc/init.d/halt - mainly to insulate itself from underlying alsa file changes, etc.
Comment 3 Jaroslav Kysela 2008-09-18 04:49:19 EDT
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 13:53:18 EDT
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 13:53:42 EDT
Running 'alsactl restore' by hand seems to DTRT, though.
Comment 6 Bill Nottingham 2008-09-23 13:56:13 EDT
*** Bug 463043 has been marked as a duplicate of this bug. ***
Comment 7 Daniel Walsh 2008-09-23 15:19:47 EDT
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 18:16:19 EDT
*** Bug 463030 has been marked as a duplicate of this bug. ***
Comment 9 Antonio A. Olivares 2008-09-23 18:34:48 EDT
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 05:28:42 EDT
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 03:04:13 EDT
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 03:17:28 EDT
*** Bug 464005 has been marked as a duplicate of this bug. ***
Comment 13 Bill Nottingham 2008-09-29 16:14:45 EDT
(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 16:19:41 EDT
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 05:09:02 EDT
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 10:54:44 EDT
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 12:36:20 EDT
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 13:17:38 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.