# Trouble with Sound

## jrmontg

I have a

localhost ~ # lspci | grep -i audio

00:1b.0 Audio device: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 03)

soundcard that when I do a modprobe snd-hda-intel

I get the following errors, I need some help get my card working

WARNING: Error inserting snd_page_alloc (/lib/modules/2.6.16-gentoo-r9/kernel/sound/core/snd-page-alloc.ko): Invalid module format

WARNING: Error inserting soundcore (/lib/modules/2.6.16-gentoo-r9/kernel/sound/soundcore.ko): Invalid module format

WARNING: Error inserting snd (/lib/modules/2.6.16-gentoo-r9/alsa-driver/acore/snd.ko): Invalid module format

WARNING: Error inserting snd (/lib/modules/2.6.16-gentoo-r9/kernel/sound/core/snd.ko): Invalid module format

WARNING: Error inserting snd_timer (/lib/modules/2.6.16-gentoo-r9/kernel/sound/core/snd-timer.ko): Invalid module format

WARNING: Error inserting snd_pcm (/lib/modules/2.6.16-gentoo-r9/kernel/sound/core/snd-pcm.ko): Invalid module format

WARNING: Error inserting snd_hda_codec (/lib/modules/2.6.16-gentoo-r9/alsa-driver/pci/hda/snd-hda-codec.ko): Unknown symbol in module, or unknown parameter (see dmesg)

FATAL: Error inserting snd_hda_intel (/lib/modules/2.6.16-gentoo-r9/alsa-driver/pci/hda/snd-hda-intel.ko): Unknown symbol in module, or unknown parameter (see dmesg)

----------

## NeddySeagoon

jrmontg,

```
Invalid module format 
```

suggests that the kernel and the module were made with different key kernel settings, like SMP, 4KSTACKS or REGPARAMS, to name a few or that different version of gcc wete used. Itsa lso possible that modules-init-tools needs to be rebuilt.

Rebuild your kernel, all its modules, starting with 

```
cd /usr/src/linux

make clean
```

and 

```
emerge module-init-tools
```

----------

## jrmontg

 *Quote:*   

> Rebuild your kernel, all its modules, starting with
> 
> Code:
> 
> cd /usr/src/linux
> ...

 

Tried that and it is still not working.   :Sad: 

----------

## NeddySeagoon

jrmontg,

Any change to the error messages ?

What does 

```
uname -a
```

 show ?

----------

## jrmontg

I am struggling.  In my /boot folder I have vmlinuz-2.6.16-gentoo-r9

 which I thought I was suppose to load but that didn't work.  So now I am back to 2.6.16-gentoo-r9

----------

## jrmontg

What I mean that it didn't work is that Gnome loaded and I logged in then it crashed (frooze)

----------

## NeddySeagoon

jrmontg,

The kernel names in /boot are not important provided that whatever names are used, they have matching entries in grub.conf.

For example, I have  

```
-rw-r--r-- 1 root root 1454010 Jun  9 12:06 2.6.16-gentoo-r9

-rw-r--r-- 1 root root 1475553 Jun 21 15:23 2.6.17-gentoo
```

in /boot and 

```

#2.6.16-gentoo-r9  (hd1,0)

title=Kernel 2.6.16-gentoo-r9 gcc-4.1.1 ATAPI CD Writing (hd1)

root (hd1,0)

kernel (hd1,0)/2.6.16-gentoo-r9 root=/dev/md1 lapic

#2.6.17-gentoo (hd0,0)

title=Kernel 2.6.17-gentoo gcc-4.1.1 ATAPI CD Writing (hd0)

root (hd0,0)

kernel (hd0,0)/2.6.17-gentoo root=/dev/md1 lapic
```

My /boot is raid1, hen the different (hdX,0) entries.

----------

## jrmontg

I added the entry in grub but when that kernel loaded it frooze.

----------

## NeddySeagoon

jrmontg,

Hmm. vmlinuz is a compressed kernel file it should have been ok.

From force of habit, I use the arch/<your_arch>/boot/bzImage file.

----------

## jrmontg

Here is what I did

cd /usr/src/linux

make clean 

make menuconfig

I chose the options from http://gentoo-wiki.com/HOWTO_ALSA_sound_mixer_aka_dmix

ran make && make modules_install

I noticed that there was an error from a failed attempt at nvidia support: 

if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map  2.6.16-gentoo-r9; fi

WARNING: /lib/modules/2.6.16-gentoo-r9/video/nvidia.ko needs unknown symbol remap_page_range

WARNING: /lib/modules/2.6.16-gentoo-r9/video/nvidia.ko needs unknown symbol pci_find_class

then I cp arch/i386/boot/bzImage /boot/2.6.16-gentoo-r9-1

then I vi /boot/grub/grub.conf and I added boot/2.6.16-gentoo-r9-1 and rebooted

Then gnome came up and frooze

----------

## NeddySeagoon

jrmontg,

You have 3 or 4 large pieces of software invloved in that freeze.

```
the kernel

Xorg

Your display manager

the nVidia drivers

Gnome 
```

we need to simplify the problem - it may be that changing your kernel has only highlighted a problem elsewhere.

Boot an old kernel and as root do

```
 rc-update del xdm
```

Boot your new kernel - it will now boot to a command line

Try the command startx, that should run Xorg, with the nvidia drivers and twm does that seem stable?

Create a file ~/.xinitrc with a single line 

```
exec gnome-session
```

Kill X. (Ctrl-Alt-Backspace) and startx again. Now you have GNOME. Is that OK ?

If not, where does it break and what are you doing at  the time ?

----------

## jrmontg

I ran startx and gnome came up with no icons and I was not able to do a ctrl+alt+del

I had to hold down the power button to restart.

----------

## NeddySeagoon

jrmontg,

Did twm work for you ?

If twm works but gnome does not, its a gnome problem.

If twm and gnome both fail, we start by looking at Xorg.

----------

## jrmontg

I went ahead and reinstalled gentoo and I am still having problems.  

I do not get an error when I do a modprobe snd-hda-intel

Now when I try to emerge alsa-driver

I get this error:

checking for which soundcards to compile driver for... configure: error: Unknown soundcard snd-hda-intel

!!! Please attach the following file when filing a report to bugs.gentoo.org:

!!! /var/tmp/portage/alsa-driver-1.0.11/work/alsa-driver-1.0.11/config.log

!!! ERROR: media-sound/alsa-driver-1.0.11 failed.

Call stack:

  ebuild.sh, line 1539:   Called dyn_compile

  ebuild.sh, line 939:   Called src_compile

  alsa-driver-1.0.11.ebuild, line 97:   Called econf '--with-oss' '--without-debug' '--with-kernel=/usr/src/linux' '--with-build=/usr/src/linux' '--with-isapnp=yes' '--with-sequencer=yes' '--with-cards=snd-hda-intel'

  ebuild.sh, line 541:   Called die

!!! econf failed

!!! If you need support, post the topmost build error, and the call stack if relevant.

----------

## NeddySeagoon

jrmontg,

Since there is no error when you do modprobe snd-hda-intel, it worked. Look in lsmod to confirm its there.

Look in /dev/sound for your sound special device files.

Are they there ?

You may not use both kernel ALSA and alsa-driver, since they both do the same thing.

emerge alsa-driver will fail if it detects that kernel alsa is in use in /usr/src/linux.

----------

## jrmontg

 *Quote:*   

> You may not use both kernel ALSA and alsa-driver, since they both do the same thing.
> 
> emerge alsa-driver will fail if it detects that kernel alsa is in use in /usr/src/linux.

 

This is probably what is happening.  Where in the kernel options would this be?  and should this option have a star, M, or nothing in it?

----------

## jrmontg

Oh right I understand now.... Don't need both...

----------

## jrmontg

I went the way of using the kernel option...

When I try to restart alsasound I get

/etc/init.d/alsasound restart

 * WARNING:  you are stopping a boot service.

 * Storing ALSA Mixer Levels ...                                          [ ok ] 

 * Unloading ALSA ...                                                     [ ok ] 

* Unloading ALSA modules ...                                             [ !! ]

Still not working

----------

## NeddySeagoon

jrmontg,

If you have made all of the required kernel modules as modules ([M] in make menuconfig, your /etc/modules.d/alsa needs to have an alias for each module. Thats how the modules are loaded.

If you made the modules as built in ([*] in make menu config) there are no modules to load or unload and the attempt leads to an error.

Since you can modprobe snd-hda-intel with no error, its there.

Please post the output of the following commands when alsasound has been started

```
ls /dev/snd

ls /dev/sound

lsmod

grep SND /usr/src/linux/.config
```

from that we can tell if your kernel is ok.

Meanwhile, run alsamixer, unmute Master and PCM,  push the sliders up and play something.

Be sure your player is trying to use ALSA.  

```
mplayer -ao alsa ....
```

----------

## jrmontg

ls /dev/snd

controlC0  pcmC0D0c  pcmC0D0p  seq  timer

ls /dev/sound

audio  dsp  mixer  sequencer  sequencer2

lsmod

Module                  Size  Used by

snd_pcm_oss            39968  1

snd_mixer_oss          17920  1 snd_pcm_oss

snd_seq_oss            34432  0

snd_seq_midi_event      6912  1 snd_seq_oss

snd_seq                50512  4 snd_seq_oss,snd_seq_midi_event

snd_seq_device          7820  2 snd_seq_oss,snd_seq

snd_hda_intel          16404  4

snd_hda_codec         127872  1 snd_hda_intel

snd_pcm                81540  5 snd_pcm_oss,snd_hda_intel,snd_hda_codec

snd_timer              22276  2 snd_seq,snd_pcm

snd                    48356  15 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_hda_intel,snd_hda_codec,snd_pcm,snd_timer

soundcore               8672  3 snd

snd_page_alloc          9352  2 snd_hda_intel,snd_pcm

e100                   33540  0

grep SND /usr/src/linux/.config

CONFIG_SND=m

CONFIG_SND_TIMER=m

CONFIG_SND_PCM=m

CONFIG_SND_HWDEP=m

CONFIG_SND_RAWMIDI=m

CONFIG_SND_SEQUENCER=m

# CONFIG_SND_SEQ_DUMMY is not set

CONFIG_SND_OSSEMUL=y

CONFIG_SND_MIXER_OSS=m

CONFIG_SND_PCM_OSS=m

# CONFIG_SND_SEQUENCER_OSS is not set

# CONFIG_SND_DYNAMIC_MINORS is not set

CONFIG_SND_SUPPORT_OLD_API=y

# CONFIG_SND_VERBOSE_PRINTK is not set

# CONFIG_SND_DEBUG is not set

CONFIG_SND_MPU401_UART=m

CONFIG_SND_OPL3_LIB=m

CONFIG_SND_AC97_CODEC=m

CONFIG_SND_AC97_BUS=m

# CONFIG_SND_DUMMY is not set

# CONFIG_SND_VIRMIDI is not set

# CONFIG_SND_MTPAV is not set

# CONFIG_SND_SERIAL_U16550 is not set

# CONFIG_SND_MPU401 is not set

# CONFIG_SND_AD1816A is not set

# CONFIG_SND_AD1848 is not set

# CONFIG_SND_ALS100 is not set

# CONFIG_SND_AZT2320 is not set

# CONFIG_SND_CMI8330 is not set

# CONFIG_SND_CS4231 is not set

# CONFIG_SND_CS4232 is not set

# CONFIG_SND_CS4236 is not set

# CONFIG_SND_DT019X is not set

# CONFIG_SND_ES968 is not set

# CONFIG_SND_ES1688 is not set

# CONFIG_SND_ES18XX is not set

# CONFIG_SND_GUSCLASSIC is not set

# CONFIG_SND_GUSEXTREME is not set

# CONFIG_SND_GUSMAX is not set

# CONFIG_SND_INTERWAVE is not set

# CONFIG_SND_INTERWAVE_STB is not set

# CONFIG_SND_OPL3SA2 is not set

# CONFIG_SND_OPTI92X_AD1848 is not set

# CONFIG_SND_OPTI92X_CS4231 is not set

# CONFIG_SND_OPTI93X is not set

# CONFIG_SND_SB8 is not set

# CONFIG_SND_SB16 is not set

# CONFIG_SND_SBAWE is not set

# CONFIG_SND_SGALAXY is not set

# CONFIG_SND_SSCAPE is not set

# CONFIG_SND_WAVEFRONT is not set

# CONFIG_SND_AD1889 is not set

# CONFIG_SND_ALS4000 is not set

# CONFIG_SND_ALI5451 is not set

# CONFIG_SND_ATIIXP is not set

# CONFIG_SND_ATIIXP_MODEM is not set

# CONFIG_SND_AU8810 is not set

# CONFIG_SND_AU8820 is not set

# CONFIG_SND_AU8830 is not set

# CONFIG_SND_AZT3328 is not set

# CONFIG_SND_BT87X is not set

# CONFIG_SND_CA0106 is not set

# CONFIG_SND_CMIPCI is not set

# CONFIG_SND_CS4281 is not set

# CONFIG_SND_CS46XX is not set

# CONFIG_SND_CS5535AUDIO is not set

# CONFIG_SND_EMU10K1 is not set

# CONFIG_SND_EMU10K1X is not set

# CONFIG_SND_ENS1370 is not set

# CONFIG_SND_ENS1371 is not set

CONFIG_SND_ES1938=m

CONFIG_SND_ES1968=m

# CONFIG_SND_FM801 is not set

CONFIG_SND_HDA_INTEL=m

# CONFIG_SND_HDSP is not set

# CONFIG_SND_HDSPM is not set

# CONFIG_SND_ICE1712 is not set

# CONFIG_SND_ICE1724 is not set

CONFIG_SND_INTEL8X0=m

CONFIG_SND_INTEL8X0M=m

# CONFIG_SND_KORG1212 is not set

# CONFIG_SND_MAESTRO3 is not set

# CONFIG_SND_MIXART is not set

# CONFIG_SND_NM256 is not set

# CONFIG_SND_PCXHR is not set

# CONFIG_SND_RME32 is not set

# CONFIG_SND_RME96 is not set

# CONFIG_SND_RME9652 is not set

# CONFIG_SND_SONICVIBES is not set

# CONFIG_SND_TRIDENT is not set

# CONFIG_SND_VIA82XX is not set

# CONFIG_SND_VIA82XX_MODEM is not set

# CONFIG_SND_VX222 is not set

# CONFIG_SND_YMFPCI is not set

# CONFIG_SND_USB_AUDIO is not set

# CONFIG_SND_USB_USX2Y is not set

----------

## NeddySeagoon

jrmontg,

That looks good, you have stereo playback and record.

What about the sound test I suggested too ?

----------

## jrmontg

I tried one of the .wav files that are on the system and I do not hear anything.  Also, my system crashes when I try to start the gnome volume manager.  

I get a error when rebooting. something about loading OAFID:GNOME_MixerApplet

----------

## NeddySeagoon

jrmontg,

Open an xterm and run alsamixer. If you don't have that, you have missed

```
emerge alsa-lib alsa-utils
```

The GNOME mixer needs them too.

Unmute and push the slders up on the PCM and Master channels.

If you want a very crude test, turn your speakers right down an do

cat /dev/urandom > /dev/dsp

Now turn you speakers up slowly ...

You should hear white noise (static). That shows your kernel is OK.

----------

## jrmontg

Yes, I can run alsamixer and I have all the levels up.

When I run cat /dev/urandom > /dev/dsp my system freezes and I have to hold down the power button to turn off.

That error that I get when I reboot says

The panel encountered a problem while loading "OAFIID:GNOME_MixerApplet".

----------

## NeddySeagoon

jrmontg,

It appears that you still have a kernrl related issue - your system should not freeze wit the cat command.

Run udevstart then list the contents of /dev/snd/ and /dev/sound.

If /dev/sound/dsp exists, try the cat again.

It may be useful to post the contents of those two sound related directories too.

----------

## PaulCompton

 *NeddySeagoon wrote:*   

> jrmontg,
> 
> It appears that you still have a kernrl related issue - your system should not freeze wit the cat command.
> 
> Run udevstart then list the contents of /dev/snd/ and /dev/sound.
> ...

 

Neddy, I'm in the same boat here.

I have an Intel 82801G and I can't get it to work. That cat freezes my machine as well. /dev/snd and /dev/sound directories before and after udevstart are as described above.

----------

