# Sound module not compiling correctly? [Solved]

## ObsidianBlk

I've been trying to get my sound to work for a couple days now.

I know I have the right sound card driver (intel8x0). And everything ~seems~ alright except for the soundcore module.

When I boot up I get the error that the soundcore.ko module is of an "Invalid module format". Upon reading the output of dmesg I get the following message four times...

```

soundcore: exports duplicate symbol unregister_sound_dsp (owned by kernel)

```

I have compiled the kernel with the following command:

```

make clean bzImage modules module_install

```

Still, I get this issue with my soundcore module. I'm not getting it. The only thing I can figure is that sound_dsp is compiled into the kernel somehow by a module I'm not aware of and, as such, don't know what to remove to eliminate this problem.

For reference, I'm using a Kernel2.6.20-gentoo-r8 kernel and am attempting to compile on an Acer Aspire 3000 laptop.

I have also followed as closely as I can with this thread, but I'm still having problems.

Please help!

----------

## didymos

Just to be sure, was this really the command you ran?

```

make clean bzImage modules module_install

```

Notice in the above that it's "module_install", not "modules_install".  If that's the case, you shouldn't need to do a rebuild at all.  Just switch to the kernel source directory and run

```

make modules_install

```

----------

## PaulBredbury

If you're using the in-kernel alsa, then get rid of the alsa-driver modules:

```
find /lib/modules/ -name alsa-driver -print0 | xargs -0 rm -rf
```

I switched to the in-kernel alsa yesterday. I have:

```
$ grep SOUND /usr/src/linux/.config

CONFIG_SOUND=m

# CONFIG_SOUND_PRIME is not set

$ grep SND /usr/src/linux/.config | grep "="

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_OSSEMUL=y

CONFIG_SND_MIXER_OSS=m

CONFIG_SND_PCM_OSS=m

CONFIG_SND_PCM_OSS_PLUGINS=y

CONFIG_SND_SEQUENCER_OSS=y

CONFIG_SND_RTCTIMER=m

CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y

CONFIG_SND_DYNAMIC_MINORS=y

CONFIG_SND_SUPPORT_OLD_API=y

CONFIG_SND_VERBOSE_PROCFS=y

CONFIG_SND_AC97_CODEC=m

CONFIG_SND_EMU10K1=m
```

And enable the alsasound initscript:

```
rc-update add alsasound boot
```

And get the audio levels restored on startup. In /etc/conf.d/alsasound

```
RESTORE_ON_START="yes"
```

The command to save the audio levels is:

```
alsactl -f /var/lib/alsa/asound.state store
```

Do not enable "virmidi" - it became the default sound card for me, causing my Soundblaster Audigy to be unrecognized.

Edit: Switched to modules (versus "=y"), because midi was not playing properly - presumably, /etc/modules.d/alsa was not being used.Last edited by PaulBredbury on Thu Jun 21, 2007 12:18 am; edited 1 time in total

----------

## ObsidianBlk

 *didymos wrote:*   

> Just to be sure, was this really the command you ran?
> 
> ```
> 
> make clean bzImage modules module_install
> ...

 

Actually, the code I entered was a typo. I was, indeed, calling modules_install.

The problem is, when I compile the soundcore as built-in, alsa fails with an error about not being able to load all required devices. When I compile soundcore as a module, I'm being told soundcore is an invalid format. If I try to compile all of the sound stuff into the module, I still can't seem to get it to run. This is a little frustrating.

I'm recompiling now with the following:

```

make mrproper

cp /boot/config /usr/src/linux/.config

make menuconfig

make

make modules_install

update-modules

pray-to-god

```

I also removed alsasound from rc-update, though, the code you gave PaulBredbury looks as if you compiled everything into your kernel, which is not what I'm doing... but I'm trying anyway for the hell of it.

*cough*What could possibly go wrong*cough*

----------

## PaulBredbury

 *ObsidianBlk wrote:*   

> soundcore is an invalid format.
> 
> make
> 
> make modules_install

 

Well, compile the kernel properly. Yes, properly. Otherwise, the existing "bad" modules will stay as bad modules because you haven't told the kernel to recompile them even though they already exist. Unfortunately every newbie who comes along, completely ignores the dozens of previous threads about getting alsa working. Causing my blood pressure to go through the roof, because they keep making similar mistakes.

```
make clean bzImage modules modules_install
```

----------

## ObsidianBlk

 *PaulBredbury wrote:*   

>  *ObsidianBlk wrote:*   soundcore is an invalid format.
> 
> make
> 
> make modules_install 
> ...

 

Forgive me, but I have read virtually every thread I could find on this subject, and every wiki page. I've read the alsa setup wiki page nearly ten times over, trying every config I could think of.

Upon compiling I have called:

make clean

make prproper

make menuconfig

make bzImage

make modules

make modules_install

Forgive me if I'm missing something, because, as you kindly pointed out I am a newbie, but what setting am I missing in which I am NOT compiling the kernel properly? Define "properly" please. Is there a make argument I'm suppose to be using that I've missed? Is there a module I have/don't have installed that I should/shouldn't?

I may be a newbie to linux, for the most part, but I'm not an fool who's using help forums for the first time. I have tried doing my homework and I just can't seem to get it I guess, so, please, help?

----------

## ObsidianBlk

Latest try...

```

make mrproper

cp /boot/config /usr/src/linux/.config

make menuconfig

make

make modules_install

cp arch/i386/boot/bzImage /boot/Kernel

update-modules

```

*sighs* Same problem. Am I not cleaning out the previously compiled modules properly? "make mrproper" and "make clean" are suppost to clean out old modules, aren't they, or am I confused over this?

----------

## PaulBredbury

It's mrproper, not prproper.

```
grep proper /usr/src/linux/Makefile
```

Let's make a deal. I'll show the same command that I've shown about a dozen times in various threads, and you'll run it exactly as it is. Deal?

```
make clean bzImage modules modules_install
```

That command makes sure that it recompiles the modules and puts them in /lib/modules/wherever. So that they are used by the kernel.

Then make your kernel live, e.g.:

```
cp arch/i386/boot/bzImage /boot/kernel

cp System.map /boot/System.map

cp .config /boot/config
```

Then check that your grub config actually uses thoses files. Then reboot into the new kernel.

----------

## ObsidianBlk

 *PaulBredbury wrote:*   

> It's mrproper, not prproper.
> 
> ```
> grep proper /usr/src/linux/Makefile
> ```
> ...

 

Forgive my typeos. I'm not copying and pasting from commandline but entering by hand, and my fingers tend to slip.

Now, thank you for the deal, and now I'll make you a promise... one of the first things I listed above in this thread that I tried was...

```
make clean bzImage modules modules_install
```

... and I still have my problem.

I copied the bzImage, System.map, and .config file over to my /boot directory. Grub is definitly pointing to my kernel, but... and I'll admit to missing something... is there a setting in the grub.conf to use the System.map and/or config file or is that not done automatically by the kernel itself?

Other than that, I have used the commands you have mentioned in a dozen or more threads now. I knew I hadn't missed them. My problem still persists, however. Invalid Module Format.

----------

## PaulBredbury

Is grub pointing to those exact files? There's no point in copying anything to /boot if grub doesn't use it. See thread.

----------

## ObsidianBlk

 *PaulBredbury wrote:*   

> Is grub pointing to those exact files? There's no point in copying anything to /boot if grub doesn't use it. See thread.

 

Yes... yes grub is pointing to /boot/Kernel

If it wasn't, I really do not think my computer would even be able to boot up. I don't have two, three, or more kernel options, I just use one /boot/Kernel  Seeing as how my computer is booting up, it is pointing to the right location. When I make a change in the kernel, I copy the bzImage to /boot/Kernel and, low and behold, my boot sequence changes in relation to what I changed in my last kernel compile.

----------

## PaulBredbury

Show the individual results of all these commands. Paste it at e.g. pastebin.ca and provide a link to it.

```
cat /boot/grub/menu.lst

ls -l /boot/

find /lib/modules/ -type f | xargs ls -l

grep SND /usr/src/linux/.config | grep "="

grep SOUND /usr/src/linux/.config | grep "="

uname -a

ls -l /usr/src

emerge -pv alsa-driver

cat /etc/modules.d/alsa
```

Edit: Added /etc/modules.d/alsaLast edited by PaulBredbury on Sat Jun 09, 2007 1:05 pm; edited 1 time in total

----------

## ObsidianBlk

 *PaulBredbury wrote:*   

> Show the individual results of all these commands. Paste it at e.g. pastebin.ca and provide a link to it.
> 
> ```
> cat /boot/grub/menu.lst
> 
> ...

 

Forgive me. It appeared the problem ~was~ with grub *hangs his head in shame*

I hadn't touched grub since my initial installation... I assumed everything was configured through grub.conf. It turned out... it wasn't. I resolved that issue and my sound is working excellently now.

Thank you very much for the help.

----------

## FiveFlat

How should the grub.conf look?  I only have one kernel as well and my file is quite simple:

```

default 0

timeout 3

title=Gentoo

root (hd0,0)

kernel /boot/kernel root=/dev/hda3

```

----------

## PaulBredbury

Remove the equals sign (although it might support that format also).

```
title Gentoo
```

That's fine.

----------

