Bug 110761 - snd_hda_intel: "no codecs found" on ASUS Z170 DELUXE motherboard
Summary: snd_hda_intel: "no codecs found" on ASUS Z170 DELUXE motherboard
Status: RESOLVED UNREPRODUCIBLE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-13 17:54 UTC by deo
Modified: 2016-02-17 18:17 UTC (History)
4 users (show)

See Also:
Kernel Version: 4.4.0
Subsystem:
Regression: No
Bisected commit-id:


Attachments
relevant parts of lspci: # lspci -s 00:02.0 -vvnn; lspci -s 00:1f.3 -vvnn (3.05 KB, text/plain)
2016-01-13 17:54 UTC, deo
Details
dmesg (72.14 KB, text/plain)
2016-01-15 05:44 UTC, deo
Details
full lspci output (18.13 KB, text/plain)
2016-01-15 05:48 UTC, deo
Details
some lspci (1.29 KB, text/plain)
2016-01-16 13:36 UTC, kapsh
Details

Description deo 2016-01-13 17:54:55 UTC
Created attachment 199541 [details]
relevant parts of lspci:  # lspci -s 00:02.0 -vvnn; lspci -s 00:1f.3 -vvnn

Kernel is unable to detect codecs on ASUS Z170 DELUXE motherboard with the following messages in dmesg:

# dmesg | fgrep $'i915\nsnd'
[    8.848409] [drm] Initialized i915 1.6.0 20151010 for 0000:00:02.0 on minor 0
[    8.959855] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    9.071317] snd_hda_intel 0000:00:1f.3: CORB reset timeout#1, CORBRP = 0
[    9.072834] snd_hda_intel 0000:00:1f.3: no codecs found!
[    9.191484] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device

As a result, no sound card is present in /proc/asound/cards:

# cat /proc/asound/cards
--- no soundcards ---


Trying to load snd_hda_intel with all possible values of 'position_fix' parameter makes no difference
Comment 1 Raymond 2016-01-15 01:33:18 UTC
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/log/sound/pci/hda?qt=grep&q=sunrise

Can you post the system log?  dmesg
Comment 2 deo 2016-01-15 05:44:17 UTC
Created attachment 199691 [details]
dmesg

attached full dmesg
Comment 3 deo 2016-01-15 05:46:28 UTC
According to motherboard specification at https://www.asus.com/Motherboards/Z170-DELUXE/specifications/ , the codec on this motherboard is Realtek ALC1150
Comment 4 deo 2016-01-15 05:48:01 UTC
Created attachment 199701 [details]
full lspci output
Comment 5 kapsh 2016-01-16 13:36:59 UTC
Created attachment 199811 [details]
some lspci

I have i5-6600 and Asus H110-C. Same error occured sometimes after using pm-suspend: when my PC wakes up I have no sound at all. 
There are this messages during the boot or when I'm trying rmmod/modprobe snd_hda_intel:

[    1.146732] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops 0xffffffff818835f0)
[    1.260249] snd_hda_intel 0000:00:1f.3: CORB reset timeout#1, CORBRP = 0
[    1.261840] snd_hda_intel 0000:00:1f.3: no codecs found!

Nothing helps except cold reboot and I faced this only after suspend. 

Devices info from lspci attached.
Comment 7 kapsh 2016-01-16 16:24:14 UTC
Sorry, but if understand this commit is about incorrect nvidia behavior. But I have Realtek ALC887 on my motherboard.
Comment 8 Takashi Iwai 2016-01-16 17:33:50 UTC
It's a Skylake, and this is likely a BIOS firmware problem.
You might have an option to control the audio mode whether with DSP or not.  If yes, try to choose the legacy mode.

In order to force the codec probe, you can pass probe_mask option.  Passing a value with bit 8 enforces the probe, e.g. 0x101 is for codec #0, 0x102 for #1, 0x104 for #2 and 0x108 for #3.

I guess SKL has only a single HD-audio controller, so pass like probe_mask=0x108 would work.  For the older chips (HSW and BDW), you might have two HD-audio controllers, and need to be careful the option values to pass.  Mostly the analog codec is found on the secondary controller while HDMI/DP is the first controller.

CORB reset timeout is merely a red herring and you can ignore it.
Comment 9 deo 2016-01-20 10:04:08 UTC
Ok, I've (admittedly, somewhat hurriedly) tried this:

for mask in 01 02 04 08 10 20 40 80; do rmmod snd-hda-intel; modprobe snd-hda-intel probe_mask=0x1$mask; done

That lead to system lockup, BUT, after reset, codec is now being found without any additional module parameters:

[    8.140030] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    8.488306] snd_hda_codec_realtek hdaudioC0D0: ALC1150: SKU not ready 0x00000000
[    8.489008] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC1150: line_outs=4 (0x14/0x15/0x16/0x17/0x0) type:line
[    8.489108] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    8.489180] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[    8.489248] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
[    8.489306] snd_hda_codec_realtek hdaudioC0D0:    dig-out=0x11/0x1e
[    8.489362] snd_hda_codec_realtek hdaudioC0D0:    inputs:
[    8.489413] snd_hda_codec_realtek hdaudioC0D0:      Front Mic=0x19
[    8.489470] snd_hda_codec_realtek hdaudioC0D0:      Rear Mic=0x18
[    8.489525] snd_hda_codec_realtek hdaudioC0D0:      Line=0x1a
 

Unfortunately, now I'm unable to revert my system to its original state -- neither hard reset, nor power off, nor resetting BIOS settings to default values makes any difference. Codec is now works without any problems.

Maybe someone with still broken system can try to debug this problem further to find out, exactly which probe_mask was able to make everything work?

Or maybe someone can give some suggestions for me to try to revert my system to initial broken state, so that I can debug it more carefully
Comment 10 Takashi Iwai 2016-01-20 10:09:40 UTC
Hm, it's possible that the system state may change once when you run Windows and shutdown.  But who knows...
Comment 11 Takashi Iwai 2016-01-20 16:49:46 UTC
BTW, the crash by your quick reload script is irrelevant with the codec problem itself.  I identified the culprit of the crash, and now fixed in sound.git tree.
Comment 12 deo 2016-02-17 15:51:53 UTC
No, it's a linux-only box, so it was definitely one of those 'modprobe snd-hda-intel probe_mask=xxxx' commands which fixed everything.

I've tried all I can think of to make the codec "invisible" again (including reflashing BIOS and clearing CMOS by pulling out motherboard's battery, but to no avail -- everything just works now.

So, thanks for all help! 

Hopefully someone can later reproduce this bug again, to find out which probe_mask should really be used.

Note You need to log in before you can comment on or make changes to this bug.