I have an iBook G4 with a snd_aoa_codec_tas as Alsa driver. The unloading of this driver prevents my shutdown to finish. I tracked it down by issueing the command myself. /sbin/rmmod --wait snd_aoa_codec_tas seems to be the 'bugger'. No I don't see why the driver should be removed anyway, but this is probably a bug in Alsa. Reproducible: Always Steps to Reproduce: 1. shutdown / restart the system 2. 'hangs' 1. /etc/init.d/alsasound stop 2. waits for the rmmod Actual Results: rmmod fails. Expected Results: Report an error, or ignore it.
What's your media-sound/alsa-utils version? Try with media-sound/alsa-utils-1.0.14_rc2-r2 if you don't have installed that already.
That version is installed. But I use the in kernel (vanilla 2.6.20.1) alsadrivers. I'll upgrade to 2.6.20.2 and check if with the alsa-driver package the problem returns.
I finally managed to use the lastest alsa-drivers. Same problem for snd_aoa_codec_tas.
check .21 [ALSA] alsa core: add struct device pointer to struct snd_pcm [ALSA] aoa: set device pointer in pcms [ALSA] aoa: fix up i2sbus_attach_codec [ALSA] alsa core: convert to list_for_each_entry* [ALSA] snd-aoa: fix onyx resume [ALSA] aoa: remove suspend/resume printks Probably those fixes should be backported on .20..
(In reply to comment #4) > check .21 I'll give it a shot. I hope they fixed the endian problems in OSS emulation too. I think that sucks even more in the last versions.
On IRC, Luca deduced that this appears to be a problem with the alsasound init script unloading modules in the wrong order. We need to revisit how that should work.
(In reply to comment #6) > On IRC, Luca deduced that this appears to be a problem with the alsasound init > script unloading modules in the wrong order. We need to revisit how that should > work. Is this a question to test in which sequence I can cleanly modprobe -r the alsa modules? Or are you able to reproduce the problem yourself?
You have to rmmod snd_aoa_fabric_layout first, then also snd_aoa_codec_tas can be removed. The problem seems to be, that the function unload_modules_recursive() in /etc/init.d/alsasound assumes, that all dependent modules are listed in the output of lsmod. But in this case, there are no dependent modules listed: magnum@ibookx ~ $ lsmod | grep ^snd snd_pcm_oss 49472 0 snd_mixer_oss 18464 1 snd_pcm_oss snd_aoa_codec_tas 13632 2 snd_aoa_fabric_layout 12552 0 snd_aoa 17664 2 snd_aoa_codec_tas,snd_aoa_fabric_layout snd_aoa_i2sbus 21476 1 snd_pcm 85444 2 snd_pcm_oss,snd_aoa_i2sbus snd_timer 22372 1 snd_pcm snd_page_alloc 8936 1 snd_pcm snd 60916 8 snd_pcm_oss,snd_mixer_oss,snd_aoa_codec_tas,snd_aoa_fabric_layout,snd_aoa,snd_aoa_i2sbus,snd_pcm,snd_timer snd_aoa_soundbus 6276 2 snd_aoa_fabric_layout,snd_aoa_i2sbus snd_aoa_codec_tas is listed without dependent modules here. In /proc/modules the line looks like this: "snd_aoa_codec_tas 13632 2 - Live 0xf2452000". I don't know what the "Live ..." means.
*** Bug 199642 has been marked as a duplicate of this bug. ***
Changing summary to something more generic... plus btw, not really sure what's the point of trying to unload the modules at all.
*** Bug 201109 has been marked as a duplicate of this bug. ***
In alsa-utils-1.0.16-rc1 you will now be able to specify UNLOAD_ON_STOP="no" in /etc/conf.d/alsa
Please confirm that this fixes the bug you reported.
I reported one of the duplicates for this bug and would like to comment that no, preventing unloading does definitely not solve the bug. It solves one of the most annoying symptoms (machine locking on shutdown), but doesn't really solve the problem there. For instance, someone in the forums noticed that "/etc/init.d/alsa reload" doesn't do what it should when the modules aren't really unloaded.
(In reply to comment #13) > Please confirm that this fixes the bug you reported. > setting UNLOAD_ON_STOP="no" in /etc/conf.d/alsa works for me
I have a fixed /etc/init.d/alsasound for this (diff against media-sound/alsa-utils). With the fix, all modules are unloaded properly as long as there are modules from sound that have 0 dependencies left.
Created attachment 189127 [details, diff] new module unloading routine for kernel 2.6 in /etc/init.d/alsasound Bug should be reopened and this should be used as a fix. Simply not unloading modules is not the expected behavior as previous posters already noticed.