No soundcard detected after reboot

Hi,

since I connected my laptop to a USB 3 dock the laptop’s intrenal soundcard is no longer detected after reboot. (I’m not entirely sure if the problem emerged right afterwards)
KDE shows a “Dummy Output” only and no sound is being played.
What helps is to go to the sound configuration within Yast and a) delete the present configuration and b) edit the than unconfigured sound card. Yast restarts the sound system in some sort of way I was not able to do manually.

I tried quite a lot of things to resurrect the initial recognition of the card.
I deleted /etc/modprobe.d/50-sound.conf and let Yast recreate it, I tried to restart alsa via systemctl restart alsasound.service, alsactl init, tried to tinker with the alsamixer … nothing helped so far.
Recently, I booted from a Leap 15.1 live USB stick and sound worked out of the box. This should rule out hardware problems.
On another and different laptop I tested the other day it helped to add “snd-intel-dspcfg.dsp_driver=1” to the boot options. Not surprisingly, this didn’t help with this issue.

Another thing I noticed where this two messages during boot:
hdaudio hdaudioC0D0: Unable to bind the codec
See the journalctl’s snippet below:

# journalctl -b | egrep -i 'snd|codec'
Mar 13 15:14:39 thinkpad kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-5.5.8-3.g1538c30-default root=UUID=903728c8-3fc7-402b-8757-4909aca7bef2 resume=/dev/disk/by-uuid/2ffbed8e-fc8d-4e8b-9846-9a1c0aaaaac3 splash=silent quiet showopts snd-intel-dspcfg.dsp_driver=1
Mar 13 15:14:39 thinkpad kernel: Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.5.8-3.g1538c30-default root=UUID=903728c8-3fc7-402b-8757-4909aca7bef2 resume=/dev/disk/by-uuid/2ffbed8e-fc8d-4e8b-9846-9a1c0aaaaac3 splash=silent quiet showopts snd-intel-dspcfg.dsp_driver=1
Mar 13 15:14:39 thinkpad kernel: snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
Mar 13 15:14:39 thinkpad systemd-modules-load[249]: Inserted module 'snd_hda_intel'
Mar 13 15:14:39 thinkpad dracut-cmdline[273]: Using kernel command line parameters: resume=UUID=2ffbed8e-fc8d-4e8b-9846-9a1c0aaaaac3 root=UUID=903728c8-3fc7-402b-8757-4909aca7bef2 rootfstype=btrfs rootflags=rw,relatime,ssd,space_cache,subvolid=257,subvol=/@,subvol=@ BOOT_IMAGE=/boot/vmlinuz-5.5.8-3.g1538c30-default root=UUID=903728c8-3fc7-402b-8757-4909aca7bef2 resume=/dev/disk/by-uuid/2ffbed8e-fc8d-4e8b-9846-9a1c0aaaaac3 splash=silent quiet showopts snd-intel-dspcfg.dsp_driver=1
Mar 13 15:14:39 thinkpad kernel: hdaudio hdaudioC0D0: Unable to bind the codec
Mar 13 15:14:39 thinkpad kernel: hdaudio hdaudioC0D2: Unable to bind the codec
Mar 13 15:15:42 thinkpad plasmashell[2220]: org.kde.plasma: invalid metadata "/usr/lib64/qt5/plugins/k3blibsndfiledecoder.so"
Mar 13 15:28:28 thinkpad kernel: snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
Mar 13 15:28:28 thinkpad kernel: snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC257: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
Mar 13 15:28:28 thinkpad kernel: snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
Mar 13 15:28:28 thinkpad kernel: snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
Mar 13 15:28:28 thinkpad kernel: snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
Mar 13 15:28:28 thinkpad kernel: snd_hda_codec_realtek hdaudioC0D0:    inputs:
Mar 13 15:28:28 thinkpad kernel: snd_hda_codec_realtek hdaudioC0D0:      Mic=0x19
Mar 13 15:28:28 thinkpad kernel: snd_hda_codec_realtek hdaudioC0D0:      Internal Mic=0x12

Running /usr/sbin/alsa-info.shright after booting generated this output:
http://alsa-project.org/db/?f=4a9de936f55a6bc8aa6a1c7dd0e7811571cc1973

Running it again after reconfiguring the sound card with Yast resulted in this output:
http://alsa-project.org/db/?f=3c9ab3c7fa5895424e799382e21834b0ebbc52a2

I’m running out of ideas where else to look.
(This problem survived several weeks and a lot of updates of many packages.)
Any help is appreciated!

Additional info:

  • When booting the laptop connected to the USB-dock, the dock’s sound device is recognized immediately.
  • This “Dummy Audio Device” is shown within KDE no matter which user logs in after reboot
    Even a newly created user doesn’t see the internal sound device
    This leads me to the conclusion, that it’s a system wide configuration not being quite right.

cat /etc/modprobe.d/50-sound.conf

options snd slots=snd-hda-intel
# nS1_.hHmDP7YoWB0:Sunrise Point-LP HD Audio
alias snd-card-0 snd-hda-intel

For some reason the sound module doesn’t load at boot. Check for any errors in the kernel messaging…

dmesg |grep snd
 dmesg | grep snd
    4.426359] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])

    4.624156] hdaudio hdaudioC0D0: Unable to bind the codec
    4.632715] hdaudio hdaudioC0D2: Unable to bind the codec

Apart from the hdaudio messages, I don’t see any other error.

Try reloading the driver by hand

rmmod snd-hda-intel
modprobe snd-hda-intel

then check the kernel messaging again

dmesg|tail

That might provide more clues. It may be that a bug report is required.

BTW, I recommend removing ‘snd_intel_dspcfg: dsp_driver=1’ from your kernel boot config. It’s shown as present in your alsa-info.sh output you shared.

I recommend removing ‘snd_intel_dspcfg: dsp_driver=1’

Yes, thanks, I did this already. Adding this option was a test.

Reloading the snd-hda-intel (via rmmod followed by modprobe) lets the internal sound device reappear.
That is a good start. :slight_smile:
Strange, I was almost certain, I had tried this before.
Below I added the output of lsmod before and after the rmmod modprobe command as well.


thinkpad:~ # lsmod | grep snd
snd_soc_skl           180224  0
snd_soc_sst_ipc        20480  1 snd_soc_skl
snd_soc_sst_dsp        40960  1 snd_soc_skl
snd_hda_ext_core       36864  1 snd_soc_skl
snd_soc_acpi_intel_match    32768  1 snd_soc_skl
snd_soc_acpi           16384  2 snd_soc_acpi_intel_match,snd_soc_skl
snd_soc_core          286720  1 snd_soc_skl
snd_compress           28672  1 snd_soc_core
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_hda_intel          57344  0
snd_intel_dspcfg       28672  2 snd_hda_intel,snd_soc_skl
snd_hda_codec         163840  1 snd_hda_intel
snd_hwdep              16384  1 snd_hda_codec
snd_hda_core          106496  4 snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_soc_skl
snd_pcm               155648  6 snd_hda_intel,snd_hda_codec,snd_soc_core,snd_soc_skl,snd_hda_core,snd_pcm_dmaengine
snd_timer              40960  1 snd_pcm
snd                   110592  8 snd_hwdep,snd_hda_intel,snd_hda_codec,snd_timer,snd_compress,thinkpad_acpi,snd_soc_core,snd_pcm
soundcore              16384  1 snd
thinkpad:~ # rmmod snd-hda-intel
thinkpad:~ # modprobe snd-hda-intel
thinkpad:~ # dmesg | tail -n 20
 4079.892287] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
 4079.963646] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC257: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
 4079.963652] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
 4079.963656] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
 4079.963658] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
 4079.963660] snd_hda_codec_realtek hdaudioC0D0:    inputs:
 4079.963663] snd_hda_codec_realtek hdaudioC0D0:      Mic=0x19
 4079.963666] snd_hda_codec_realtek hdaudioC0D0:      Internal Mic=0x12
 4080.047129] input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1f.3/sound/card0/input15
 4080.047306] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input16
 4080.047488] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input17
 4080.047647] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input18
 4080.047864] input: HDA Intel PCH HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input19
 4080.048417] input: HDA Intel PCH HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input20
 4080.058888] input: HDA Intel PCH HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input21
 4080.059157] input: HDA Intel PCH HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input22


thinkpad:~ # lsmod | grep snd
snd_hda_codec_hdmi     73728  1
snd_hda_codec_realtek   126976  1
snd_hda_codec_generic    94208  1 snd_hda_codec_realtek
snd_hda_intel          57344  5
snd_soc_skl           180224  0
snd_soc_sst_ipc        20480  1 snd_soc_skl
snd_soc_sst_dsp        40960  1 snd_soc_skl
snd_hda_ext_core       36864  1 snd_soc_skl
snd_soc_acpi_intel_match    32768  1 snd_soc_skl
snd_soc_acpi           16384  2 snd_soc_acpi_intel_match,snd_soc_skl
snd_soc_core          286720  1 snd_soc_skl
snd_compress           28672  1 snd_soc_core
snd_pcm_dmaengine      16384  1 snd_soc_core
ledtrig_audio          16384  3 snd_hda_codec_generic,snd_hda_codec_realtek,thinkpad_acpi
snd_intel_dspcfg       28672  2 snd_hda_intel,snd_soc_skl
snd_hda_codec         163840  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hwdep              16384  1 snd_hda_codec
snd_hda_core          106496  7 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_soc_skl
snd_pcm               155648  7 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_soc_core,snd_soc_skl,snd_hda_core,snd_pcm_dmaengine
snd_timer              40960  1 snd_pcm
snd                   110592  21 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,thinkpad_acpi,snd_soc_core,snd_pcm
soundcore              16384  1 snd


I still need to figure out, what goes wrong during boot, though.

That’s good. Some kind of issue with probing perhaps. It might be that adding an explicit ‘model=’ option can be used as a workaround, and that would depend on your hardware. What model laptop do you have?

inxi -MSCxx

I still need to figure out, what goes wrong during boot, though.

As I mentioned before, that might take a bug report to resolve.
https://en.opensuse.org/openSUSE:Submitting_bug_reports

Actually, trawling though alsa-info.sh output I note that you have a Lenovo…

Manufacturer:      LENOVO
Product Name:      20L7CTO1WW
Product Version:   ThinkPad T480s
Firmware Version:  N22ET60W (1.37 )
Board Vendor:      LENOVO
Board Name:        20L7CTO1WW

Please run the alsa-info script again (after boot and then after the module is reloaded by hand), now that you have removed the ‘snd-intel-dspcfg.dsp_driver=1’ boot parameter shown in the original alsa-info.sh output…

    0.213025] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.5.8-3.g1538c30-default root=UUID=903728c8-3fc7-402b-8757-4909aca7bef2 resume=/dev/disk/by-uuid/2ffbed8e-fc8d-4e8b-9846-9a1c0aaaaac3 splash=silent quiet showopts snd-intel-dspcfg.dsp_driver=1

Some useful ALSA documentation that may aid with understanding and diagnostics…
https://www.kernel.org/doc/html/latest/sound/hd-audio/index.html

I do wonder if force-loading of ‘snd_hda_codec_realtek’ might do the trick as a workaround here. (Pure speculation on my part of course and along the lines discussed in this Debian mail thread. Read that first so that you get the idea.)

This can be done using /etc/modules-load.d/ (eg /etc/modules-load.d/0-sound.conf) with…

snd_hda_codec_realtek
snd_hda_intel

and will take effect next boot.

It may need additional modules loaded…I’m not sure, but might be worth a shot.

I’ll try your suggestion.
Here is the alsa info without the snd-intel-dspcfg.dsp_driver=1

After boot:
http://alsa-project.org/db/?f=e86f8e8c83ed8e031847f4eb56da45d14161264c

After rmmod modprobe
http://alsa-project.org/db/?f=851b6c566032d99ec8bda00825aadb55b797bf2c

Meanwhile I also read
https://en.opensuse.org/SDB:Intel-HDA_sound_problems

head -n 1 /proc/asound/card0/codec*
==> /proc/asound/card0/codec#0 <==
Codec: Realtek ALC257

==> /proc/asound/card0/codec#2 <==
Codec: Intel Kabylake HDMI

and
https://github.com/torvalds/linux/blob/master/Documentation/sound/alsa-configuration.rst

But wasn’t able to find the mentioned ALSA-Configuration.txt

And I also read this article:
https://en.opensuse.org/SDB:Audio_troubleshooting

So I assumed I might have to edit the /etc/modprobe.d/50-sound.conf
So far, I didn’t make any progress with that (Especially as I couldn’t really find possible options for the ALC257 within the ALSA-Configuration.txt as claimed within the aforementioned articles.

But, I found it via the link you provided:
https://www.kernel.org/doc/html/latest/sound/hd-audio/models.html#alc22x-23x-25x-269-27x-28x-29x-and-vendor-specific-alc3xxx-models

Next I’ll boot with

cat /etc/modprobe.d/50-sound.conf
options snd-hda-intel model=thinkpad enable=1 index=0
# nS1_.hHmDP7YoWB0:Sunrise Point-LP HD Audio
alias snd-card-0 snd-hda-intel

About the modules-load.d

Currently it looks like this

ll /etc/modules-load.d/
total 4
-rw-r--r-- 1 root root 14 Dec  8  2017 yast.conf
thinkpad:~ # cat /etc/modules-load.d/yast.conf 
snd-hda-intel

Thanks for the Debian list link. Looks good, I’ll test that and report back.

I finally found a solution.
It’s absolutely strange but deleting both

/etc/modprobe/50-sound.conf

as well as

/etc/modules-load.d/yast.conf

(the latter contained snd_hda_intel as the only line)

solved the issue.

Sound is available right after boot. Even though, Yast Sound claimes this device to be “Not configured”.

dmesg | grep snd
    7.723047] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
    7.905407] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC257: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
    7.905410] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
    7.905411] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
    7.905412] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
    7.905413] snd_hda_codec_realtek hdaudioC0D0:    inputs:
    7.905415] snd_hda_codec_realtek hdaudioC0D0:      Mic=0x19
    7.905416] snd_hda_codec_realtek hdaudioC0D0:      Internal Mic=0x12

http://alsa-project.org/db/?f=e5bfc87b1dd87f6e6eaaa2d30fff35b524c41894

Thankyou for your input!

Thanks for the update, and yes for the majority of users no explicit configuration is required.

I have the same problem on my Lenovo Thinkcentre. My current “solution” is:

vi /etc/default/grub

Find GRUB_CMDLINE_LINUX_DEFAULT and add snd-intel-dspcfg.dsp_driver=1 (older version was snd_hda_intel.dmic_detect=0) to the end of it.

grub2-mkconfig -o /boot/grub2/grub.cfg
reboot

System sound works, but not in Appications.

If you have partial sound, then check your mixer settings. Ideally, you should start a new thread for your particular issue.

I tried this as stated in the first post or so. I had tested this since this was a fix on a HP elitebook laptop I had to test.

But this is a different problem and worth a new thread.