# Kernel 4.x and no audio...

## The_Great_Sephiroth

Alright, I have stuck with 3.18.x because ever since 4.0, I have no sound on my laptop. The kernel module builds and I can use external speakers, but the internal ones no longer work. I want to move into kernel 4.x and need help with this. The laptop is a Dell Latitude E6400. I am currently building kernel 4.4.26. I expect to have no sound when booted into it. What information do you want and I will post it. The soundcard on this system uses the intel-hda driver. My "ALSA_CARDS" is set to "intel-hda". In fact, here are a few files you may need.

My make.conf:

```

# These settings were set by the catalyst build script that automatically

# built this stage.

# Please consult /usr/share/portage/config/make.conf.example for a more

# detailed example.

CFLAGS="-march=native -mtune=native -O2 -pipe"

CXXFLAGS="${CFLAGS}"

CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3 sse4_1"

# WARNING: Changing your CHOST is not something that should be done lightly.

# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.

CHOST="x86_64-pc-linux-gnu"

# These are the USE flags that were used in addition to what is provided by the

# profile used for building.

USE="-systemd -libav -gtk -gnome a52 aac aalib acl acpi alsa audiofile avahi bash-completion bcmath bidi bindist bluetooth branding bzip2 cairo cdda cddb cdparanoia cdr cracklib crypt css ctype cups curl curlwrappers cxx dbi dbus dga djvu dri dts dv dvb dvd dvdr encode enscript exif expat fam fastcgi fbcon ffmpeg fftw flac fontconfig freetds ftp gd geoip gif gimp git glut gmp gnutls gphoto2 gpm graphviz gsl gsm gstreamer gzip hddtemp icu idn ieee1394 imagemagick imap imlib inifile inotify jack jbig joystick jpeg jpeg2k kerberos lame latex lcms ldap libass libcaca libnotify libsamplerate libwww lirc lm_sensors lua lzma lzo mad matroska memlimit mikmod mime mmap mms mng modplug mozilla mp3 mp4 mpeg mplayer mtp musepack nas ncurses netcdf networkmanager nls nptl odbc ofx ogg openal openexr opengl openmp osc pam pcmcia pcntl pda pdf png policykit posix postscript ppds python quicktime radius raw readline recode samba scanner sdl sharedmem shorten simplexml smartcard smp sndfile snmp sockets sound speex spell sqlite ssl startup-notification svg svga syslog szip taglib tcpd theora threads tiff timidity truetype udev udisks unicode upnp upnp-av upower usb v4l vaapi vcd vdpau vorbis wavpack wayland wifi wmf x264 xattr xcomposite xine xinerama xml xmlrpc xpm xscreensaver xv xvid zeroconf zlib X"

PORTDIR="/usr/portage"

DISTDIR="${PORTDIR}/distfiles"

PKGDIR="${PORTDIR}/packages"

MAKEOPTS="-j3 -l2"

EMERGE_DEFAULT_OPTS="--jobs=2 --load-average=2 --with-bdeps=y"

PYTHON_TARGETS="python2_7"

USE_PYTHON="2.7"

VIDEO_CARDS="intel i965"

ALSA_CARDS="hda-intel"

INPUT_DEVICES="evdev synaptics"

```

My /etc/modprobe.d/snd-hda-intel.conf:

```

options snd-hda-intel model=dell-m4-1

```

I can post the entire kernel configuration should you need it.

----------

## NeddySeagoon

The_Great_Sephiroth,

The kernel .config and the output of alsa-info.sh will be useful.

```
uname -a
```

might be interesting too.

----------

## The_Great_Sephiroth

OK, I cannot post my configuration. My guess is that it is too large for the forum. The "code" tag gets messed up when viewing the post and it never closes. Below is a link to my configuration file in text form. I simply did "cat /usr/src/linux/.config > conf.txt", so it is the complete configuration.

I do not have alsa-info.sh on my system. Is this a bug?

Oh and I lost my laptop speakers as expected when booting this kernel.

Kernel .config file

----------

## NeddySeagoon

The_Great_Sephiroth,

```
$ equery b alsa-info.sh

 * Searching for alsa-info.sh ... 

media-sound/alsa-utils-1.1.2 (/usr/sbin/alsa-info.sh)
```

You should have alsa-utils installed.  Its only in roots path.

wgetpaste is you friend for anything too big for a post.

Your kernel contains 

```
#

# HD-Audio

#

CONFIG_SND_HDA=y
```

so your /etc/modprobe.d/snd-hda-intel.conf is not used.

snd-hda-intel is build into the kernel, so it is initialised before root is mounted.

You can pass module parameters to build in modules by passing them on the kernel command line.

However, its a reboot to change them, not a modprobe -r followed by a modprobe.

For the investigation, build CONFIG_SND_HDA as a loadable module, then it will use /etc/modprobe.d/snd-hda-intel.conf.

That alone may be enough.  If not, we can play with parameters.  

Homework

Read enough of /usr/src/linux/Documentation/kernel-parameters.txt to know how to pass parameters to built in modules.

----------

## Jaglover

```
# CONFIG_SND_HDA_CODEC_REALTEK is not set
```

I have a similar Dell here, it has Realtek chip.

----------

## The_Great_Sephiroth

Jag, I have the correct codec built. It works flawlessly in 3.x, but not correctly in 4.x. I am listening to music on it right now, but I am using external speakers. Amaranthe is playing loud and clear, but unplugging the speakers doesn't enable the internal ones.

Neddy, I didn't even think about that. I know how to pass parameters by editing the kernel boot line in GRUB and how to make them permanent by editing /etc/default/grub. I want all of my hardware built-in, so I do not mind rebooting to pass my parameters for testing. In my entire experience with Linux, dating to the late nineties, only ONE module could not be built into the kernel. This was the ATI module. No ATI/AMD here though! If passing parameters at boot doesn't work, I will give in and do it as a module.

----------

## NeddySeagoon

The_Great_Sephiroth,

Test passing the parameters on the command line first,  if it works good.

If not, cut your losses and make CONFIG_SND_HDA a module while you go through module parameter trial and error.

There are lots to choose from.  See the kernel  ./Documentation directory.

----------

## The_Great_Sephiroth

Right. I am currently updating the system, on 23 of 28, so I will start testing once it finishes updating. Thanks for your help and advice, it is always welcome.

----------

## The_Great_Sephiroth

Sorry for the delay. I had Thanksgiving and then my first-born was born. It's been hectic. I tried this from the kernel command-line (GRUB) and it did not fix anything. I was tired and may have done it wrong. I am going to try again. If it continues to fail I will rebuild as a module.

----------

## The_Great_Sephiroth

I fixed it. I got the urge to try alsamixer in a konsole, and I had a new channel called "Speakers+LO". I turned it up and it works again. However, I cannot add this channel to kmix. Attempting to crashes kmix. I have all of my channels visible in kmix already, and this one shows up, but if I drag it over and press OK, it doesn't show up. Going in to "Select channels" a second time and attempting to select it causes a crash. Seems like a kmix bug since it works in alsamixer.

Also, my module file contains the following.

```

options snd-hda-intel model=dell-m4-1

```

To make this take effect with my built-in audio driver (built into the kernel, that is) I modified /etc/default/grub as follows.

```

GRUB_CMDLINE_LINUX_DEFAULT="snd-hda-intel model=dell-m4-1"

```

Is this correct? I believe it is but have not had to pass parameters to an ALSA module before.

----------

