# No sound after reboot?

## tmcca

I am trying to findout why my sound not working, I just got kde finished. I fixed the LPC Module, It seems the Kernel modules: snd_hda_intel not being loaded according to this and no soundcards detected. I am lost 

lspci -k results

```

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller (rev 09)

        Subsystem: ASRock Incorporation Motherboard

        Kernel driver in use: ivb_uncore

00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)

        Kernel driver in use: pcieport

00:02.0 Display controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)

        Subsystem: ASRock Incorporation Motherboard

        Kernel modules: i915

00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)

        Subsystem: ASRock Incorporation Motherboard

        Kernel driver in use: xhci_hcd

00:16.0 Communication controller: Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1 (rev 04)

        Subsystem: ASRock Incorporation Motherboard

        Kernel driver in use: mei_me

        Kernel modules: mei_me

00:1a.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 (rev 04)

        Subsystem: ASRock Incorporation Motherboard

        Kernel driver in use: ehci-pci

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

        Subsystem: ASRock Incorporation Z77 Extreme4 motherboard

        Kernel modules: snd_hda_intel

00:1c.0 PCI bridge: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 1 (rev c4)

        Kernel driver in use: pcieport

00:1c.3 PCI bridge: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 4 (rev c4)

        Kernel driver in use: pcieport

00:1c.4 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 5 (rev c4)

        Kernel driver in use: pcieport

00:1c.5 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 6 (rev c4)

        Kernel driver in use: pcieport

00:1c.7 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 8 (rev c4)

        Kernel driver in use: pcieport

00:1d.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 (rev 04)

        Subsystem: ASRock Incorporation Motherboard

        Kernel driver in use: ehci-pci

00:1f.0 ISA bridge: Intel Corporation Z77 Express Chipset LPC Controller (rev 04)

        Subsystem: ASRock Incorporation Motherboard

        Kernel driver in use: lpc_ich

        Kernel modules: lpc_ich

00:1f.2 RAID bus controller: Intel Corporation SATA Controller [RAID mode] (rev 04)

        Subsystem: ASRock Incorporation SATA Controller [RAID mode]

        Kernel driver in use: ahci

00:1f.3 SMBus: Intel Corporation 7 Series/C216 Chipset Family SMBus Controller (rev 04)

        Subsystem: ASRock Incorporation Motherboard

        Kernel driver in use: i801_smbus

01:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] (rev a1)

        Subsystem: ZOTAC International (MCO) Ltd. GP106 [GeForce GTX 1060 6GB]

        Kernel driver in use: nvidia

        Kernel modules: nvidia_drm, nvidia

01:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1)

        Subsystem: ZOTAC International (MCO) Ltd. GP106 High Definition Audio Controller

        Kernel modules: snd_hda_intel

03:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)

        Subsystem: ASRock Incorporation Motherboard

        Kernel driver in use: ahci

04:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetLink BCM57781 Gigabit Ethernet PCIe (rev 10)

        Subsystem: ASRock Incorporation Z77 Extreme4 motherboard

        Kernel driver in use: tg3

05:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 03)

07:00.0 USB controller: ASMedia Technology Inc. ASM1042 SuperSpeed USB Host Controller

        Subsystem: ASRock Incorporation Motherboard

        Kernel driver in use: xhci_hcd

```

lmod results

```

Module                  Size  Used by

nvidia_modeset       1069056  14

nvidia              18309120  704 nvidia_modeset

nf_log_ipv4            16384  1

nf_log_common          16384  1 nf_log_ipv4

xt_LOG                 16384  1

xt_limit               16384  2

xt_addrtype            16384  4

nf_conntrack_netbios_ns    16384  0

nf_conntrack_broadcast    16384  1 nf_conntrack_netbios_ns

nf_nat_ftp             16384  0

nf_nat                 32768  1 nf_nat_ftp

x86_pkg_temp_thermal    16384  0

lpc_ich                28672  0

drm_panel_orientation_quirks    16384  0

mei_me                 32768  0

mei                    73728  1 mei_me

video                  40960  0

backlight              16384  1 video

efivarfs               16384  1

```

cat /proc/asound/devices results

```

 1:        : sequencer

 33:        : timer

```

 dmesg | grep -i sound 

```
[    0.188693] Advanced Linux Sound Architecture Driver Initialized.

[    0.473554]   No soundcards found.

```

Last edited by tmcca on Thu May 30, 2019 10:37 pm; edited 2 times in total

----------

## NeddySeagoon

tmcca,

You have two sound cards

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

        Subsystem: ASRock Incorporation Z77 Extreme4 motherboard

        Kernel modules: snd_hda_intel 

01:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1)

        Subsystem: ZOTAC International (MCO) Ltd. GP106 High Definition Audio Controller

        Kernel modules: snd_hda_intel 
```

both using the snd_hda_intel module.

Did you build any codecs for snd_hda_intel to use?

----------

## tmcca

I think so went to kernel and added modules because I was unsure which one I needed.

cat /usr/src/linux/.config | grep SND_HDA

```

CONFIG_SND_HDA=m

CONFIG_SND_HDA_INTEL=m

# CONFIG_SND_HDA_HWDEP is not set

# CONFIG_SND_HDA_RECONFIG is not set

# CONFIG_SND_HDA_INPUT_BEEP is not set

# CONFIG_SND_HDA_PATCH_LOADER is not set

CONFIG_SND_HDA_CODEC_REALTEK=m

CONFIG_SND_HDA_CODEC_ANALOG=m

CONFIG_SND_HDA_CODEC_SIGMATEL=m

CONFIG_SND_HDA_CODEC_VIA=m

CONFIG_SND_HDA_CODEC_HDMI=m

CONFIG_SND_HDA_CODEC_CIRRUS=m

CONFIG_SND_HDA_CODEC_CONEXANT=m

CONFIG_SND_HDA_CODEC_CA0110=m

CONFIG_SND_HDA_CODEC_CA0132=m

# CONFIG_SND_HDA_CODEC_CA0132_DSP is not set

CONFIG_SND_HDA_CODEC_CMEDIA=m

# 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_COMPONENT=y

CONFIG_SND_HDA_I915=y

CONFIG_SND_HDA_PREALLOC_SIZE=6

```

----------

## NeddySeagoon

tmcca,

Please pastebin your dmesg output.

You have 

```
CONFIG_SND_HDA_INTEL=m
```

 and 

```
[    0.188693] Advanced Linux Sound Architecture Driver Initialized. 
```

That looks odd.

To load modular drivers, root needs to be mounted.

At 0.188693 seconds into the boot process, its unlikely root is mounted.

Post the output of 

```
uname -a
```

 too please.

----------

## tmcca

pastebin dmesg

https://pastebin.com/iLEdqx4x

uname -a

Linux otto 4.19.44-gentoo #3 SMP Mon May 27 13:12:56 EDT 2019 x86_64 Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz GenuineIntel GNU/Linux

----------

## NeddySeagoon

tmcca,

The kernel started Alsa here.

```
[    0.472356] ALSA device list:

[    0.473221]   No soundcards found.
```

and mounted root later at 

```
[    1.448041] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)

[    1.449878] VFS: Mounted root (ext4 filesystem) readonly on device 8:3.
```

Until this time no modules could be loaded as you don't use an initrd

Your running kernel is

```
4.19.44-gentoo #3 SMP Mon May 27 13:12:56 EDT 2019
```

That's build 3, built at  Mon May 27 13:12:56 EDT

As your kernel now has CONFIG_SND_HDA_INTEL=m rather than CONFIG_SND_HDA_INTEL=y, I suspect that your kernel binary in boot is not from the same kernel build as the config fragment.

Maybe, the kernel modules and binary are not from the same kernel build. 

Did you forget to mount /boot for the kernel install? 

If you recall building a kernel after Mon May 27 13:12:56 EDT 2019, then you are not running it.

Do you miss the 

```
make modules_install
```

 step

Whatever, with CONFIG_SND_HDA_INTEL=m, Alsa cannot initliase until after root is mounted. 

Ahhh

```
[    2.465636] snd: exports duplicate symbol copy_from_user_toio (owned by kernel)

[    2.480021] snd: exports duplicate symbol copy_from_user_toio (owned by kernel)
```

Your kernel and modules do not belong together. That means that something related to sound is both built into the kernel and compiled as a module.

As you cannot set both =m and =y at the same time, that's not supposed to happen.

Reinstalling your kernel and modules should get you back to a consistent state.

----------

## tmcca

I did think forgot to mount /boot

I will rebuild kernel and install modules then reboot..

----------

## tmcca

I rebuilt kernel and still issues with sound.

```
cat /boot/config-4.19.44-gentoo | grep SND_HDA
```

```
CONFIG_SND_HDA=y

CONFIG_SND_HDA_INTEL=y

# CONFIG_SND_HDA_HWDEP is not set

# CONFIG_SND_HDA_RECONFIG is not set

# CONFIG_SND_HDA_INPUT_BEEP is not set

# CONFIG_SND_HDA_PATCH_LOADER is not set

CONFIG_SND_HDA_CODEC_REALTEK=m

CONFIG_SND_HDA_CODEC_ANALOG=m

CONFIG_SND_HDA_CODEC_SIGMATEL=m

CONFIG_SND_HDA_CODEC_VIA=m

CONFIG_SND_HDA_CODEC_HDMI=m

CONFIG_SND_HDA_CODEC_CIRRUS=m

CONFIG_SND_HDA_CODEC_CONEXANT=m

CONFIG_SND_HDA_CODEC_CA0110=m

CONFIG_SND_HDA_CODEC_CA0132=m

# CONFIG_SND_HDA_CODEC_CA0132_DSP is not set

CONFIG_SND_HDA_CODEC_CMEDIA=m

# CONFIG_SND_HDA_CODEC_SI3054 is not set

CONFIG_SND_HDA_GENERIC=m

CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0

CONFIG_SND_HDA_CORE=y

CONFIG_SND_HDA_COMPONENT=y

CONFIG_SND_HDA_I915=y

CONFIG_SND_HDA_PREALLOC_SIZE=64

```

pastebin new dmesg

https://pastebin.com/2Avbs6tm

----------

## tmcca

I read somewhere that issue is the NVIDIA using snd_intel driver and shouldn't.. I am at a loss on how to get this to work.

----------

## tmcca

```
dmesg | grep -i sound

[    0.191376] Advanced Linux Sound Architecture Driver Initialized.

[    0.499982]   No soundcards found.

[    0.660130] input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input3

[    0.660789] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input4

[    0.661463] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1b.0/sound/card0/input5

[    0.662139] input: HDA Intel PCH Line Out Front as /devices/pci0000:00/0000:00:1b.0/sound/card0/input6

[    0.662830] input: HDA Intel PCH Line Out Surround as /devices/pci0000:00/0000:00:1b.0/sound/card0/input7

[    0.663521] input: HDA Intel PCH Line Out CLFE as /devices/pci0000:00/0000:00:1b.0/sound/card0/input8

[    0.664216] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input9

[    0.664908] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input10

[    0.665606] input: HDA Intel PCH HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input11

[    0.772712] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input12

[    0.773832] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input13

[    0.774566] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input14

[    0.775256] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input15

```

Ok now what? I think I want the Intel one but which one?

[Moderator edit: added [code] tags to preserve output layout. -Hu]

----------

## NeddySeagoon

tmcca,

Thats better. Your kernel is self consistent. The error has become

```
[    0.472183] hdaudio hdaudioC0D0: Unable to bind the codec

[    0.473369] hdaudio hdaudioC0D3: Unable to bind the codec

[    0.475014] hdaudio hdaudioC1D0: Unable to bind the codec
```

but all the codecs are =M and ALSA is initalising before root is mounted, so codecs cannot be loaded.

That's a step in the right direction.

Reconfigure you kernel with CONFIG_SND=m. I suspect its =y now.

You must use menuconfig for this as everything under the menu will be affected.

All the bits need to come together at the same time, that is, built into the kernel, so they are available before root is mounted, or build as modules, so ALSA starts after root is mounted.

If you have ever used a text editor on the kernel .config, throw it away and  start configuring your kernel again.

Some meneconfig options flip more than six .config file options and an illegal kernel config causes strange hard to diagnose problems. 

Having two (or more) cards using the same driver is OK. The default sound card can be configured but first we need the sound devices to show in /proc/asound/devices

----------

## krinn

 *NeddySeagoon wrote:*   

> All the bits need to come together at the same time, that is, built into the kernel, so they are available before root is mounted, or build as modules, so ALSA starts after root is mounted.

 

Agree with NeddySeagoon, kernel ends with freeing memory, so anything before that message is done from kernel, anything after it, is done by user land tools.

```
[    1.350917] Freeing unused kernel image memory: 1236K
```

The only explains about your alsa message coming prior that is that the module is loaded by initram, or that it's not a module at all

----------

## NeddySeagoon

krinn,

There is no initrd. dmesg would show it if it was there.

----------

## tmcca

Do you need initrd? I am going to try it soon.

----------

## NeddySeagoon

tmcca,

An initrd is a complication you do not need.

Its only required if you need userspace programs to make the root filesystem visible.

My root is on LVM which is on raid5, so my initrd starts the raid set, then starts the logical volnumes and only then can the kernel see the root filesystem.

----------

## krinn

 *NeddySeagoon wrote:*   

> krinn,
> 
> There is no initrd. dmesg would show it if it was there.

 

so, wrong kernel if user think it's a module and it's not one in real.

----------

## tmcca

I think getting somewhere but now not sure if it's browser (Firefox) or something still wrong. I did fix some things as well like disabled integrated graphics whic was giving me drm errors that looks like it's fixed as well. How do I test now in terminal? 

```
cat /proc/asound/devices

  2: [ 0- 0]: digital audio playback

  3: [ 0- 0]: digital audio capture

  4: [ 0- 1]: digital audio playback

  5: [ 0- 2]: digital audio capture

  6: [ 0- 0]: hardware dependent

  7: [ 0]   : control

  8: [ 1- 3]: digital audio playback

  9: [ 1- 7]: digital audio playback

 10: [ 1- 8]: digital audio playback

 11: [ 1- 9]: digital audio playback

 12: [ 1- 0]: hardware dependent

 13: [ 1]   : control

 33:        : timer

```

here is my dmesg:

https://pastebin.com/2v89FnMn

----------

## krinn

Should be https://wiki.gentoo.org/wiki/ALSA#HTML5_does_not_play_in_the_Firefox_browser

You can easy check if you need that with

```
LC_ALL=C aplay -l

**** List of PLAYBACK Hardware Devices ****

card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]

  Subdevices: 0/1

  Subdevice #0: subdevice #0

card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]

  Subdevices: 1/1

...

```

intel should appears first, or if you prefer, as default

----------

## tmcca

I am running HDMI to monitor through NVIDIA card just a note

```
LC_ALL=C aplay -l

**** List of PLAYBACK Hardware Devices ****

card 0: PCH [HDA Intel PCH], device 0: Generic Analog [Generic Analog]

  Subdevices: 0/1

  Subdevice #0: subdevice #0

card 0: PCH [HDA Intel PCH], device 1: Generic Digital [Generic Digital]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

```

I checked to see if I had sound with this:

speaker-test -t wav -c 6

and no sound? Do I have to make some sort of file? I am confused

----------

## krinn

no, just check the bases for now: volume is up and unmute? (it's most of the time as easy as that)

```
amixer set Master 100 unmute
```

----------

## krinn

 *tmcca wrote:*   

> I am running HDMI to monitor through NVIDIA card just a note

 

oh i miss that sorry, probably need a file to configure the hmdi, in my previous link all is explains if i remember well.

----------

## tmcca

getting somewhere. I ran this

```
aplay -L

null

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

pulse

    PulseAudio Sound Server

default:CARD=PCH

    HDA Intel PCH, Generic Analog

    Default Audio Device

sysdefault:CARD=PCH

    HDA Intel PCH, Generic Analog

    Default Audio Device

front:CARD=PCH,DEV=0

    HDA Intel PCH, Generic Analog

    Front speakers

surround21:CARD=PCH,DEV=0

    HDA Intel PCH, Generic Analog

    2.1 Surround output to Front and Subwoofer speakers

surround40:CARD=PCH,DEV=0

    HDA Intel PCH, Generic Analog

    4.0 Surround output to Front and Rear speakers

surround41:CARD=PCH,DEV=0

    HDA Intel PCH, Generic Analog

    4.1 Surround output to Front, Rear and Subwoofer speakers

surround50:CARD=PCH,DEV=0

    HDA Intel PCH, Generic Analog

    5.0 Surround output to Front, Center and Rear speakers

surround51:CARD=PCH,DEV=0

    HDA Intel PCH, Generic Analog

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

surround71:CARD=PCH,DEV=0

    HDA Intel PCH, Generic Analog

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

iec958:CARD=PCH,DEV=0

    HDA Intel PCH, Generic Digital

    IEC958 (S/PDIF) Digital Audio Output

usbstream:CARD=PCH

    HDA Intel PCH

    USB Stream Output

hdmi:CARD=NVidia,DEV=0

    HDA NVidia, HDMI 0

    HDMI Audio Output

hdmi:CARD=NVidia,DEV=1

    HDA NVidia, HDMI 1

    HDMI Audio Output

hdmi:CARD=NVidia,DEV=2

    HDA NVidia, HDMI 2

    HDMI Audio Output

hdmi:CARD=NVidia,DEV=3

    HDA NVidia, HDMI 3

    HDMI Audio Output

usbstream:CARD=NVidia

    HDA NVidia

    USB Stream Output

```

ran this speaker-test -c 2 -r 48000 -D hw:1,7

and now I hear sound,

so I am guessing make this in /etc/asound.conf or?

----------

## tmcca

I added the following to /etc/modprobe.d/alsa.conf

options snd_hda_intel index=1,0

Now I have Nvidia on top. second one is the one that I hear sound from. hw0,7 how do I make this the default one to use?

```
aplay -l

**** List of PLAYBACK Hardware Devices ****

card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]

  Subdevices: 0/1

  Subdevice #0: subdevice #0

card 0: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]

  Subdevices: 0/1

  Subdevice #0: subdevice #0

card 0: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 0: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 1: PCH [HDA Intel PCH], device 0: ALC898 Analog [ALC898 Analog]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 1: PCH [HDA Intel PCH], device 1: ALC898 Digital [ALC898 Digital]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

```

----------

## tmcca

Now it's working.

My soulution just in case someone else has isssues.

```
/etc/modprobe.d/alsa.conf

# Set this to the correct number of cards.

options snd cards_limit=2

options snd-hda-intel id=NVidia index=2

```

```
/etc/asound.conf

defaults.pcm.!card NVidia

defaults.pcm.!device 7

defaults.pcm.!ctl NVidia

```

----------

## tmcca

Now I lost sound after reboot.. I do have /var/tmp/portage at tmpfs.

When I do speaker-test get this error

```
Playback device is default

Stream parameters are 48000Hz, S16_LE, 1 channels

Using 16 octaves of pink noise

ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.8/work/alsa-lib-1.1.8/src/pcm/pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave

Playback open error: -2,No such file or directory
```

[Moderator edit: added [code] tags to preserve output layout. -Hu]

----------

