# [solved] Sound not working (as usual)

## Lokesh

I am giving up. Searching two days for finding a solution, spending hours for nothing. It is always the same after a fresh install, and in between kernels have changed so that nothing can be just repeated. So again and again, sound is not working. Sorry for this tirade, I am so frustrated that in Gentoo I have never been able to get a working sound without help.

Back to the issue. I am using plasma as DE. The system settings of plasma does not show any device under audio. 

I am having a complete output of alsa-conf.sh here. Shorter information:

```
lspci | grep -i audio

00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)

00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
```

The kernel setting:

```
lsmod |grep snd

snd_hda_codec_realtek    57795  1

snd_hda_codec_hdmi     33569  1

snd_hda_codec_generic    54501  1 snd_hda_codec_realtek

snd_hda_intel          22003  4

snd_hda_codec          87953  4 snd_hda_intel,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek

snd_hwdep               5930  1 snd_hda_codec

snd_hda_core           47952  5 snd_hda_intel,snd_hda_codec,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
```

And this is the way they were set (predominantly modular, since last time this was one of the trouble causes):

```
zgrep -i snd_hda /boot/config-4.9.34-gentoo

CONFIG_SND_HDA=m

CONFIG_SND_HDA_INTEL=m

CONFIG_SND_HDA_HWDEP=y

CONFIG_SND_HDA_RECONFIG=y

CONFIG_SND_HDA_INPUT_BEEP=y

CONFIG_SND_HDA_INPUT_BEEP_MODE=1

CONFIG_SND_HDA_PATCH_LOADER=y

CONFIG_SND_HDA_CODEC_REALTEK=m

CONFIG_SND_HDA_CODEC_ANALOG=m

# CONFIG_SND_HDA_CODEC_SIGMATEL is not set

# CONFIG_SND_HDA_CODEC_VIA is not set

CONFIG_SND_HDA_CODEC_HDMI=m

# CONFIG_SND_HDA_CODEC_CIRRUS is not set

# CONFIG_SND_HDA_CODEC_CONEXANT is not set

# CONFIG_SND_HDA_CODEC_CA0110 is not set

# CONFIG_SND_HDA_CODEC_CA0132 is not set

# CONFIG_SND_HDA_CODEC_CMEDIA is not set

# CONFIG_SND_HDA_CODEC_SI3054 is not set

CONFIG_SND_HDA_GENERIC=m

CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0

CONFIG_SND_HDA_CORE=m

CONFIG_SND_HDA_I915=y

CONFIG_SND_HDA_PREALLOC_SIZE=2048

```

And, finally:

```
aplay -L

null

    Discard all samples (playback) or generate zero samples (capture)

hdmi:CARD=HDMI,DEV=0

    HDA Intel HDMI, HDMI 0

    HDMI Audio Output

default:CARD=PCH

    HDA Intel PCH, ALC887-VD Analog

    Default Audio Device

sysdefault:CARD=PCH

    HDA Intel PCH, ALC887-VD Analog

    Default Audio Device

front:CARD=PCH,DEV=0

    HDA Intel PCH, ALC887-VD Analog

    Front speakers

surround21:CARD=PCH,DEV=0

    HDA Intel PCH, ALC887-VD Analog

    2.1 Surround output to Front and Subwoofer speakers

surround40:CARD=PCH,DEV=0

    HDA Intel PCH, ALC887-VD Analog

    4.0 Surround output to Front and Rear speakers

surround41:CARD=PCH,DEV=0

    HDA Intel PCH, ALC887-VD Analog

    4.1 Surround output to Front, Rear and Subwoofer speakers

surround50:CARD=PCH,DEV=0

    HDA Intel PCH, ALC887-VD Analog

    5.0 Surround output to Front, Center and Rear speakers

surround51:CARD=PCH,DEV=0

    HDA Intel PCH, ALC887-VD Analog

    5.1 Surround output to Front, Center, Rear and Subwoofer speakers

surround71:CARD=PCH,DEV=0

    HDA Intel PCH, ALC887-VD Analog

    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers

iec958:CARD=PCH,DEV=0

    HDA Intel PCH, ALC887-VD Digital

    IEC958 (S/PDIF) Digital Audio Output
```

Please, do not make any reference to the wiki. I already failed at the first step  *https://wiki.gentoo.org/wiki/ALSA wrote:*   

> lspci | grep -i audio
> 
> With the controller name determined, the needed driver can be found in the ALSA SoundCard Matrix

 I am not able to use the output of my lspci (which one of the 2 lines?) to identify a driver there.

----------

## tberger2

What does 

```
cat /proc/asound/card0/codec#* | grep Codec
```

 say?

What does 

```
id
```

 say?

----------

## Lokesh

```
cat /proc/asound/card0/codec#* | grep Codec

Codec: Intel Haswell HDMI
```

And

```
id

uid=1000(lokesh) gid=1000(lokesh) groups=1000(lokesh),10(wheel),18(audio),100(users)
```

I also compared several outputs of my other Linux Distro on the same computer. The main to me remarkable difference was

```
dmesg |grep audio

[    2.686968] snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC887-VD: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:line

[    2.686975] snd_hda_codec_realtek hdaudioC1D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)

[    2.686978] snd_hda_codec_realtek hdaudioC1D0:    hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)

[    2.686981] snd_hda_codec_realtek hdaudioC1D0:    mono: mono_out=0x0

[    2.686983] snd_hda_codec_realtek hdaudioC1D0:    dig-out=0x11/0x1e

[    2.686985] snd_hda_codec_realtek hdaudioC1D0:    inputs:

[    2.686987] snd_hda_codec_realtek hdaudioC1D0:      Front Mic=0x19

[    2.686989] snd_hda_codec_realtek hdaudioC1D0:      Rear Mic=0x18

[    2.686991] snd_hda_codec_realtek hdaudioC1D0:      Line=0x1a

[    2.771309] snd_hda_intel 0000:00:03.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
```

The last line is missing in this gentoo installation. 

The outputs of:

lspci -knnvvv

lspci -k

find /sys -name driver* -exec readlink '{}' \; |grep pci

grep -i 'SND_HDA_CODEC' from both kernel config files (CONFIG_SND_HDA_CODEC_REALTEK=m; CONFIG_SND_HDA_CODEC_ANALOG=m)

showed not differences

----------

## luiztux

I had a similar problem with this same kernel in a new installation as well. In my case, these messages appeared in dmesg:

```
hdaudio hdaudioC1D0: Unable to bind the codec
```

I was able to solve with:

```

cd /usr/src/linux

make clean

make && make modules_install && make install

```

Thanks Neddy for that.  :Very Happy: 

----------

## Lokesh

I tried make clean and recompile and install the kernel, without avail. Anyway, I did not have an error message in the dmesg. 

As I see to it, something is not happening. But what?

----------

## sebB

Maybe you can start on a live cd and run lsmod.

You'll see the module need for your card.

----------

## Lokesh

 *sebB wrote:*   

> Maybe you can start on a live cd and run lsmod.
> 
> You'll see the module need for your card.

 

As mentioned above, there is no difference. I am having a dual boot with Debian, sound works there. The only difference I noticed is a missing line on the Gentoo installation

```
dmesg |grep audio

.

[    2.771309] snd_hda_intel 0000:00:03.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])

.
```

This line pops up in Debian but not in Gentoo.

----------

## xaviermiller

Did you unmuted and set the output volumes with alsamixer ?

The default output is "null", is that desired?

----------

## Fitzcarraldo

This guy in the Arch Linux Forums has the same two sound cards as you: [SOLVED] Audio problems with alsa!. Have you tried the solutions in posts #14 (ALSA only) or #15 (have, or will have, PulseAudio installed)? Also see the comments in post #16. Worth a shot. In the case of #14, in Gentoo I suppose you would edit alsa.conf.

----------

## Lokesh

 *xaviermiller wrote:*   

> Did you unmuted and set the output volumes with alsamixer ?

 Sure, went through that part so many times ....

 *xaviermiller wrote:*   

> The default output is "null", is that desired?

  No, not at all. How can you see that, did you hack into my computer?

----------

## xaviermiller

Yeah, I typed "aplay -L" and "null" is the first output

EDIT: you can try to build only needed modules, and disable those you don't want (eg null or HDMI audio)

----------

## Lokesh

 *Fitzcarraldo wrote:*   

> This guy in the Arch Linux Forums has the same two sound cards as you: [SOLVED] Audio problems with alsa!. Have you tried the solutions in posts #14 (ALSA only) or #15 (have, or will have, PulseAudio installed)? Also see the comments in post #16. Worth a shot. In the case of #14, in Gentoo I suppose you would edit alsa.conf.

 

Hello again Fitzcarraldo,

thank you for the link. I followed the two solutions, both of which worked. I did not investigate all of your links, one reason being that I do not need and want Pulse Audio. 

```
/etc/modprobe.d/alsa-base.conf :

options snd-hda-intel index=0 model=auto vid=8086 pid=8c20

options snd-hda-intel index=1 model=auto vid=8086 pid=0c0c
```

or alternatively

```
/etc/asound.conf

defaults.pcm.!card PCH

defaults.ctl.!card PCH
```

Seems a matter of which card is read first? And this HDMI stuff in my outputs do not work, at least not with and how my system is wired.

Thanks again!

Lokesh

----------

## Lokesh

 *xaviermiller wrote:*   

> EDIT: you can try to build only needed modules, and disable those you don't want (eg null or HDMI audio)

  Can you give a hint or a link for a howto? 

I also do not understand the impact of the "null", apparently it is not a show stopper for sound sinceit workes and is not muted.

Cheeers

Lokesh

----------

