View previous topic :: View next topic |
Author |
Message |
Samplay n00b

Joined: 05 Jul 2007 Posts: 18 Location: France
|
Posted: Sat Jul 07, 2007 9:57 pm Post subject: [solved] Alsa - Segfault when starting alsasound |
|
|
Hello everyone !
I got a lot of issues with the installation of ALSA... I have an old soundcard (more than 3 years) and it works and LiveDVD Sabayon. So I could make it work here !
I am working with the kernel 2.6.21-r3.
Here is my kernel config:
Code: | Device Drivers --->
Sound --->
<M> Sound card support
Advanced Linux Sound Architecture --->
<M> Advanced Linux Sound Architecture
<M> Sequencer support
< > Sequencer dummy client
<M> OSS Mixer API
<M> OSS PCM (digital audio) API
[ ] OSS PCM (digital audio) API - Include plugin system
[*] OSS Sequencer API
<M> RTC Timer support
[*] Use RTC as default dequencer timer
[ ] Dynamic device file minor numbers
[*] Support old ALSA API
[ ] Verbose procfs contents
[ ] Verbose printk
[ ] Debug
Generic devices --->
(nothing)
ISA devices --->
(nothing)
PCI devices --->
<M> Intel/SiS/nVidia/AMD/ALi AC97 Controller
[*] AC97 Power-Saving Mode
(nothing else)
USB Devices --->
(nothing)
Open Sound System --->
< > Open Sound System (DEPRECATED) |
I have this soundcard:
Code: | # lspci | grep audio
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 03) |
The system boot is OK when alsa-utils is not installed.
I am following this ALSA guide to install ALSA.
I have alsa and oss for USE flags.
I give you now the last exact way I tried.
I emerged alsa-utils, then ran alsaconf.
alsaconf finds 3 cards > intel8x0 | intel8x0 (another one, don't see the difference) | legacy
I can choose either the first or the second intel8x0 one, I get a segfault when starting /etc/init.d/alsasound (at the end of alsaconf)...
Code: | Running modules-update...
* Please run 'update-modules' from now on; 'modules-update' is going away
* Updating modules.dep ... [ ok ]
Loading driver...
* Loading ALSA modules ...
* Loading: snd-card-0 ... [ ok ]
* Loading: snd-seq-oss ... [ ok ]
* Loading: snd-pcm-oss ...
/etc/init.d/alsasound: line 43: 9796 Segmentation fault modprobe $ [ !! ] |
I tried loads of different kernel configs for Device Drivers ---> Sound, always as modules, I saw different errors.
I also got, when starting alsasound, it told me it couldn't load snd_cmipci module (I have no idea what it is), then some errors when loading necessary modules (Unknown symbol, or something like that, I don't exactly remember)...
I really don't know what else to do... Don't know if the problem is my kernel or something else...
Does anyone have an idea?
Thanks a lot! _________________ Samplay
Last edited by Samplay on Sun Jul 08, 2007 7:02 pm; edited 1 time in total |
|
Back to top |
|
 |
didymos Advocate


Joined: 10 Oct 2005 Posts: 4798 Location: California
|
Posted: Sat Jul 07, 2007 11:05 pm Post subject: |
|
|
Enable this: OSS PCM (digital audio) API - Include plugin system
Could you post /etc/modules.d/alsa? Also, can you manually modprobe the drivers? Just see which one causes the segfault. _________________ Thomas S. Howard |
|
Back to top |
|
 |
Samplay n00b

Joined: 05 Jul 2007 Posts: 18 Location: France
|
Posted: Sun Jul 08, 2007 8:03 am Post subject: |
|
|
didymos wrote: | Enable this: OSS PCM (digital audio) API - Include plugin system |
Enabled.
didymos wrote: | Could you post /etc/modules.d/alsa? |
Code: | alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss
options snd cards_limit=1
alias snd-card-0 snd-intel8x0
alias sound-slot-0 snd-intel8x0 |
didymos wrote: | Also, can you manually modprobe the drivers? Just see which one causes the segfault. |
Here are all the sound modules that are loaded, I absolutely don't know what else alsaconf tries to load:
Code: | # lsmod | grep snd
snd_pcm_oss 35051 1
snd_mixer_oss 14208 1 snd_pcm_oss
snd_seq_oss 27904 0
snd_seq_midi_event 6144 1 snd_seq_oss
snd_seq 43088 4 snd_seq_oss,snd_seq_midi_event
snd_seq_device 6668 3 snd_seq_oss,snd_seq
snd_intel8x0 22940 0
snd_ac97_codec 95012 1 snd_intel8x0
ac97_bus 2176 1 snd_ac97_codec
snd_pcm 60040 3 snd_pcm_oss,snd_intel8x0,snd_ac97_codec
snd_timer 17924 2 snd_seq,snd_pcm
snd 34532 12 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer
soundcore 5728 1 snd
snd_page_alloc 7688 2 snd_intel8x0,snd_pcm |
Thanks!  _________________ Samplay |
|
Back to top |
|
 |
didymos Advocate


Joined: 10 Oct 2005 Posts: 4798 Location: California
|
Posted: Sun Jul 08, 2007 10:25 am Post subject: |
|
|
Have you tested if the card works after manually inserting the modules? (God, that sounds pornographic)
I'm still wondering why it was nattering about snd_cmipci. That's a totally different piece of hardware. Could it have accidentally been enabled in the kernel by a keyboard slip? I'm guessing it isn't, but I can't think of anything better to check. As to the multiple options in alsaconf, I think one might be from having "Support old ALSA API" enabled.
Couple more things. One, post the output of this:
Two: It would be really helpful if you could look in /var/log/messages (or the equivalent if you don't use syslog/syslog-ng) and dmesg (if you haven't rebooted after receiving the errors) for errors from running alsasound: the "Unknown symbol" and others you mentioned, plus anything else you happen to find that's alsa-related.
Once that's all done, then try modifying /etc/modules.d/alsa to this:
Code: |
alias char-major-116 snd
alias char-major-14 soundcore
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss
options snd cards_limit=1
alias snd-card-0 snd-intel8x0
alias sound-slot-0 snd-intel8x0
|
then run "update-modules -v -f". See if you can do /etc/init.d/alsasound after that. Don't forget to run alsamixer and unmute things first. _________________ Thomas S. Howard |
|
Back to top |
|
 |
Samplay n00b

Joined: 05 Jul 2007 Posts: 18 Location: France
|
Posted: Sun Jul 08, 2007 12:46 pm Post subject: |
|
|
I posted the result of lsmod | grep snd like it is after alsaconf took a shot. Here it is after a reboot:
Code: | # lsmod | grep snd
snd_intel8x0 22940 0
snd_ac97_codec 95012 1 snd_intel8x0
ac97_bus 2176 1 snd_ac97_codec
snd_pcm 59016 2 snd_intel8x0,snd_ac97_codec
snd_timer 17924 1 snd_pcm
snd 34532 4 snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer
soundcore 5728 1 snd
snd_page_alloc 7688 2 snd_intel8x0,snd_pcm |
Then, I try to insert manually the others. It is... interesting...
Code: | # modprobe snd_pcm_oss
Segmentation fault
# modprobe snd_mixer_oss
# modprobe snd_seq_oss *
# modprobe snd_seq_midi_event *
# modprobe snd_seq *
# modprobe snd_seq_device *
|
And it freezes on these four last commands. Sometimes, I can't stop it by Ctrl+C, only by closing the terminal, sometimes Ctrl+C is working...
But if I try to insert snd_pcm_oss, it freezes, and doesn't segfault again... So maybe the first one I try to insert is segfaulting, and the others freezing... don't know...
I don't know what else module trying to insert... Currently, any application that is trying to play any sound freezes and needs a kill to stop (firefox on some Flash things, MPlayer when trying to open an mp3 file, totem too ) OR closes (now that I disabled "Support old ALSA API".. don't know if that could be linked).
I looked for snd_cmipci in the kernel, but I don't know what enabled it. And I don't to know what it corresponds to...
I've just tried to disable "Support old ALSA API", I get another error on /etc/init.d/alsasound restart >>
Code: | Running modules-update...
* Please run 'update-modules' from now on; 'modules-update' is going away
* Updating /etc/modprobe.conf by hand ... [ ok ]
* Updating modules.dep ... [ ok ]
Loading driver...
* Loading ALSA modules ...
* Loading: snd-card-0 ... [ ok ]
* Loading: snd-seq-oss ...
| and it freezes... I can only stop it by Ctrl+C
Then, here what you wanted to see:
Code: | # equery list alsa
[ Searching for package 'alsa' in all categories among: ]
* installed packages
[I--] [ ~] media-libs/alsa-lib-1.0.14a-r1 (0)
[I--] [ ~] media-plugins/gst-plugins-alsa-0.10.12 (0.10)
[I--] [ ~] media-sound/alsa-headers-1.0.14 (0)
[I--] [ ~] media-sound/alsa-utils-1.0.14 (0.9) |
Here are the logs relative to "snd" in /var/log/messages for the last reboot:
Code: | Jul 8 14:15:37 Samplay Modules linked in: snd_pcm_oss snd_mixer_oss snd_intel8x0 snd_ac97_codec ac97_bus snd_pcm snd_timer snd soundcore snd_page_alloc ipw2200
Jul 8 14:15:37 Samplay EIP is at snd_info_register+0x75/0x140 [snd]
Jul 8 14:15:37 Samplay [<e0a03889>] snd_pcm_oss_write3+0x1f49/0x2100 [snd_pcm_oss]
Jul 8 14:15:37 Samplay [<e0920b44>] snd_pcm_notify+0xc4/0xe0 [snd_pcm]
Jul 8 14:15:37 Samplay [<e08c40bc>] init_module+0xbc/0xcb [snd_pcm_oss]
Jul 8 14:15:37 Samplay EIP: [<e08dbcc5>] snd_info_register+0x75/0x140 [snd] SS:ESP 0068:d3b7fe14
Jul 8 14:25:15 Samplay Modules linked in: snd_seq_device snd_pcm_oss snd_mixer_oss snd_intel8x0 snd_ac97_codec ac97_bus snd_pcm snd_timer snd soundcore snd_page_alloc ipw2200
Jul 8 14:25:15 Samplay [<e0a05084>] snd_pcm_oss_read3+0x1644/0x1b80 [snd_pcm_oss]
Jul 8 14:25:47 Samplay Modules linked in: snd_seq_device snd_pcm_oss snd_mixer_oss snd_intel8x0 snd_ac97_codec ac97_bus snd_pcm snd_timer snd soundcore snd_page_alloc ipw2200
Jul 8 14:25:47 Samplay EIP is at init_module+0x4ac89/0x4cfe0 [snd_intel8x0]
Jul 8 14:25:47 Samplay [<e090edf6>] init_module+0x4adf6/0x4cfe0 [snd_intel8x0]
Jul 8 14:25:47 Samplay [<e0922b98>] snd_pcm_open_substream+0x48/0x80 [snd_pcm]
Jul 8 14:25:47 Samplay [<e0922cbd>] snd_pcm_open+0xed/0x1b0 [snd_pcm]
Jul 8 14:25:47 Samplay [<e08da4d7>] snd_request_card+0xd7/0x230 [snd]
Jul 8 14:25:47 Samplay EIP: [<e090ec89>] init_module+0x4ac89/0x4cfe0 [snd_intel8x0] SS:ESP 0068:d2ae5e58 |
I also had before (I think when a verbose option was enabled in the kernel:
Code: | Jul 7 20:53:32 Samplay snd_intel8x0: Unknown symbol snd_verbose_printk
Jul 7 20:53:32 Samplay snd_intel8x0: Unknown symbol snd_ac97_update_power
Jul 7 20:53:32 Samplay snd_intel8x0: Unknown symbol snd_verbose_printk
Jul 7 20:53:32 Samplay snd_intel8x0: Unknown symbol snd_ac97_update_power
Jul 7 21:04:00 Samplay snd_seq_oss: Unknown symbol snd_verbose_printk
Jul 7 21:04:00 Samplay snd_pcm_oss: Unknown symbol snd_verbose_printk
Jul 7 21:04:00 Samplay snd_pcm_oss: Unknown symbol snd_verbose_printk
Jul 7 21:05:15 Samplay snd_seq_oss: Unknown symbol snd_verbose_printk
Jul 7 21:05:15 Samplay snd_pcm_oss: Unknown symbol snd_verbose_printk
Jul 7 21:05:15 Samplay snd_pcm_oss: Unknown symbol snd_verbose_printk
Jul 7 22:34:33 Samplay snd_seq_oss: Unknown symbol snd_verbose_printk
Jul 7 22:34:33 Samplay snd_pcm_oss: Unknown symbol snd_verbose_printk
Jul 7 22:34:33 Samplay snd_pcm_oss: Unknown symbol snd_verbose_printk |
But I have nothing relative to cmipci...
Then, I modified /etc/modules.d/alsa following your advice, ran "update-modules -v -f" and got the same problem : freeze on * Loading: snd-seq-oss ...
I really don't understand anything to what is happening...
Thanks again! _________________ Samplay |
|
Back to top |
|
 |
Samplay n00b

Joined: 05 Jul 2007 Posts: 18 Location: France
|
Posted: Sun Jul 08, 2007 5:35 pm Post subject: |
|
|
I might have found why I did have an error with snd_cmipci... I also read this [u=http://gentoo-wiki.com/HOWTO_ALSA_Complete_%28includes_dmix%29]HOWTO[/u].
I might have copy/pasted the /etc/modules.d/alsa from there, for testing, and without thinking of replacing the snd_cmipci by my snd_intel8x0.
But I still have the segfault error on
Code: | * Loading ALSA modules ...
* Loading: snd-seq-oss ... [ ok ]
* Loading: snd-pcm-oss ...
/etc/init.d/alsasound: line 43: 10501 Segmentation Fault modprobe $ [ !! ] |
And after a first segfault, anytime I want to modprobe another snd_xxxxxx module, it doesn't do anything... Only a Ctrl+C seems to do something...
Nothing on the /var/log/messages for this step.
Please, don't let me reinstall from scratch (although that would certainly be simpler... ) _________________ Samplay |
|
Back to top |
|
 |
PaulBredbury Watchman


Joined: 14 Jul 2005 Posts: 7310
|
Posted: Sun Jul 08, 2007 6:01 pm Post subject: |
|
|
"Unknown symbol" again. See wiki article - follow it. |
|
Back to top |
|
 |
Samplay n00b

Joined: 05 Jul 2007 Posts: 18 Location: France
|
Posted: Sun Jul 08, 2007 7:02 pm Post subject: |
|
|
Yahhoooo Yess !! Thanks a lot !!
So, the problem was simply that both modules from my last kernel 2.6.20 and the 2.6.21 one were inserted on boot... So there was a conflict (I think...) !
Thank you very much, I learnt many things about the modules!  _________________ Samplay |
|
Back to top |
|
 |
PaulBredbury Watchman


Joined: 14 Jul 2005 Posts: 7310
|
Posted: Sun Jul 08, 2007 7:06 pm Post subject: |
|
|
Samplay wrote: | both modules from my last kernel 2.6.20 and the 2.6.21 one were inserted on boot |
No. More likely, you didn't recompile the modules after recompiling the kernel. See "uname -r" and look in /lib/modules. |
|
Back to top |
|
 |
Samplay n00b

Joined: 05 Jul 2007 Posts: 18 Location: France
|
Posted: Sun Jul 08, 2007 8:14 pm Post subject: |
|
|
I thought both were inserted because I had each module twice: in /lib/modules/2.6.20-gentoo-r8 and /lib/modules/2.6.21-gentoo-r3
And I thought I recompiled the modules, because I always use the command make && make modules_install when compiling a kernel...
Moreover, before, alsaconf showed me twice the same soundcard. That's why I thought of a conflict...
So, I erased all the modules related to the sound, and repeated then the exact same steps in order to install ALSA. And this last time, it works!
If the problem was not a conflict between all the drivers, what could it be?
Thanks again!  _________________ Samplay |
|
Back to top |
|
 |
PaulBredbury Watchman


Joined: 14 Jul 2005 Posts: 7310
|
Posted: Sun Jul 08, 2007 8:20 pm Post subject: |
|
|
It's not possible for the same module name to be loaded more than once at the same time. And a 2.6.21 kernel will not look in a 2.6.20 /lib/modules subdirectory.
The problem most likely was that you hadn't recompiled the module. So it was only half-suitable for the kernel. It would grudgingly load, but not work properly.
"make && make modules_install" does not compile properly. Stop using such a rubbish command. If a module already exists, it will not be recompiled. And that's what caused your problem.
Code: | find /usr/src/ -name \*.ko |
|
|
Back to top |
|
 |
Samplay n00b

Joined: 05 Jul 2007 Posts: 18 Location: France
|
Posted: Sun Jul 08, 2007 8:33 pm Post subject: |
|
|
I was using make && make modules_install because that is the only way of compiling a kernel that I read.
I found make clean bzImage modules modules_install on the wiki article you indicated.
Thanks for the explanation! _________________ Samplay |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|