[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ALSA not loading at system boot

Florian Kulzer escreveu:
On Wed, Nov 05, 2008 at 20:42:19 -0200, Vinicius Massuchetto wrote:
Forwarded message from Vinicius Massuchetto:
Florian Kulzer escreveu:
On Tue, Nov 04, 2008 at 12:30:28 -0200, Vinicius Massuchetto wrote:


Every time I boot my Debian Sid box I don't have sound until running 'alsaconf'.

Well, here we go, again:
I've just rebooted my system.

# vinicius@vinicius:~$ lsmod | grep snd
# snd_hda_intel         434776  0
# snd_pcm                81672  1 snd_hda_intel
# snd_seq                54304  0
# snd_timer              25744  2 snd_pcm,snd_seq
# snd_seq_device         11668  1 snd_seq
# snd 63688 5 snd_hda_intel,snd_pcm,snd_seq,snd_timer,snd_seq_device
# soundcore              12064  1 snd
# snd_page_alloc         13072  2 snd_hda_intel,snd_pcm

My driver is the snd_hda_intel for this soundcard here:

# vinicius@vinicius:~$ lspci | grep -i audio
# 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)

[ snip: The mixer settings are absolutely identical before and after
  running alsaconf. ]


vinicius@vinicius:~$ cat /dev/sndstat
Sound Driver:3.8.1a-980706 (ALSA v1.0.16 emulation code)
Kernel: Linux vinicius 2.6.26-1-amd64 #1 SMP Sat Oct 18 15:27:18 UTC 2008 x86_64
Config options: 0
Installed drivers:
Type 10: ALSA emulation
Card config:
HDA Intel at 0xfebfc000 irq 21
7: system timer

There's a lot of "NOT ENABLED IN CONFIG" in this output. I guess this might mean something.

This is certainly related to the problem. I have never seen "NOT ENABLED
IN CONFIG" for the audio devices. I think this means that the hardware
is not detected properly. (My guess would be that this message is
different after you run alsaconf, at least for audio.)

cat /proc/asound/cards
vinicius@vinicius:~$ cat /proc/asound/cards
 0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xfebfc000 irq 21

It does not seem that the problem is due to multiple recognized cards
and changes in their order.

grep ^Codec /proc/asound/card?/codec*
vinicius@vinicius:~$ grep ^Codec /proc/asound/card?/codec*
/proc/asound/card0/codec#0:Codec: SigmaTel STAC9228
/proc/asound/card0/codec#1:Codec: Conexant ID 2c06

Hmm, one card with two codecs; I cannot find any information about the
Conexant one in ALSA-Configuration.txt. If I google "SigmaTel STAC9228
Conexant ID 2c06" then I find some discussions about problems on
(ed)ubuntu forums, which were resolved by installing a newer version of
alsa. (They mention kernel 2.6.24; with a fully up-to-date Sid you
should have kernel 2.6.26.)

grep '.*' /sys/module/snd_hda_intel/parameters/*
vinicius@vinicius:~$ grep '.*' /sys/module/snd_hda_intel/parameters/*

It would furthermore be interesting to know if the output of the last
one (the module parameters) changes after you run alsaconf.
There's no difference between both outputs as well.

So the difference is not due to a change of module parameters ("model"
is often good candidate, but it remains the same in your case). I am
beginning to suspect that there is a bug that requires the modules to be
loaded later than they normally are in the boot process. (One of the
main things that alsaconf does is unload the sound modules and load them
again.) When I look at the diff output of lsmod that you posted in
another mail, I see that the same modules were loaded again, but some of
the "Used by" numbers changed. I propose that you try this (as root)
after boot:

modprobe -r snd_hda_intel snd_pcm_oss snd_seq
modprobe snd_hda_intel
modprobe snd_pcm_oss

Well, just after boot that did the job.

> to see if merely unloading and reloading the modules is enough to get
> your sound working. (If it works then I would simply put this sequence
> of commands into /etc/rc.local and hope that this workaround will be
> obsoleted by some future alsa upgrade.)

Then I've copied those lines to /etc/rc.local, and everything is working good! Thanks man, that was really helpful, even more than the ALSA community itself.

Just don't seem right to me to load-unload-load something to fix it. Perhaps I don't want to deal with this bug anymore. It has been annoying me since I bought this laptop and once I have a workaround that will do.

Thanks Again!

Reply to: