The /etc/init.d/alsasound script that's part of the alsa-utils package seems to do a number of checks that either aren't necessary or are redundant. For example, the following line returns too many drivers on a 2.6 kernel: DRIVERS="$(modprobe -c | grep snd.* | grep pci: | awk '{ print $3 }' | uniq)" after this line, DRIVERS is set to equal ALL PCI ALSA modules that were compiled. This results in all of the modules loaded even if the hardware isn't present. The older style in a few lines further down looking for snd-card-[digit] makes alot more sense and should probably be the default (unless someone can explain why the current default makes sense) Also, OSS="$(modprobe -l | grep "snd.*oss" | sed -e "s:\/.*\/::" -e "s:\..*::")" results in snd-seq-oss being loaded. However, later on in the script: if [ -f /proc/asound/seq/drivers ] ; then SEQUENCERS="$(cut -d"," -f1 /proc/asound/seq/drivers)" for SEQUENCER in ${SEQUENCERS} do einfo "Loading: ${SEQUENCER}" [ -n "${SEQUENCER}" ] && /sbin/modprobe ${SEQUENCER} done fi This block reloads snd-seq-oss. Why bother doing this additional check? It also seems kind of silly. In order for a sequencer to appear in /proc/asound/seq/drivers, the module must already have been loaded. Why check again to reload it?
*** This bug has been marked as a duplicate of 32045 ***
I'm reopening this because it's not fixed by the "duplicate" bug. The second part of this bug is indeed fixed, but the first part (where all compiled PCI sound card modules get loaded when using a 2.6 kernel) is not addressed by the other bug.
modprobe -c returns your modules.conf, so if that line loads ALL compiled modules, then there is something with your /etc/modules.d/* configuration. What is the output of 'modprove -c'?
err... 'modprobe -c'
From the way I understand it, the 2.6 kernel generates alot of internal aliases for PNP devices. This is the output from modprobe -c | grep snd.* | grep pci: alias pci:v00008086d00002415sv*sd*bc*sc*i* snd_intel8x0 alias pci:v00008086d00002425sv*sd*bc*sc*i* snd_intel8x0 alias pci:v00008086d00002445sv*sd*bc*sc*i* snd_intel8x0 alias pci:v00008086d00002485sv*sd*bc*sc*i* snd_intel8x0 alias pci:v00008086d000024C5sv*sd*bc*sc*i* snd_intel8x0 alias pci:v00008086d000024D5sv*sd*bc*sc*i* snd_intel8x0 alias pci:v00008086d00007195sv*sd*bc*sc*i* snd_intel8x0 alias pci:v00001039d00007012sv*sd*bc*sc*i* snd_intel8x0 alias pci:v000010DEd000001B1sv*sd*bc*sc*i* snd_intel8x0 alias pci:v000010DEd0000006Asv*sd*bc*sc*i* snd_intel8x0 alias pci:v000010DEd000000DAsv*sd*bc*sc*i* snd_intel8x0 alias pci:v00001022d0000746Dsv*sd*bc*sc*i* snd_intel8x0 alias pci:v00001022d00007445sv*sd*bc*sc*i* snd_intel8x0 alias pci:v000010B9d00005455sv*sd*bc*sc*i* snd_intel8x0 alias pci:v00001013d00006005sv*sd*bc*sc*i* snd_cs4281 alias pci:v00005333d0000CA00sv*sd*bc*sc*i* snd_sonicvibes alias pci:v00004005d00004000sv*sd*bc*sc*i* snd_als4000 alias pci:v00001319d00000801sv*sd*bc04sc01i* snd_fm801 alias pci:v000013F6d00000100sv*sd*bc*sc*i* snd_cmipci alias pci:v000013F6d00000101sv*sd*bc*sc*i* snd_cmipci alias pci:v000013F6d00000111sv*sd*bc*sc*i* snd_cmipci alias pci:v000013F6d00000112sv*sd*bc*sc*i* snd_cmipci alias pci:v000010B9d00000111sv*sd*bc*sc*i* snd_cmipci alias pci:v00001073d00000004sv*sd*bc*sc*i* snd_ymfpci alias pci:v00001073d0000000Dsv*sd*bc*sc*i* snd_ymfpci alias pci:v00001073d0000000Asv*sd*bc*sc*i* snd_ymfpci alias pci:v00001073d0000000Csv*sd*bc*sc*i* snd_ymfpci alias pci:v00001073d00000010sv*sd*bc*sc*i* snd_ymfpci alias pci:v00001073d00000012sv*sd*bc*sc*i* snd_ymfpci alias pci:v00001412d00001724sv*sd*bc*sc*i* snd_ice1724 alias pci:v00001412d00001712sv*sd*bc*sc*i* snd_ice1712 alias pci:v000010B9d00005451sv*sd*bc*sc*i* snd_ali5451 alias pci:v000010EEd00003FC0sv*sd*bc*sc*i* snd_rme96 alias pci:v000010EEd00003FC1sv*sd*bc*sc*i* snd_rme96 alias pci:v000010EEd00003FC2sv*sd*bc*sc*i* snd_rme96 alias pci:v000010EEd00003FC3sv*sd*bc*sc*i* snd_rme96 alias pci:v0000EA60d00009896sv*sd*bc*sc*i* snd_rme32 alias pci:v0000EA60d00009898sv*sd*bc*sc*i* snd_rme32 alias pci:v0000EA60d00009897sv*sd*bc*sc*i* snd_rme32 alias pci:v00001285d00000100sv*sd*bc04sc01i* snd_es1968 alias pci:v0000125Dd00001968sv*sd*bc04sc01i* snd_es1968 alias pci:v0000125Dd00001978sv*sd*bc04sc01i* snd_es1968 alias pci:v0000125Dd00001969sv*sd*bc*sc*i* snd_es1938 alias pci:v00001023d00002000sv*sd*bc*sc*i* snd_trident alias pci:v00001023d00002001sv*sd*bc*sc*i* snd_trident alias pci:v00001039d00007018sv*sd*bc*sc*i* snd_trident alias pci:v00001274d00001371sv*sd*bc*sc*i* snd_ens1371 alias pci:v00001274d00005880sv*sd*bc*sc*i* snd_ens1371 alias pci:v00001102d00008938sv*sd*bc*sc*i* snd_ens1371 alias pci:v00001274d00005000sv*sd*bc*sc*i* snd_ens1370 alias pci:v00001013d00006001sv*sd*bc*sc*i* snd_cs46xx alias pci:v00001013d00006003sv*sd*bc*sc*i* snd_cs46xx alias pci:v00001013d00006004sv*sd*bc*sc*i* snd_cs46xx alias pci:v0000125Dd00001988sv*sd*bc04sc01i* snd_maestro3 alias pci:v0000125Dd00001989sv*sd*bc04sc01i* snd_maestro3 alias pci:v0000125Dd00001990sv*sd*bc04sc01i* snd_maestro3 alias pci:v0000125Dd00001992sv*sd*bc04sc01i* snd_maestro3 alias pci:v0000125Dd00001998sv*sd*bc04sc01i* snd_maestro3 alias pci:v0000125Dd00001999sv*sd*bc04sc01i* snd_maestro3 alias pci:v0000125Dd0000199Asv*sd*bc04sc01i* snd_maestro3 alias pci:v0000125Dd0000199Bsv*sd*bc04sc01i* snd_maestro3 alias pci:v0000122Dd000050DCsv*sd*bc*sc*i* snd_azt3328 alias pci:v0000122Dd000080DAsv*sd*bc*sc*i* snd_azt3328 alias pci:v00001102d00000002sv*sd*bc*sc*i* snd_emu10k1 alias pci:v00001102d00000006sv*sd*bc*sc*i* snd_emu10k1 alias pci:v00001102d00000004sv*sd*bc*sc*i* snd_emu10k1 alias pci:v000010B5d0000906Dsv*sd*bc*sc*i* snd_korg1212 alias pci:v00001106d00003058sv*sd*bc*sc*i* snd_via82xx alias pci:v00001106d00003059sv*sd*bc*sc*i* snd_via82xx alias pci:v000010EEd00003FC4sv*sd*bc*sc*i* snd_rme9652 alias pci:v000010EEd00003FC5sv*sd*bc*sc*i* snd_hdsp alias pci:v000010B5d00009050sv*sd*bc*sc*i* snd_vx222 alias pci:v000010B5d00009030sv*sd*bc*sc*i* snd_vx222 alias pci:v000010C8d00008005sv*sd*bc*sc*i* snd_nm256 alias pci:v000010C8d00008006sv*sd*bc*sc*i* snd_nm256 alias symbol:snd_malloc_pci_page snd_page_alloc alias symbol:snd_pcm_lib_preallocate_pci_pages_for_all snd_pcm alias symbol:snd_malloc_pci_pages snd_page_alloc alias symbol:snd_malloc_pci_pages_fallback snd_page_alloc alias symbol:snd_pcm_lib_preallocate_pci_pages snd_pcm alias symbol:snd_free_pci_pages snd_page_alloc
oh yeah, and those lines aren't anywhere in my /etc/modules.d/* or /etc/modules.conf files :). I've been trying to find out where they're generated from. It looks like a nice way of supporting PNP though since the aliases appear to be some sort of pci ID.
actually, it also generates a bonkload of error messages on load here, (bout a screenpage) usually due to dual-loading things. :-/
Spider: dual-loading? Do you have the latest one from CVS (Feb 15th)? If not, please grab it from media-sound/alsa-utils/files. As for the modprobe -c weird output... Can you please post your /etc/modules.conf file? Also, can you try changing the 'modprobe -c's to 'cat /etc/modules.conf's. AFAIK, that's all 'modprobe -c' should do. Can someone with a 2.6 kernel verify that it is not the case?
No, I don't have the latest. (will try soonish) And yes, they differ markedly.
Created attachment 25847 [details] modules.conf This is the plain modules.conf
Created attachment 25848 [details] modprobe-c this is the output of modprobe -c
Created attachment 25850 [details] alsasound init script with cat /etc/modules.conf Is there an option to modprobe to not print out the "Aliases extracted from modules themselves." I don't see one, so I'm changing the 'modprobe -c's to 'cat /etc/modules.conf's in the init script. Please test this out to see if it fixes the 'loading everything' bug... there sound't be any regressions as it just makes that change in the 3 places it's used... --Jeremy
Created attachment 25868 [details] alsasound init script Alright, I've worked through this, and this one should work well with 2.4 and 2.6. Thanks for the modprobe -c Spider. Please test this one out and ignore the previous one I posted...
The new script seems to work pretty well for me. I've tested it on two systems with 2.6.3 with lots of modules compiled. Woo hoo.
yay... one more 2.6-related alsa bug squashed... the init script is now in portage.