# Upgrading from kernel 2.6.12 to 2.6.13 breaks alsa

## AlefBet

I'm having an issue where upgrading from gentoo-sources-2.6.12 to 2.6.13 causes alsa to stop working.  

The hardware in question is: 

```
0000:00:1b.0 Class 0403: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 04)
```

 and when I try to start alsasound, I get:

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

Password:

 * Loading ALSA modules ...

 *   Loading: snd-card-0 ...

FATAL: Module snd_hda_intel not found.                                [ ok ]

 * Restoring Mixer Levels ...

/usr/sbin/alsactl: set_control:873: failed to obtain info for control #1 (Invalid argument)                                             [ !! ]
```

I don't know why it's trying to load module snd_hda_intel.  It's compiled into the kernel.  (Although I did try it as a module too and alsasound still didn't start.)

I've vimdiff'd the .config files for 2.6.12 and 2.6.13 and the relevant sound options all seem to be the same in the sound section.  (The only difference is that one has an option or two that the other doesn't have, but they're not set.)  Also, if I reboot under 2.6.12, the sound works.  So I'm pretty sure it's not a hardware issue and I'm pretty sure it's not a .config issue.  Anything else to try?

----------

## PaulBredbury

 *AlefBet wrote:*   

> I don't know why it's trying to load module snd_hda_intel.  It's compiled into the kernel.  (Although I did try it as a module too and alsasound still didn't start.)

 

Keep it as a module, so that /etc/init.d/alsasound can successfully modprobe it.

When you compile the kernel, are you running:

```
make && make modules_install
```

----------

## Valhalla

I have a similar problem, so I feel that this is the best place to put it.  When I try to start alsasound, I get the following error.

```
MindStorm ryan # /etc/init.d/alsasound start

 * Loading ALSA modules ...                                                      [ ok ]

 * Restoring Mixer Levels ...

/usr/sbin/alsactl: set_control:894: warning: name mismatch (Surround Jack as Input/Surround Jack Mode) for control #39

/usr/sbin/alsactl: set_control:896: warning: index mismatch (0/0) for control #39

/usr/sbin/alsactl: set_control:994: bad control.39.value type                    [ !! ]

```

This occured when I upgraded from 2.6.11-r11 to 2.6.13-r3. I still have sound though, I assume the system is falling back to oss.  Both oss and alsa are compiled into the kernel.

----------

## dpevp

Try to execute: 

```
alsactl store
```

and restart alsasound.

----------

## AlefBet

 *PaulBredbury wrote:*   

>  *AlefBet wrote:*   I don't know why it's trying to load module snd_hda_intel.  It's compiled into the kernel.  (Although I did try it as a module too and alsasound still didn't start.) 
> 
> Keep it as a module, so that /etc/init.d/alsasound can successfully modprobe it.

 Well, it was working fine under 2.6.12 as compiled in, but I'll try changing it to be a module.

....

Okay, through the magic of delaying my response until after rebooting, I've tried it.  The first error message about snd_hda_intel is gone, but the second message about set_control:873 is still there, and sound still isn't working. *PaulBredbury wrote:*   

> When you compile the kernel, are you running:
> 
> ```
> make && make modules_install
> ```
> ...

 Yes.  I've compiled a kernel perhaps two dozen times, and changed kernel versions each time since around 2.6.7, so maybe that gives you an idea how experienced I am at it.  I'd say I'm at the "generally gets it right, but could have still goofed" phase.  As far as I can recall, the gist of the commands I ran is:

```
sudo su

cd /usr/src/linux-2.6.13-gentoo-r3

make menuconfig

cd ..

rm linux

ln -s linux-2.6.13-gentoo-r3 linux

cd linux

make && make modules_install

cp arch/i386/boot/bzImage /boot/kernel-2.6.13-gentoo-r3

cp System.map /boot/System.map-2.6.13-gentoo-r3

cp .config /boot/config-2.6.13-gentoo-r3

vim /boot/grub/menu.lst

emerge ieee80211 ipw2200 ipw2200-firmware # for wireless
```

That may be more detail than you need, but hopefully it's useful.  Did I miss any steps, especially with regard to sound?

----------

## AlefBet

Here's another detail I've noticed.  During the early part of boot, before the [ ok ] messages start to flash past, there's a quick message about the Alsa system detecting hardware.  Under 2.6.12, it says something like found 0000000c: Intel HDA Audio, but under 2.6.13, it says something like no audio devices found.  I'm paraphrasing, since I can't scroll back to that part of the boot sequence to check.  Is that significant?

----------

## chrbecke

 *AlefBet wrote:*   

> 
> 
> /usr/sbin/alsactl: set_control:873: failed to obtain info for control #1 (Invalid argument)
> 
> 

 

 *Valhalla wrote:*   

> 
> 
> /usr/sbin/alsactl: set_control:894: warning: name mismatch (Surround Jack as Input/Surround Jack Mode) for control #39
> 
> /usr/sbin/alsactl: set_control:896: warning: index mismatch (0/0) for control #39
> ...

 

Try deleting /etc/asound.state. You'll lose your mixer settings, but you should get rid of the error messages.

----------

## chunderbunny

 *dpevp wrote:*   

> Try to execute: 
> 
> ```
> alsactl store
> ```
> ...

 

Thanks man, that fixed it.

----------

## AlefBet

 *chrbecke wrote:*   

>  *AlefBet wrote:*   
> 
> /usr/sbin/alsactl: set_control:873: failed to obtain info for control #1 (Invalid argument)
> 
>  Try deleting /etc/asound.state. You'll lose your mixer settings, but you should get rid of the error messages.

 That got rid of that error message, but replaced it with a message indicating I must unmute my sound card.  Running alsaconf or alsamixer kills my volume control gnome applet, and alsamixer won't start.

It's really suspicious to me that the ALSA hardware list indicates no sound cards during boot under 2.6.13 (but not 12).  Was support for any cards dropped in this kernel?  (The notebook computer is only about two months old, so it's not legacy hardware I don't think.)

----------

## icantux

Are you using alsa-drivers? ... or kernel modules?

If you are using the alsa-drivers, you'll need to re-emerge those after a kernel update (just remember to emerge the kernel source files beforehand). On the other hand, a modprobe and alsasound restart should do the trick if you have alsa compiled as a module in your kernel. I prefer the modular method because there's less hassle after a kernel upgrade.

By the way, running alsaconf will always kill the gnome volume control applet.  Every time. Just restart it again after configuring alsa.  :Wink: 

----------

## AlefBet

 *alsac wrote:*   

> Are you using alsa-drivers? ... or kernel modules?

 I'm using kernel modules, for the less-hassle factor.  Although, I'm thinking about trying alsa-drivers if I can't get this to work. *Quote:*   

> On the other hand, a modprobe and alsasound restart should do the trick if you have alsa compiled as a module in your kernel.

 Well, I have alsa compiled directly into the kernel, not as a module.  But modprobing my soundcard driver doesn't seem to do the trick (module loads, but alsaconf/alsasound restart doesn't get sound working). *Quote:*   

> By the way, running alsaconf will always kill the gnome volume control applet.  Every time. Just restart it again after configuring alsa. 

 Good to know.  Thanks for the info.

I'm still troubled by the fact that the Alsa hardware list at the beginning of the boot up sequence (before init) lists no sound devices found, while it found my Intel card under 2.6.12.  Is that normal?  And is there anything else I can try (except maybe alsa-drivers)?  Thanks for your effort so far.

----------

## yabbadabbadont

The ebuild for alsa-libs has a comment displayed at the end about the kernel alsa sources being messed up lately and suggesting alsa-driver instead.  Since I switched to alsa-driver and configuring dmix in asound.conf, I haven't had any troubles like I did when using the kernel drivers.

----------

## AlefBet

 *yabbadabbadont wrote:*   

> The ebuild for alsa-libs has a comment displayed at the end about the kernel alsa sources being messed up lately and suggesting alsa-driver instead.  Since I switched to alsa-driver and configuring dmix in asound.conf, I haven't had any troubles like I did when using the kernel drivers.

 Thanks.  I tried using alsa-driver, and now sound works.  I'll stick with alsa-driver for a while and see if a later kernel revision fixes it, but in the meantime this will work fine (with just a touch of hassle when building kernels).

----------

## Ivar_Y

I also have had problems with the sound when going from linux-2.6.12 to linux-2.6.13.  I think I may know what the problem is.

The file "/etc/asound.state" stores the mixer settings when the computer is turned off.  The values are restored when the computer is turned back on.  The contents of this file are different in the two versions of the linux kernel.  When one boots for the first time into the new kernel, the new kernel expects to get a "13" type file but, in fact, gets a "12" type file.  The new kernel gets confused with the result that a parameter called "Headphone Jack Sense" in KMix (called "headphon" in alsamixer) is changed from muted to unmuted.  I am not sure what this parameter is supposed to do but, if it is NOT muted, the normal sound output IS muted.  There is no easy way to tell that this happened.

I probably don't have the details exactly right -- I haven't looked at the source code -- but something like this seems to be going on.

KMix or alsamixer can restore the sound.  I have version 2.4.1 of KMix and version 1.0.8 of alsamixer.  The "Headphone Jack Sense" control is found in the Switches section of KMix.    And, alsa is in the form of modules on my system.

Ivar

----------

## DrWilken

 *dpevp wrote:*   

> Try to execute: 
> 
> ```
> alsactl store
> ```
> ...

 

 :Very Happy: 

----------

## Zyzzyva100

Thanks for these tips, this worked for me too.  I guess the kernel alsa driver really is a bit borked, because I couldn't get dmix to work properly before.  I would get errors everytime more than one program tried to use alsa at the same time.

I went the alsa-driver route when I upgraded the kernel this time and now everything works perfectly.

----------

## AlefBet

Hmm.  After switching to alsa-driver, I'm dropping frames in Xine and DROD's sound is really choppy, like the CPU is under load (although Top doesn't point to anything).  Maybe I'll go back to 2.6.12 until the next revision of 13 is out.

----------

## trizz

```
#alsactl store
```

That worked for me, I had this... 

```
eris ~ # /etc/init.d/alsasound start

 * Loading ALSA modules ...

 *   Loading: snd-card-0 ...                                                                      [ ok ]

 * Restoring Mixer Levels ...

/usr/sbin/alsactl: set_control:894: warning: name mismatch (Line-In As Surround/Surround Jack Mode) for control #37

/usr/sbin/alsactl: set_control:896: warning: index mismatch (0/0) for control #37

/usr/sbin/alsactl: set_control:898: failed to obtain info for control #37 (Operation not permitt  [ !! ]
```

I now have 

```
eris ~ # /etc/init.d/alsasound start

 * Loading ALSA modules ...

 *   Loading: snd-card-0 ...                                                                      [ ok ]

 * Restoring Mixer Levels ...                                                                     [ ok ]
```

Thanks!   :Very Happy: 

----------

## nutznboltz

 *dpevp wrote:*   

> Try to execute: 
> 
> ```
> alsactl store
> ```
> ...

 

 :Sad: 

```
# alsactl store

alsactl: save_state:1163: No soundcards found...

despite

# grep ^C.*SND /boot/config-2.6.12-gentoo-r6

CONFIG_SND=m

CONFIG_SND_TIMER=m

CONFIG_SND_PCM=m

CONFIG_SND_SEQUENCER=m

CONFIG_SND_OSSEMUL=y

CONFIG_SND_MIXER_OSS=m

CONFIG_SND_PCM_OSS=m

CONFIG_SND_SEQUENCER_OSS=y

CONFIG_SND_AC97_CODEC=m

CONFIG_SND_INTEL8X0=m

# uname -a

Linux hermes 2.6.13-gentoo-r3 #4 Thu Oct 13 18:31:56 EDT 2005 x86_64 AMD Opteron(tm) Processor 246 AuthenticAMD GNU/Linux

# zgrep ^C.*SND /proc/config.gz

CONFIG_SND=m

CONFIG_SND_TIMER=m

CONFIG_SND_PCM=m

CONFIG_SND_SEQUENCER=m

CONFIG_SND_OSSEMUL=y

CONFIG_SND_MIXER_OSS=m

CONFIG_SND_PCM_OSS=m

CONFIG_SND_SEQUENCER_OSS=y

CONFIG_SND_AC97_CODEC=m

CONFIG_SND_INTEL8X0=m

(identical)
```

What happened to /dev/snd/* ?

When I boot 2.6.12 it's there. With 2.6.13 it's not.

----------

## chrbecke

nutznboltz,

 *yabbadabbadont wrote:*   

> The ebuild for alsa-libs has a comment displayed at the end about the kernel alsa sources being messed up lately and suggesting alsa-driver instead.  Since I switched to alsa-driver and configuring dmix in asound.conf, I haven't had any troubles like I did when using the kernel drivers.

 

Try the media-sound/alsa-driver ebuild instead of the in-kernel alsa version.

----------

## nutznboltz

 *chrbecke wrote:*   

> nutznboltz,
> 
>  *yabbadabbadont wrote:*   The ebuild for alsa-libs has a comment displayed at the end about the kernel alsa sources being messed up lately and suggesting alsa-driver instead.  Since I switched to alsa-driver and configuring dmix in asound.conf, I haven't had any troubles like I did when using the kernel drivers. 
> 
> Try the media-sound/alsa-driver ebuild instead of the in-kernel alsa version.

 

0. booted from 2.6.12-gentoo-r6

1. cd /usr/src/linux ; make menuconfig

2. turn off drivers -> sound -> alsa

3. mount /boot ; cd /lib/modules ; rm -r 2.6.13-gentoo-r3

4. cd /usr/src/linux ; make install modules_install

5. emerge alsa-driver

6. reboot to 2.6.13-gentoo-r3

no good.  scratch head, revert /etc/modules.d/alsa to defaults, reboot loading all sound drivers still no /dev/snd/* even though

```
$ cat /proc/asound/cards

0 [AMD8111        ]: ICH - AMD AMD8111

                     AMD AMD8111 with ALC655 at 0xc800, irq 185
```

and

```
$ lsmod | grep -c snd

61
```

----------

## chrbecke

Is your udev working properly? Maybe it's not alsa, but udev failing to create the appropriate device nodes?

----------

## nutznboltz

if it's a udev problem why does /dev/snd/* exist when I boot 2.6.12?

----------

## chrbecke

if it's an alsa problem, why do the modules load cleanly and your card is shown in /proc/asound/cards when you boot 2.6.13?  :Smile: 

All we know is, that switching from 2.6.12 to 2.6.13 broke something, which causes your sound to stop working.

To make sure if it's really alsa or just the missing device nodes, you could run the snddevices script found in the alsa-driver tarball. If your sound works after manually creating the device nodes with the script, it's not an alsa problem.

You can also try to edit /etc/udev/udev.conf and change "udev_log" to yes. With this set, udev will log every device node creation/removal to syslog. Maybe anything sound-related shows up...

But before trying all this, double-check that your kernel config is correct (i.e. only CONFIG_SOUND=m or CONFIG_SOUND=y, all the other CONFIG_SOUND* and CONFIG_SND* must not be set), and that the kernel with this config is actually booted. Consider building your kernel with 

```
CONFIG_IKCONFIG=y

CONFIG_IKCONFIG_PROC=y
```

 thus you can see the config of the currently running kernel in /proc/config.gz.

----------

## nutznboltz

I think the problem is that going from 2.6.12-r6 -> 2.6.13-r3 the default for CONFIG_HOTPLUG switched from y to n.

I tried to go from booted on 2.6.13-r3 to 2.6.12-r10 and the same ALSA problem happened but at that point i had two very nice config files to run "diff -u" on and that showed at once CONFIG_HOTPLUG was the problem.

I am booted from 2.6.12-r10 with CONFIG_HOTPLUG=y and the ALSA problem is gone.  When 2.6.13-r3 finished building and boots I expect ALSA to work again.  EDIT: yup that was it.

simple directions

make menuconfig

General Setup -> Support for hotpluggable devices (switch from off to on)

save

make

mount /boot

make install modules_install

reboot

----------

## Helkyn

Just posting to confirm breakage when upgrading gentoo-sources.

Same kind as nutznboltz.

alsactl store didn't work.

 *Quote:*   

>  simple directions
> 
> make menuconfig
> 
> General Setup -> Support for hotpluggable devices (switch from off to on)
> ...

 

Did the job. Thanks a bunch   :Mr. Green: 

----------

## rburcham

I have been running alsa sound on my SIS chipset (snd-intel8x0) for years.  I upgraded to 2.6.13-gentoo-r3 last night and had the problem described above.  Any attempt to start alsasound would indeed result in the successful loading of modules, and the device drivers in /dev/sound did get made.

However the last step in alsasound, the setting of the mixer levels, failed with the "set_control" errors described in the above thread.   So:

1.  no sound.

2.  /etc/init.d/alsasound status reports "stopped"

3.  modules *are* loaded, devices *do* exist.

I deleted /etc/asound.state and reran alsamixer to unmute all the channels.  Still no sound.  I tried emerging alsa-driver.  No change.  I unmerged alsa-driver and re-installed from kernel.  Still no sound.

I pursued the suggestion from nutznboltz, re: enabling "Support for hotpluggable devices" in 2.6.13-gentoo-r3 kernel config.  What's this?  It's AREADY ENABLED?  In fact, the menu item present in the menuconfig is *not* mutable - that is, it has "---" to the left of the item rather than "[ ]" as other configurable items normally do.  So wtf?

So what do I do now?

```
# grep -i hotplug linux/.config

CONFIG_HOTPLUG=y

# PCI Hotplug Support

# CONFIG_HOTPLUG_PCI is not set
```

----------

## rburcham

this was it:

https://forums.gentoo.org/viewtopic-t-309350-highlight-alsa+setcontrol+sound.html

capture monitor cuts out all other output channels...

----------

