Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 258413 - alsa-utils init script alsasound fails unloading modules and hangs at shutdown
Summary: alsa-utils init script alsasound fails unloading modules and hangs at shutdown
Status: RESOLVED DUPLICATE of bug 253535
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-10 07:22 UTC by Florian Mickler
Modified: 2009-02-10 07:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Mickler 2009-02-10 07:22:26 UTC
With newest kernel the module snd_hda_intel isn't listed in the used-by snd_hda_codec_analog lsmod row and therefore the initscript hangs with rmmod --wait at snd_hda_codec_analog.

this is a general issue with dynamic module dependancies not listed with ''lsmod''.

correct solution is to 
1. don't unload modules at shutdown-time
2. do a while loop unloading the snd_ modules with refcount 0 until there are no more unused snd_ modules left. (this removes all modules)



Reproducible: Always

Steps to Reproduce:
1. /etc/alsasound stop with snd_hda_intel module and snd_hda_codec_analog loaded (kernel 2.6.29-rc1+)

Actual Results:  
the script hangs at "rmmod --wait snd_hda_codec_analog" 

this is especially fatal, as the modules are unloaded at shutdown-time and so the laptop doesn't shutdown anymore...

Expected Results:  
unloading using the static module dependancies is broken, instead begin with unloading unused modules

suse initscript does this (it works):

  mod=$(grep -m1 -E '^(snd[^ ]*|ac97_bus) [0-9]+ 0' /proc/modules)
  while [ -n "$mod" ]; do
      mod=${mod%% *}
      /sbin/modprobe -r $mod
      mod=$(grep -m1 -E '^(snd[^ ]*|ac97_bus) [0-9]+ 0' /proc/modules)
  done
Comment 1 Florian Mickler 2009-02-10 07:32:53 UTC
never mind, i just emerge --sync'd and saw in the changelog that it already got adressed... somehow :)

i hope the modules get loaded anyway with the new changes? but i guess i will see...

thx,


*** This bug has been marked as a duplicate of bug 253535 ***