# [SOLVED] Choosing a sound driver

## Dylanus

Hi all,

I have Gentoo installed running KDE, and I have no sound. When I play a video online there is no sound, and there is no sound widget on the panel. I checked my kernel configuration and I realised I have ALSA enabled, but I did not compile any drivers. The output of lspci for audio is

```
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
```

I looked on the ALSA matrix under Intel, but the names mentioned for Intel do not show up in the menuconfig for the kernel. Am I supposed to pick the one entry that mentions Intel? Or do I download and compile a different module?

Is ALSA what I need to get this working? This is my first installation of Gentoo, and I forgot about audio, as my only use for audio is watching course material, which I don't do often.

If the ALSA wiki entry is the right option to solve this, I can follow that, I just need some guidance on getting the right driver.

ThanksLast edited by Dylanus on Thu Aug 02, 2018 7:44 am; edited 1 time in total

----------

## Logicien

Hello,

from the root tree of Menuconfig go to Device Drivers/Sound card support/Advanced Linux Sound Architecture/HD-Audio/ Select HD Audio PCI and the codec for your sound card. If in doubt about the codec select all of them. You will be able to keep only the usefull one later as Linux will load it automatically.

Put everything you can in modules about sound.

----------

## Dylanus

Thanks. I've done that now. I ran make && make modules_install, but lsmod doesn't show any sound drivers, even after a reboot. Why aren't they showing up? Did I miss a step?

----------

## Logicien

It depend if you compile the sound support in modules or directly in the kernel image. In the second case there is no module to load. You must install alsa-utils if not and see with alsamixer and

```
aplay -l
```

what is the output and if there's a sound card. I have not tell you all about configuring the sound support in the Linux sources because there is a lot of options but the snd-hda-intel and the good codec for your sound card are where I conduct you.

----------

## Dylanus

So the output of aplay -l is 

```
aplay: device_list:268: no soundcards found...
```

I selected all the codecs with M instead of Y, so I would expect to see modules.

----------

## Logicien

What does output

```
find /lib/modules -iname *snd*
```

Are you sure you are using the kernel version you have compiled for snd-hda-intel? Do you have a boot partition?

----------

## Dylanus

Turns out the modules are there. I loaded each one with modprobe. I still don't have sound when I play a video. I'm using KDE and the panel does not have a speaker widget for some reason. So I'm not sure whether I have no sound because the volume is at zero, or because the sound module is not working. Do you know how to get the speaker widget to show up in KDE so I can check this? All the documentation assumes that it will be there.

----------

## Logicien

What does output

```
lsmod | grep snd
```

If you are using pulseaudio ou are better tu use pavucontrol to setup the sound card to use and the mixer level.

```
ps aux | grep pulse
```

----------

## Dylanus

lsmod | grep snd:

```
snd_hda_codec_cmedia    16384  0

snd_hda_codec_cirrus    20480  0

snd_hda_codec_hdmi     57344  0

snd_hda_codec_analog    20480  0

snd_hda_codec_ca0110    16384  0

snd_hda_codec_via      24576  0

snd_hda_codec_si3054    16384  0

snd_hda_codec_idt      53248  0

snd_hda_codec_realtek    81920  0

snd_hda_codec_conexant    20480  0

snd_hda_codec_generic    73728  8 snd_hda_codec_ca0110,snd_hda_codec_conexant,snd_hda_codec_cmedia,

    snd_hda_codec_analog,snd_hda_codec_realtek,snd_hda_codec_via,

    snd_hda_codec_cirrus,snd_hda_codec_idt

```

ps aux | grep pulse gives no output except for grep. I don't have it installed. I've seen some negative comments about it online, so I didn't install it. Do you know of any issues about it? It seemed like people dislike it for the same reasons as systemd, but I don't know enough about these issues. Is there alternative software? Or should I just install pulseaudio?

Wrapped long lines to make the forum layout behave. —Chiitoo

----------

## Jaglover

PulseAudio is a layer between ALSA and sound applications, it won't work if ALSA does not work. 

Is this a laptop? I read laptops require sometimes options passed to the sound module.

Did the sound work from installation media? If yes, check out what modules were needed.

----------

## Dylanus

I installed Pulseaudio, but I'm not really sure what to do with it. I've come from Arch, and everything was taken care of without me noticing.

I just rebooted the system, and none of the sound modules are loaded. The system does automatically load a lot of required hardware modules. Does that mean it's not recognising any of the modules as related to the sound card I have?

This is a laptop. I don't know anything about options I could pass.

When I run pulseaudio as a command all on it's own, this is the output I get:

```
W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).

W: [pulseaudio] authkey.c: Failed to open cookie file '/root/.config/pulse/cookie': No such file or directory

W: [pulseaudio] authkey.c: Failed to load authentication key '/root/.config/pulse/cookie': No such file or directory

W: [pulseaudio] authkey.c: Failed to open cookie file '/root/.pulse-cookie': No such file or directory

W: [pulseaudio] authkey.c: Failed to load authentication key '/root/.pulse-cookie': No such file or directory

E: [pulseaudio] bluez5-util.c: GetManagedObjects() failed: org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez was not provided by any .service files
```

Does this mean anything? Am I supposed to do something to set pulseaudio up?

----------

## Logicien

If everything work with Arch without passing any parameter to snd-hda-intel, we can suppose that you don't need to do it with Gentoo. Pulseaudio is intended to be use by a normal user not root and Pulseaudio is started automatically with the graphical session of a user because it is a graphical sound server.

The fact that the sound modules are not loaded with the system at boot time may be because something is wrong with the kernel version the modules. If you have kernel stuff in a boot partition and other kernel stuff in the /boot directory of the root partition this can be the cause of a mismatch where you are using an earlier version and/or configuration of the kernel than the modules compiled.

If you have a boot partition this one must always be mounted in the /boot directory at anytime something is read and write in.

Mainly you must be sure that the module snd-hda-intel is loaded and than the good codec after. Your output show only codecs loaded not snd-hda-intel who is the main module to be loaded for your sound card, unless it have been compiled in hard in the kernel image. Give the ouput of

```
find /lib/modules -iname *snd*
```

----------

## Dylanus

It's working! I checked the kernel configuration and realised that the snd-hda-intel module was actually built-in. I recompiled the kernel with that as a module and booted from that, and sound is now working. Thanks very much for your help.

I still don't have a convenient way of adjusting the volume and I can't see a widget in the KDE menu for that. Do any of you know of a way to do that?

----------

## Logicien

You can open a graphical terminal and type alsamixer. You have for sure a mixer for Kde in the Portage tree. But understand that if Pulseaudio is started with the Kde session it is Pulseaudio who manage the sound card and you are better to use Pavucontrol to manage the sound. Maybe you have a Kde frontend for Pavucontrol that you can emerge.

----------

## Dylanus

I'll give that a go tomorrow. Thanks.

----------

## Dylanus

Alsamixer works fine, thanks. I uninstalled Pulseaudio and it still works fine, so I think having the HD module installed as builtin was the problem. Everything's working well now. Thanks for your help.

----------

