Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 6985

Summary: Loading Sound Driver Is Halting My Boot Process
Product: Gentoo Linux Reporter: Angel Ortiz <angelm75>
Component: [OLD] UnspecifiedAssignee: Arcady Genkin (RETIRED) <agenkin>
Status: RESOLVED WORKSFORME    
Severity: normal CC: kevin, realdiskdoc, sickness, the_deuce
Priority: High    
Version: 1.2   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Angel Ortiz 2002-08-24 13:22:39 UTC
I do not understand what is wrong. I configured ALSA as per the Gentoo Desktop Instructions. 
Everything was working fine. I had sound, and everything was happily working as it should. Now 
this morning the system will not boot past

Initialising ALSA.....
Loading sound driver: 
snd-ens1371

It gets stuck here. Booting will not go past this. The screen eventually blanks 
out and I can do nothing. I got my Gentoo Install CD, chroot over into my sytem and looked over my 
files everything looked good. I try to reboot. Same error. I chroot in again and I remove alsa 
[emerge unmerge alsa-driver] and boot. My system boots with no problems. I just have no sound. I 
emerged alsa-driver again and configure it per the desktop instructions. My System Boots again no 
issues, and I have sound. Due to some issues with my X server I rebooted and the problem is happening 
again..

Just a few things that I have tried that haven't worked:

I removed from 
/etc/modules.d/alsa

alias snd-card-0 snd-ens1371
alias snd-card-1 snd-ens1371
alias snd-
card-2 snd-ens1371
alias snd-card-3 snd-ens1371
alias snd-card-4 snd-ens1371
alias snd-card-5 
snd-ens1371
alias snd-card-6 snd-ens1371
alias snd-card-7 snd-ens1371

And I uncommented the 
defaults in the config file.

## ALSA portion
## alias snd-card-0 snd-interwave
## alias snd-
card-1 snd-es1371

Rebooted and no go. I tried replacing the alias snd-card snd-ens1371 again 
which worked the last time this happened but it still did not work.

Some further 
info:
Kernel is 2.4.19 (vanilla not Gentoo kernel) compiled with Sound Support but no specific 
card so that I can use the ALSA driver.
ALSA version is 0.90rc2
Comment 1 Diego Righi 2002-08-24 13:55:51 UTC
hi i'm sickness, proud gentoo user!
I've gentoo 1.2 with portage 2.0.27 with alsa 0.9.0_rc2 with kernel
2.4.19-gentoo-r7.
booting after the desktop howto leaved my sistem in an hanged state, I can not
use even the keyboard.
so I rebooted strikeing a lot of CTRL+C *before* the alsasound loading, the
system started, then I rc-update removed alsasound and added snd-ens1371 in
/etc/modules.autoload.
Now the system boots fine, sound works in kde and in winex also with gta3.
If I try to launch /etc/init.d/alsasount start it says it's already loaded.
Comment 2 Angel Ortiz 2002-08-24 14:10:28 UTC
Oops, I misreported my Kernel.  :o  Apologies.  It is 2.4.19-xfs.  I emerged the vanilla kernel and 
applied the xfs patch from ftp://oss.sgi.com/projects/xfs/download/patches/2.4.19.  My 
filesystems are XFS.  /boot is ext2, if that helps shed any light on issues 
Comment 3 Angel Ortiz 2002-08-24 18:50:32 UTC
I have found a work around for now.  Basically I remove alsasound from 
bootup and start it manually.  

rc-update del alsasound boot

I have found that lets my system boot. I can then start alsa by 
/etc/init.d/alsasound start. I then do

modprobe snd-mixer-oss
modprobe snd-pcm-oss
modprobe snd-seq-oss

Ans sound works.  But if I leave alsasound to startup in the boot level it 
freezes the system startup.  System hardlocks.
Comment 4 Angel Ortiz 2002-08-24 19:16:37 UTC
After much forum searching, and googling I found the following on the
http://forums.gentoo.org/viewtopic.php?t=9252&highlight=alsasound site

I had the same problem yesterday and in fact in the alsasound script locks linux
when it does "alsactl -f /etc/asound.conf restore" to restore the mixer settings.
It will completely lock the kernel if you execute this command in a shell, so
until things get fixed i would recommend to comment this section in the
alsasound script

I made the change to the script and my system did not lock.  Maybe this can be
fixed in the ebuild?  Or should I just wait for the next release?  I noticed
that alsa-driver-0.9.0rc3 was released yesterday.  
Comment 5 Arcady Genkin (RETIRED) gentoo-dev 2002-09-01 15:08:21 UTC
Angel:  for alsa 0.9 the sound card state is saved in /etc/asound.state,  not
/etc/asound.conf.  You probably have the asaound.conf from the version 0.5,
right?  Could you delete that file and see whether

  alsactl restore

would still hang your system?  It definitely doesn't hang mine.  Also, could you
both please post the output of the following command:

  qpkg -I -v | grep alsa

(provided you have app-admin/gentoolkit installed).
Comment 6 Angel Ortiz 2002-09-01 19:37:37 UTC
As Requested:

qpkg -I -v | grep alsa
media-sound/alsa-tools-0.9.0_rc1-r1 *
media-sound/alsa-xmms-0.9-r1 *
media-sound/alsa-utils-0.9.0_rc2 *
media-sound/alsa-driver-0.9.0_rc2 *
media-libs/alsa-lib-0.9.0_rc2 *
media-libs/alsa-oss-0.9.0_rc1 *

I changed the /etc/init.d/alsasound file as per another workaround that I 
dound on the Gentoo Forums.  I made the following changes 

# restore driver settings
  #
  if [ -d /proc/asound ]; then
    if [ ! -r $asoundcfg ]; then
      ewarn "No mixer config in $asoundcfg, you have to unmute your card!"
    else
      if [ -x $alsactl ]; then
#        $alsactl -f $asoundcfg restore
# next section is a work around to enable sound
        eerror "Sound Level Restorer disable because of system hang problem!"
        amixer set Master 100 unmute
        amixer set PCM 100 unmute
# end of workaround
     else
        eerror -e "ERROR: alsactl not found!"
      fi
    fi
  fi
Comment 7 Angel Ortiz 2002-09-02 03:16:25 UTC
Arcady I searched my system for aasound.conf.  It was not found anywhere on my
system.  After your post I unmerged alsa and I removed all configs and scripts
related to alsa.  I then emerge rsync and emerge alsa-driver again.  I made sure
that I had sound settings saved and rebooted.  At first the system did not hang.
 It booted right up and restored settings.  I thought that the problem was
solved.  It happened again after I shutdown the system overnight  I removed
alsasound from boot and rebooted.  I saved my sound settings again using
alsamixer, and I rebooted again and the system worked fine.  It seems to be
happening when the system comes up after a cold start.  
Here is the output of the qpkg now that I re-emerged the alsa-driver.

qpkg -I -v | grep alsa
media-sound/alsa-tools-0.9.0_rc1-r1 *
media-sound/alsa-xmms-0.9-r1 *
media-sound/alsa-utils-0.9.0_rc2 *
media-sound/alsa-driver-0.9.0_rc2 *
media-libs/alsa-lib-0.9.0_rc2 *
media-libs/alsa-oss-0.9.0_rc1 *

I guess an inventory of my hardware would help so here goes :)

ASUS A7V133 mobo HD attached to on board Promise ATA 100 
AMD Thunderbird 1000Mhz proc
512 MB crucial ram
Creative Annihilator Ultra (Geforce 2 GTS Ultra)
Intel Pro 100 B NIC
Creative Ensoniq  ES 1371
Western Digital ATA 100 HD
Comment 8 Angel Ortiz 2002-09-06 12:34:14 UTC
Well I think that whatever little gremlin was inhabiting my computer has left
for greener pastures.  Since I updated this report on Monday I have not had one
problem with my bootup.  The alsasound has been behaving itself.  4 solid days
of no problems :)  I shutdown the PC everynight.  Every afternoon it has been
booting up with no problems.  I believe that this bug report can be closed. 

I wish that I could provide more detail as to what fixed the problem.  It seems
like a bug that fixed itself :o  
Comment 9 Arcady Genkin (RETIRED) gentoo-dev 2002-09-06 15:26:56 UTC
Heh, why can't all bugs be like that. ;^)
Comment 10 Arcady Genkin (RETIRED) gentoo-dev 2002-09-21 16:12:54 UTC
Reopening this bug.  Below is an email I received from Ryan Nielsen
<ryan.nielsen@colorado.edu>.

Bug #6985, concerning ALSA freezing the computer when
/etc/init.d/alsasound starts needs to be reopened... I'm currently
experiencing the bug. ;->

Unfortunately, this does seem to be a very random bug. For a week or so
after I loaded gentoo x86 1.2 onto my computer everything concerning ALSA
worked fine. Then, maybe after a kernel build or alsa upgrade, it started
freezing my computer.

Some info:

    * Gentoo 1.2 x86

    * Linux irken 2.4.19-gentoo-r7 #10 SMP Wed Sep 18 21:14:55 MDT 2002
    i686 GenuineIntel
    (NOTE: My computer is a uniproc machine... I have SMP support due to
    some build problems when I attempted to remove support. I was too
    lazy/busy at the time to find the problem so I just reenabled it.)

    * Sound works just fine without the script (alsasound) executing at
    boot or default init time. I simply have to restore mixer settings.

    * I don't have a /etc/asound.conf and I have tried removing
    /etc/asound.state and running 'alsactl restore'. alsactl returns "No
    state is present for card card0" and *does NOT* freeze my system. I
    have yet to try rebooting after removing asound.state though. Maybe
    that was corrupt or something...

    * qpkg -I -v | grep alsa
	media-libs/alsa-lib-0.9.0_rc2 *
	media-sound/alsa-tools-0.9.0_rc1-r1 *
	media-sound/alsa-xmms-0.9-r1 *
	media-sound/alsa-driver-0.9.0_rc2 *
	media-sound/alsa-utils-0.9.0_rc2 *

    * Maybe useful specs:
	Abit BX133 w/ 600 MHz PIII
	512 MB RAM
	Creative LIVE Value
	ASUS GeForce 256

Feel free to copy this to the bug. I registered on bugzilla but I don't
have permissions to reopen the bug -- I can only confirm.

Thanks,
Ryan Nielsen
Comment 11 Angel Ortiz 2002-09-30 23:34:36 UTC
I actually just upgraded to Gentoo 1.4_rc1 and the little gremlin came back.  
I am halting again at that point too on my system.  I am at work now but just 
wanted to point out that it is now happening on a gcc3.2 system as well.  I 
will post the output of qpkg -I -v | grep alsa when I get home later.  
Comment 12 Ryan Nielsen 2002-10-01 00:39:15 UTC
Well, I just upgraded my kernel from gentoo-sources-2.4.19-r7 to
gentoo-sources-2.4.19-r9 and the problem went away. I believe that it might have
something to do with the low-latency patches that were present in the r7 kernel
but appear to be missing in r9 (well, I can't build low latency support at
least). Unfortunately, I cannot test this without going back to r7 which I can't
do for at least a week or so. Maybe Angel Ortiz can corroborate this hunch
without me having to downgrade. ;->

Also of note, vmware was extremely unstable on the r7 kernel but runs as smooth
as glass on r9. Again, the only signifigant difference that I know exists
between the kernels is the lack of low latency patches in r9 (maybe there were
some other large changes).
Comment 13 Angel Ortiz 2002-10-01 00:58:57 UTC
I'll give it a try when I get home.  I don't use the Gentoo sources kernel.  I 
think it is too heavily patched for my tastes.  I have a Vanilla kernel that I 
patched myself with SGI's XFS.  Nothing else in there.  :)  

I'll try the gentoo sources r7 kernel, see if it fixes anything.  I'll report 
back with the results.  
Comment 14 Angel Ortiz 2002-10-03 00:35:08 UTC
qpkg -I -v | grep alsa  
media-libs/alsa-lib-0.9.0_rc2 *  
media-sound/alsa-utils-0.9.0_rc2 *  
media-sound/alsa-driver-0.9.0_rc2 *  
media-sound/alsa-xmms-0.9.5 *  
  
I have spent the past day and a half testing and trying to figure out what is 
going on.   
Near as I can tell this is only happening with the ens-1371 alsa module.  My  
card is a Creative ES1371.  I tried the gentoo-source kernelr7 but I had other  
problems.  (it would give me kernel panics no matter what I did or did not  
compile)  I then tried a vanilla 2.4.19 kernel that I downloaded from  
kernel.org and I patched it with sgi's xfs patch for that kernel.  I did the  
unmerge and re-emerge alsa-driver thing and I was getting the same issue upon  
reboot.  It would stop with loading sound module ens-1371.  
  
To test a theory that this was related just to this card I popped in my old  
sound card.  It is an S3 Sonic-Vibes pci card.  I changed everything in 
/etc/modules.d/alsa to  
  
alias snd-card-0 snd-sonicvibes 
alias snd-card-1 snd-sonicvibes 
alias snd-card-2 snd-sonicvibes 
alias snd-card-3 snd-sonicvibes 
alias snd-card-4 snd-sonicvibes 
alias snd-card-5 snd-sonicvibes 
alias snd-card-6 snd-sonicvibes 
alias snd-card-7 snd-sonicvibes 
 
and I set my volume using alsamixer.  I rebooted 10 times checking to verify 
that sound was working each time.  No problems with boot, no errors reported.  
I then tried the ens-1371 card again and made changes to /etc/modules.d/alsa 
to reflect the snd-ens1371 card was back in and no problems.   
 
Strange.  I decided I would try another sound card.  I was going to upgrade my 
sound card anyway so I bought a sound blaster live.  I put it in my machine, 
again change /etc/modules.d/alsa to reflect the snd-emu10k1 driver module.  I 
make changes to my sound, and again I do the 10 reboots, checking to make sure 
that I have sound each time.  No problems.   
 
Just to test and see if the problem really is just with the card I put the 
snd-en1371 card back in, make the changes and reboot.  It fails again.  Not 
scientific by any stretch of the imagination but I think the problem may be 
with the ens1371 driver.  The creative es1371 card worked fine in a friends 
computer (with Redhat 7.3.  RH picked it up on boot and it worked no 
problems), so I believe that it was not a problem with my card in particular.  
I believe it may be an issue with alsa and the ens-1371 module.   
Comment 15 Arcady Genkin (RETIRED) gentoo-dev 2002-10-03 11:56:04 UTC
Angel, thanks for the follow-up.  It looks like both you and Diego both are
using the ensoniq 1371 chip, so your theory sounds very plausible.  I myself
have two Gentoo systems (one with emu10k1 and one with ens1370) and I have been
unable to reproduce this bug.  

May I ask everybody on the CC list to report their soundcard chipsets?
Thanks.
Comment 16 Thomas Nilsson 2002-10-08 18:33:14 UTC
snd-via8233 on a Aopen AK-333 motherboard.
Comment 17 Ryan Nielsen 2002-10-08 21:23:47 UTC
I've got a emu10k1 card here.
Comment 18 Angel Ortiz 2002-10-26 04:07:27 UTC
Just to give an update.  I noticed that there are new alsa setup instructions. 
I followed the instructions on http://www.gentoo.org/doc/alsa-guide.html and
thus far I have had no problems.  It has been a week (it is a secondary pc) and
so far no problems to report.  I think that specifying the number of sound cards

options snd snd_major=116 snd_cards_limit=1

And limiting the ens1371 module to just snd-card-0

alias snd-card-0 snd-ens1371

worked wonders.  so far no freezes of lockups on my boot.  Does this help anyone
else?
Comment 19 Arcady Genkin (RETIRED) gentoo-dev 2002-11-01 12:41:51 UTC
*** Bug 9948 has been marked as a duplicate of this bug. ***
Comment 20 Jason Andryuk 2002-12-11 13:33:16 UTC
I too have experienced the bug.

I'm running gentoo 1.4_rc1.  I have kernel 2.4.19-r9 and now r10 of the gentoo
source.  A SoundBlaster Live! on a BE6-II (BX Chipset) PIII 650

I tried both the new and old alsa instructions with no help either way, so I
just put the modules in modules.autoload

qpkg -I -v | grep alsa
media-libs/alsa-lib-0.9.0_rc2 *
media-sound/alsa-driver-0.9.0_rc2 *
media-sound/alsa-utils-0.9.0_rc2 *
media-plugins/alsa-xmms-0.9.5 *
Comment 21 Arcady Genkin (RETIRED) gentoo-dev 2002-12-27 12:33:11 UTC
Can you guys please try the _rc6 ebuilds which were marked stable a few days
ago?  A few gotchas: any module options like "snd_foo" should be renamed into
"foo".  For example, "snd_cards_limit=1" becomes "cards_limit=1".

Thanks.
Comment 22 Jason Andryuk 2002-12-28 12:17:22 UTC
I installed rc6 the otherday, and alsactl restore has worked everytime since the
upgrade.  I've rebooted a number of times with the alsasound scripts runnng, and
I've also run alsactl restore seperately.  Both without any problem.
Comment 23 Arcady Genkin (RETIRED) gentoo-dev 2003-03-04 19:58:34 UTC
Jason, thanks for replying.  I'm going to close this bug, then,
If anyone is still experiencing the problem, feel free to reopen.