Bug 205625

Summary: Linux 5.4.0-rc8 Warning in dmesg but Nvidia graphics/sound card seems to work
Product: Drivers Reporter: Richard Narron (richard)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: CLOSED CODE_FIX    
Severity: low CC: tiwai
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 5.4.0-rc8-mine Subsystem:
Regression: No Bisected commit-id:
Attachments: Linux 5.4.0-rc8-mine dmesg

Description Richard Narron 2019-11-22 00:40:37 UTC
Created attachment 286017 [details]
Linux 5.4.0-rc8-mine dmesg

Linux 5.4.0-rc8 at boot time a warning appears in the dmesg but the Nvidia graphics card/hdmi audio device seems to work.

This machine has an integrated Intel sound chipset and an Nvidia graphics/sound card.

Is this a real error or can it be turned off?

Attached is the dmesg and here is the relevant part:

[    8.792159] ------------[ cut here ]------------
[    8.808738] WARNING: CPU: 1 PID: 643 at sound/hda/hdac_component.c:290 snd_hdac_acomp_init+0xd7/0x120 [snd_hda_core]
[    8.826119] Modules linked in: agpgart(E) snd_hda_codec_hdmi(E) kvm(E) i2c_algo_bit(E) fb_sys_fops(E) syscopyarea(E) irq
bypass(E) sysfillrect(E) sysimgblt(E) snd_hda_codec_via(E) xhci_pci(E) xhci_hcd(E) r8169(E) crct10dif_pclmul(E) snd_hda_cod
ec_generic(E) crc32_pclmul(E) ghash_clmulni_intel(E) intel_cstate(E) ledtrig_audio(E) i2c_i801(E) intel_rapl_perf(E) i2c_co
re(E) realtek(E) libphy(E) wmi(E) fan(E) thermal(E) snd_hda_intel(E) snd_intel_nhlt(E) snd_hda_codec(E) snd_hda_core(E) snd
_hwdep(E) snd_pcm(E) video(E) snd_timer(E) button(E) snd(E) ehci_pci(E) soundcore(E) mei_me(E) mei(E) ehci_hcd(E) lpc_ich(E
) loop(E)
[    8.921205] CPU: 1 PID: 643 Comm: kworker/1:3 Tainted: G            E     5.4.0-rc8-mine #1
[    8.941863] Hardware name: Equus Computer Systems Nobilis/P8H61-I R2.0, BIOS 1402 11/25/2014
[    8.962975] Workqueue: events azx_probe_work [snd_hda_intel]
[    8.984298] RIP: 0010:snd_hdac_acomp_init+0xd7/0x120 [snd_hda_core]
[    9.005465] Code: 41 89 c4 85 c0 78 3a 45 31 e4 48 8b 44 24 08 65 48 33 04 25 28 00 00 00 75 22 48 83 c4 10 44 89 e0 5b
5d 41 5c 41 5d 41 5e c3 <0f> 0b 41 bc f0 ff ff ff eb d6 41 bc f4 ff ff ff eb ce e8 22 3a ce
[    9.048714] RSP: 0000:ffffb67580173c28 EFLAGS: 00010286
[    9.069859] RAX: ffff92f6954a2918 RBX: ffff92f695d59000 RCX: ffff92f6999ae338
[    9.091063] RDX: 0000000000000001 RSI: 0000000000000282 RDI: ffff92f6999ae334
[    9.112151] RBP: ffff92f695d59df0 R08: 0000000000000282 R09: ffff92f695fe0cc0
[    9.133151] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffc07720c0
[    9.154115] R13: ffff92f6999ae0b0 R14: 0000000000000000 R15: 0000000000000001
[    9.175065] FS:  0000000000000000(0000) GS:ffff92f69ab00000(0000) knlGS:0000000000000000
[    9.196182] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    9.217103] CR2: 00007fce1edd8ab8 CR3: 0000000035a0a004 CR4: 00000000001606e0
[    9.237944] Call Trace:
[    9.258210]  generic_acomp_init+0x71/0x90 [snd_hda_codec_hdmi]
[    9.278532]  patch_nvhdmi+0x58/0x60 [snd_hda_codec_hdmi]
[    9.298791]  hda_codec_driver_probe+0x92/0x150 [snd_hda_codec]
[    9.318981]  really_probe+0x211/0x2a0
[    9.338667]  driver_probe_device+0x50/0xc0
[    9.358113]  ? driver_allows_async_probing+0x50/0x50
[    9.377552]  bus_for_each_drv+0x7e/0xc0
[    9.396663]  __device_attach+0xdf/0x140
[    9.415475]  bus_probe_device+0x8e/0xa0
[    9.433946]  device_add+0x374/0x650
[    9.452126]  ? _cond_resched+0x15/0x30
[    9.470112]  snd_hdac_device_register+0x12/0x60 [snd_hda_core]
[    9.488324]  snd_hda_codec_configure+0x45/0x150 [snd_hda_codec]
[    9.506472]  azx_codec_configure+0x2f/0x60 [snd_hda_codec]
[    9.524683]  azx_probe_continue+0x3c5/0x650 [snd_hda_intel]
[    9.543024]  process_one_work+0x1c5/0x3b0
[    9.561348]  worker_thread+0x4a/0x3c0
[    9.579622]  kthread+0xf9/0x130
[    9.597634]  ? current_work+0x40/0x40
[    9.615479]  ? kthread_park+0x90/0x90
[    9.633142]  ret_from_fork+0x35/0x40
[    9.650231] ---[ end trace 29ba3190486bbc69 ]---
[    9.689224] usb 1-1.3: New USB device found, idVendor=090c, idProduct=1000, bcdDevice=11.00
[    9.705854] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    9.717352] usb 1-1.3: Product: USB DISK
[    9.721111] ------------[ cut here ]------------

Here are the lspci -nn -v sound devices and the Nvidia graphics device:

00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller [8086
:1c20] (rev 05)
        Subsystem: ASUSTeK Computer Inc. 6 Series/C200 Series Chipset Family High Definition Audio Controller [1043:8415]
        Flags: bus master, fast devsel, latency 0, IRQ 30
        Memory at f7200000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: [50] Power Management version 2
        Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
        Capabilities: [100] Virtual Channel
        Capabilities: [130] Root Complex Link
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF108 [GeForce GT 430] [10de:0de1] (rev a1) (prog-if 00 [VGA
 controller])
        Subsystem: PNY GF108 [GeForce GT 430] [196e:0828]
        Flags: bus master, fast devsel, latency 0, IRQ 35
        Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
        Memory at e8000000 (64-bit, prefetchable) [size=128M]
        Memory at f0000000 (64-bit, prefetchable) [size=32M]
        I/O ports at e000 [size=128]
        Expansion ROM at 000c0000 [disabled] [size=128K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Endpoint, MSI 00
        Capabilities: [b4] Vendor Specific Information: Len=14 <?>
        Capabilities: [100] Virtual Channel
        Capabilities: [128] Power Budgeting <?>
        Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
        Kernel driver in use: nouveau
        Kernel modules: nvidiafb, nouveau

01:00.1 Audio device [0403]: NVIDIA Corporation GF108 High Definition Audio Controller [10de:0bea] (rev a1)
        Subsystem: PNY GF108 High Definition Audio Controller [196e:0828]
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at f7080000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Endpoint, MSI 00
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
Comment 1 Takashi Iwai 2019-11-22 07:39:07 UTC
It's a bogus warning that should have been removed, so just ignore it for now.
I'm going to remove it for 5.5-rc1, eventually backported to 5.4.y.
Comment 2 Takashi Iwai 2019-11-22 07:49:15 UTC
On the second thought, it sounds still strange that the init is called twice for the very same device...

Could you try to add a debug print below and see which code path is the function gets called multiple times?

--- a/sound/hda/hdac_component.c
+++ b/sound/hda/hdac_component.c
@@ -287,6 +287,7 @@ int snd_hdac_acomp_init(struct hdac_bus *bus,
        struct drm_audio_component *acomp;
        int ret;
 
+       dev_WARN(dev, "snd_hdac_acomp_init called\n");
        if (WARN_ON(hdac_get_acomp(dev)))
                return -EBUSY;
Comment 3 Takashi Iwai 2019-11-22 08:06:35 UTC
Also could you give the output of alsa-info.sh?
Run the script with --no-upload option and attach the output to Bugzilla.
Comment 4 Takashi Iwai 2019-11-22 13:06:01 UTC
It seems that the old Nvidia chips create multiple codec objects on the bus instead of multiple nodes in a single codec.  That contradicts with the audio-component framework implementation in the current form.

The easiest fix is to just revert the line:
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -3492,8 +3492,6 @@ static int patch_nvhdmi(struct hda_codec *codec)
 
 	codec->link_down_at_suspend = 1;
 
-	generic_acomp_init(codec, &nvhdmi_audio_ops, nvhdmi_port2pin);
-
 	return 0;
 }
Comment 5 Richard Narron 2019-11-22 17:37:09 UTC
The patch to patch_hdmi.c fixes the problem.  Thank you Takashi!

This fixes two machines I have with older nvidia cards.

Will this patch break newer nvidia cards?
Comment 6 Takashi Iwai 2019-11-22 18:18:30 UTC
Thanks for checking.  I fixed the issue for the upcoming pull request for 5.5-rc1, and will send the fix for 5.4.x stable once when it's merged, too.  Please keep the temporary fix until the official fix reaches out.

About the newer chips: no, the problem shouldn't appear, as the new chips have only one codec on the HD-audio bus.  I've tested my workstation, at least :)
Comment 7 Richard Narron 2019-11-29 20:10:15 UTC
The issue is fixed in release 5.4.1 and both of my machines with Nvidia cards no longer show the boot time warning.  Both machines have good sound.