# Sound driver not found with kernel-2.6.27-gentoo-r7

## MickKi

I just upgraded my kernel with make oldconfig and noticed new options for 

sound.  Other than taking in excess of 50 seconds looking at the penguin 

before the kernel starts booting up (it used to be 10-15sec) I found out upon bootup that alsasound 

fails to find the kernel driver for my sound card:

```
# /etc/init.d/alsasound restart

 * Loading ALSA modules ...

 *   Could not detect custom ALSA settings.  Loading all detected alsa 

drivers.

 *   Unable to find any ALSA drivers. Have you compiled alsa-drivers 

correctly?

 *   ERROR: Failed to load necessary drivers                         [ ok ]

 * Restoring Mixer Levels ...

alsactl: unrecognized option `---'

Usage: alsactl <options> command

Available options:

  -h,--help        this help

  -f,--file #      configuration file (default /etc/asound.state 

or /etc/asound.names)

  -F,--force       try to restore the matching controls as much as possible

                   (default mode)

  -P,--pedantic    don't restore mismatching controls (old default)

  -d,--debug       debug mode

  -v,--version     print version of this program

Available commands:

  store   <card #> save current driver setup for one or each soundcards

                   to configuration file

  restore <card #> load current driver setup for one or each soundcards

                   from configuration file

  names   <card #> dump information about all the known present (sub-)devices

                   into configuration file (DEPRECATED)

 * Errors while restoring defaults, ignoring                         [ ok ]
```

This has caught me by surprise, because I haven't had sound problems with the kernel for years now.

Here's my card (lshw):

```

           *-multimedia UNCLAIMED

                description: Multimedia audio controller

                product: ES1988 Allegro-1

                vendor: ESS Technology

                physical id: 9

                bus info: pci@0000:02:09.0

                version: 12

                width: 32 bits

                clock: 33MHz

                capabilities: pm cap_list

                configuration: latency=64 maxlatency=24 mingnt=2
```

Also from lspci:

```
02:09.0 Multimedia audio controller: ESS Technology ES1988 Allegro-1 (rev 12)

        Subsystem: Compaq Computer Corporation Device 0094

        Flags: medium devsel, IRQ 11

        I/O ports at 2400 [size=256]

        Capabilities: [c0] Power Management version 2
```

Can you see anything missing from my kernel?

```
CONFIG_SND=y

CONFIG_SND_TIMER=y

CONFIG_SND_PCM=y

CONFIG_SND_SEQUENCER=y

CONFIG_SND_OSSEMUL=y

CONFIG_SND_MIXER_OSS=y

CONFIG_SND_PCM_OSS=y

CONFIG_SND_PCM_OSS_PLUGINS=y

CONFIG_SND_SEQUENCER_OSS=y

CONFIG_SND_RTCTIMER=y

CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y

CONFIG_SND_VMASTER=y

CONFIG_SND_AC97_CODEC=y

CONFIG_SND_DRIVERS=y

CONFIG_SND_AC97_POWER_SAVE=y

CONFIG_SND_AC97_POWER_SAVE_DEFAULT=5

CONFIG_SND_PCI=y

CONFIG_SND_MAESTRO3=y
```

----------

## d2_racing

Hi, did you run alsaconf ?

----------

## gentoo_ram

2.6.27-gentoo-r7 also lost sound support on one of my machines as well.  The sound was working before.  Maybe there's something strange in that kernel.

----------

## dusik

Could be related to this post.  "Audigy Analog/Digital Output Jack" needs to be reset via alsamixer.

----------

## MickKi

 *d2_racing wrote:*   

> Hi, did you run alsaconf ?

 

Yep:

```
modinfo: could not find module snd
```

----------

## MickKi

 *dusik wrote:*   

> Could be related to this post.  "Audigy Analog/Digital Output Jack" needs to be reset via alsamixer.

 

I can't run alsamixer:

```
$ alsamixer 

alsamixer: function snd_ctl_open failed for default: No such file or directory
```

----------

## mrZ

I've got the same problem, but with 2.6.28.

The alsa doesn't seem to find the sound card. 

On Kernel 2.6.26-r4 everything worked fine.

----------

## mrZ

I compiled Kernel with Alsa as modules, and alsaconf works, but when i run kmplayer it says this:

```
==========================================================================

ID_VIDEO_CODEC=ffodivx

==========================================================================

Opening audio decoder: [mp3lib] MPEG layer-2, layer-3

AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)

ID_AUDIO_BITRATE=128000

ID_AUDIO_RATE=48000

ID_AUDIO_NCH=2

Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)

==========================================================================

[AO_ALSA] alsa-lib: confmisc.c:768:(parse_card) cannot find card '0'

[AO_ALSA] alsa-lib: conf.c:3513:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory

[AO_ALSA] alsa-lib: confmisc.c:392:(snd_func_concat) error evaluating strings

[AO_ALSA] alsa-lib: conf.c:3513:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory

[AO_ALSA] alsa-lib: confmisc.c:1251:(snd_func_refer) error evaluating name

[AO_ALSA] alsa-lib: conf.c:3513:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory

[AO_ALSA] alsa-lib: conf.c:3985:(snd_config_expand) Evaluate error: No such file or directory

[AO_ALSA] alsa-lib: pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default

[AO_ALSA] Playback open error: No such file or directory

Failed to initialize audio driver 'alsa'

Could not open/initialize audio device -> no sound.

Audio: no sound

Starting playback..
```

Any idea?

----------

## gemini91

It would appear all sound support has been removed from the kernel. If

I go to device drivers-sound-alsa-pci there is nothing listed to select from.

What I don't understand is it worked fine on my laptop, as does 2.6.28. I

can't even get 2.6.28 to boot on the desktop. I'll see if I can see the difference

on the laptop. I have always used the in kernel drivers.

IGNORE THIS POST. Too much has been going on and I just forgot to select PCI.

----------

## MickKi

Well, unfortunately I have selected PCI - heck it wouldn't be able to find my hda drive without it.

Has anyone else come across a solution on this, or if I really have not missed out anything important from my kernel config is it now time for me to file a bug?

----------

## MickKi

Watch this space: https://bugs.gentoo.org/show_bug.cgi?id=253110

----------

## aramonkg

The steps you followed to recompile your kernel are unsafe. See

http://www.gentoo.org/doc/en/kernel-upgrade.xml#doc_chap10

IMO, it is no wonder that something has broken. I recently upgraded my kernel from 2.6.26-r4 to 2.6.27-r7 by following the safer procedure of copying .config and then running make menuconfig as stated in the linked guide and both my on-board and usb soundcard work perfectly.

----------

## outermeasure

 *aramonkg wrote:*   

> The steps you followed to recompile your kernel are unsafe. See
> 
> http://www.gentoo.org/doc/en/kernel-upgrade.xml#doc_chap10
> 
> IMO, it is no wonder that something has broken. I recently upgraded my kernel from 2.6.26-r4 to 2.6.27-r7 by following the safer procedure of copying .config and then running make menuconfig as stated in the linked guide and both my on-board and usb soundcard work perfectly.

 

Nonsense!  Menuconfig isn't meant for .config that isn't for that kernel.  Making oldconfig then menuconfig for any further modification is the way to do it.

----------

## aramonkg

 *outermeasure wrote:*   

>  *aramonkg wrote:*   The steps you followed to recompile your kernel are unsafe. See
> 
> http://www.gentoo.org/doc/en/kernel-upgrade.xml#doc_chap10
> 
> IMO, it is no wonder that something has broken. I recently upgraded my kernel from 2.6.26-r4 to 2.6.27-r7 by following the safer procedure of copying .config and then running make menuconfig as stated in the linked guide and both my on-board and usb soundcard work perfectly. 
> ...

 

It ain't my system that is broken... So... If you think your way is better then I strongly urge you to go on and notify the Gentoo Documentation Team so that they update Linux Kernel Upgrade Guide.

----------

## outermeasure

 *aramonkg wrote:*   

>  *outermeasure wrote:*    *aramonkg wrote:*   The steps you followed to recompile your kernel are unsafe. See
> 
> http://www.gentoo.org/doc/en/kernel-upgrade.xml#doc_chap10
> 
> IMO, it is no wonder that something has broken. I recently upgraded my kernel from 2.6.26-r4 to 2.6.27-r7 by following the safer procedure of copying .config and then running make menuconfig as stated in the linked guide and both my on-board and usb soundcard work perfectly. 
> ...

 

You haven't run make oldconfig as stated in the documentation you quoted, and that is why I'm saying what you said is nonsense --- you were suggesting that make oldconfig is unsafe!  Your /usr/src/linux-<KVER>/.config was for another kernel version and naively making menuconfig without oldconfig first is not a good idea unless you track the kernel changelog (so you know every git commit, what got changed where from one version to another and where the relevant option is going to be).

You are the one not following the guide here, not me.  And no, it aint my system that is broken either. (I use the current kernel config over at /proc/config.gz instead of locating the old .config file which would need mounting /boot or untaring an archive.)

----------

## aramonkg

Are we reading the same guide?

 *Quote:*   

> A much safer upgrading method is to copy your config as previously shown, and then simply run make menuconfig. This avoids the problems of make oldconfig mentioned previously, as make menuconfig will load up your previous configuration as much as possible into the menu. Now all you have to do is go through each option and look for new sections, removals, and so on.

 

Anyway, this is probably a misunderstanding and is not in the best interest of solving the problem this thread is about.

----------

## outermeasure

Hmm.... that approach could be dangerous when the value of an option changes, say from 2 in the old kernel to 3 in the new kernel.  oldconfig would pick that up, but menuconfig wouldn't (leaving you with the new kernel's 2), and AFAICT there won't be any sign in menuconfig notifying you of the change.  Admittedly these sort of changes are rare...

----------

## MickKi

Guys, thanks for the suggestions so far.

I have been using oldconfig (for initial editing of a new kernel) and menuconfig (for additional tweaking thereafter) for more than 4 years so far, without any problems.  This problem is not an oldconfig issue as sound seems to have broken for other users too.

----------

## aramonkg

What these two options you said are set for your kernel correspond to? What is the corresponding description and where are they located in Device Drivers->Sound Card Support?

```

CONFIG_SND_AC97_POWER_SAVE=y

CONFIG_SND_AC97_POWER_SAVE_DEFAULT=5 

```

I can't find them in 2.6.27-gentoo-r7 configuration...

----------

## MickKi

If you press:  

 /

when in make menuconfig you get a search field in which you can type what you're looking for.

The drivers in question are located at:

Generic Driver Options  --->

 --- Sound card support

   --- Advanced Linux Sound Architecture

     --- Generic sound devices-->

       [*]   AC97 Power-Saving Mode

       (5)     Default time-out for AC97 power-save mode

----------

## aramonkg

Hmm... those require CONFIG_EXPERIMENTAL to show up. Have you tried without them set?

----------

## mrZ

For me, after reboot the sound woks perfectly. Sorry for not posting that, I have forgotten.

What is funny it doesn't in Mplayer, but in any other program it does.

----------

## MickKi

I rebuilt my kernel but this time with all snd drivers compiled as modules as suggested in the bug report.  Guess what?  It worked!

No idea why this is so ...    :Confused: 

----------

## d2_racing

Did you run alsaconf after that ?

----------

## mrZ

After my recompilation I run alsaconf, rebooted and sound worked.

----------

## d2_racing

So, if I'm right on this, alsaconf only works when you make your soundcard drivers as module  :Razz: 

----------

## eigenman

Well, I have the same issue, and all my sound drivers are compiled as modules. Running /etc/init.d/alsasound start, the drivers are loaded, and searching through /proc/asound, the nvidia card is in fact found. However, alsamixer still fails (even as root).

----------

## eigenman

alright, the more I look at my own problem, the more it seems like the issue is from udev rules. As far as I can tell, the module find the right sound card, and initializes it. However, there are no /dev/snd created. I looked at /etc/udev/rules.d

directory, but there are nothing about snd our sound in any of the files. Is this similar to the problem that others are having?

eigenman (who is seriously considering oss4 right now)

----------

## eigenman

Sure enough, oss4 worked out without any problem. Ironically enough, after installing oss4, I figured out what is wrong with alsa. It turned out that in the boot process, devfs was being loaded and messing up everything. Since I haven't been using devfs for a long long time, I'm guessing that during the upgrade to openrc, devfs was added to sysinit by default, while udev* was not included. (Teaches me to try to start the new year with a new upgrade.  :Smile:  )

Anyways, I wonder if others have hit the same problem, and if so, hopefully this will help them.

(as an amusing aside, both alsa and oss4 have the problem of not muting my internal speaker when headphones are plugged in, at ths point.)

----------

## MickKi

 *d2_racing wrote:*   

> So, if I'm right on this, alsaconf only works when you make your soundcard drivers as module 

 

Yes, this is the case with my problem and I think this is the case in general - alsaconf works only if you have built your sound drivers as modules.

A first for me is that modules work, built-in drivers do not.  For some years now I have been building alsa drivers in the kernel, since I need them every time I boot the box and have always just worked.

Since I usually build the drivers in the kernel I have not been using alsaconf - anyway I only have one sound card.

----------

