You are not logged in.
Hi,
some months ago, presumably after a kernel update, my system started having the following problem.
After booting, it takes pretty much exactly 1 minute for the HDA Intel PCH / Realtek ALC898 audio card and devices to become available. Here's dmesg | grep snd:
[ 3.084363] snd_hda_intel 0000:00:1b.0: enabling device (0000 -> 0002)
[ 3.084614] snd_hda_intel 0000:01:00.1: enabling device (0000 -> 0002)
[ 3.084660] snd_hda_intel 0000:01:00.1: Disabling MSI
[ 3.084665] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
[ 64.559641] snd_hda_intel 0000:00:1b.0: couldn't bind with audio component
[ 64.590246] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC898: line_outs=3 (0x14/0x15/0x16/0x0/0x0) type:line
[ 64.590248] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 64.590249] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[ 64.590250] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 64.590251] snd_hda_codec_realtek hdaudioC0D0: dig-out=0x1e/0x0
[ 64.590251] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 64.590252] snd_hda_codec_realtek hdaudioC0D0: Front Mic=0x19
[ 64.590253] snd_hda_codec_realtek hdaudioC0D0: Rear Mic=0x18
[ 64.590254] snd_hda_codec_realtek hdaudioC0D0: Line=0x1a
At the 64 second mark, in this case, sound starts working correctly.
Here's lsmod | grep snd before sound starts working:
snd_hda_codec_hdmi 73728 1
snd_hda_intel 53248 0
snd_intel_dspcfg 28672 1 snd_hda_intel
snd_hda_codec 167936 2 snd_hda_codec_hdmi,snd_hda_intel
snd_hda_core 106496 3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_hwdep 16384 1 snd_hda_codec
snd_pcm 147456 4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
snd_timer 45056 1 snd_pcm
snd 114688 6 snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_timer,snd_pcm
soundcore 16384 1 snd
Here's aplay -l before sound starts working:
**** List of PLAYBACK Hardware Devices ****
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
card 1: NVidia [HDA NVidia], device 10: HDMI 4 [HDMI 4]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 11: HDMI 5 [HDMI 5]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 12: HDMI 6 [HDMI 6]
Subdevices: 1/1
Subdevice #0: subdevice #0
Here's lsmod | grep snd after sound starts working:
snd_hda_codec_realtek 135168 1
snd_hda_codec_generic 98304 1 snd_hda_codec_realtek
ledtrig_audio 16384 2 snd_hda_codec_generic,snd_hda_codec_realtek
snd_hda_codec_hdmi 73728 1
snd_hda_intel 53248 5
snd_intel_dspcfg 28672 1 snd_hda_intel
snd_hda_codec 167936 4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core 106496 5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hwdep 16384 1 snd_hda_codec
snd_pcm 147456 6 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
snd_timer 45056 3 snd_pcm
snd 114688 14 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm
soundcore 16384 1 snd
Here's aplay -l after sound starts working:
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC898 Analog [ALC898 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC898 Digital [ALC898 Digital]
Subdevices: 0/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
card 1: NVidia [HDA NVidia], device 10: HDMI 4 [HDMI 4]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 11: HDMI 5 [HDMI 5]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 12: HDMI 6 [HDMI 6]
Subdevices: 1/1
Subdevice #0: subdevice #0
I tried adding snd_hda_codec_realtek to /etc/modules-load.d/snd.conf, in which case lsmod | grep snd will be on boot exactly like after the 60 seconds, but I still have no sound and no ALC898 devices in aplay -l.
journalctl contains nothing of interest, except that after the 60 seconds, it will print
Aug 13 01:11:20 blackrabbit kernel: snd_hda_intel 0000:00:1b.0: couldn't bind with audio component
Aug 13 01:11:20 blackrabbit kernel: snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC898: line_outs=3 (0x14/0x15/0x16/0x0/0x0) type:line
Aug 13 01:11:20 blackrabbit kernel: snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
Aug 13 01:11:20 blackrabbit kernel: snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
Aug 13 01:11:20 blackrabbit kernel: snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
Aug 13 01:11:20 blackrabbit kernel: snd_hda_codec_realtek hdaudioC0D0: dig-out=0x1e/0x0
Aug 13 01:11:20 blackrabbit kernel: snd_hda_codec_realtek hdaudioC0D0: inputs:
Aug 13 01:11:20 blackrabbit kernel: snd_hda_codec_realtek hdaudioC0D0: Front Mic=0x19
Aug 13 01:11:20 blackrabbit kernel: snd_hda_codec_realtek hdaudioC0D0: Rear Mic=0x18
Aug 13 01:11:20 blackrabbit kernel: snd_hda_codec_realtek hdaudioC0D0: Line=0x1a
Aug 13 01:11:20 blackrabbit systemd[515]: Reached target Sound Card.
Aug 13 01:11:20 blackrabbit kernel: input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/sound/card0/input20
Aug 13 01:11:20 blackrabbit kernel: input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input21
Aug 13 01:11:20 blackrabbit kernel: input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input22
Aug 13 01:11:20 blackrabbit kernel: input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1b.0/sound/card0/input23
Aug 13 01:11:20 blackrabbit kernel: input: HDA Intel PCH Line Out Front as /devices/pci0000:00/0000:00:1b.0/sound/card0/input24
Aug 13 01:11:20 blackrabbit kernel: input: HDA Intel PCH Line Out Surround as /devices/pci0000:00/0000:00:1b.0/sound/card0/input25
Aug 13 01:11:20 blackrabbit kernel: input: HDA Intel PCH Line Out CLFE as /devices/pci0000:00/0000:00:1b.0/sound/card0/input26
Aug 13 01:11:20 blackrabbit kernel: input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input27
I could post my asound.conf but it doesn't matter what's in there, the problem persists.
Any ideas? I don't know how to debug this any further.
Last edited by Shapeshifter (2020-08-14 09:03:50)
Offline
card 0: PCH [HDA Intel PCH], device 0: ALC898 Analog [ALC898 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
This is your sound card when there is sound coming out and I assume this is your MB soundcard. However, this card is not visible BEFORE you play any sound.
I am suspecting there is a conflict between the Nvidia sound card and your MB soundcard.
What is the output of:
cat /proc/asound/modules
Offline
Thanks for your reply. The output of cat /proc/asound/modules before the 60 seconds is
1 snd_hda_intel
and after:
0 snd_hda_intel
1 snd_hda_intel
However, this card is not visible BEFORE you play any sound.
Not sure I understand. The card 0 is not visible for the first 60 seconds, whether or not I try to play any sound. If I try to play something before the 60 seconds, I get errors like "Can't open default PCM device: No such device", because the card and device configured in my asound.conf (http://ix.io/2u07) is not visible. After 60 seconds, it becomes available, no matter what I did before.
Last edited by Shapeshifter (2020-08-14 06:43:02)
Offline
"snd_hda_intel 0000:00:1b.0: couldn't bind with audio component" https://github.com/torvalds/linux/blob/ … 915.c#L140
Offline
The card 0 is not visible for the first 60 seconds, whether or not I try to play any sound. If I try to play something before the 60 seconds, I get errors like "Can't open default PCM device: No such device"
Your default card should be visible right from the start when the system boots. Eventually in your system t is found after 60 seconds but it should be this shouldn't be the case. I think what is happening is your MB card and Nvidia card use the same module snd_hda_intel and somehow your default card is being blocked. You should define their order with an alsa.conf in /etc/modrobe.d. I am not entirely sure how to do it with the same module name but I refer you to this as a guide.
Your asoundrc looks rather complicated so if I were you, I would try to test everything back to the barebone basics first. I would temporarily remove asoundrc (or asound.conf, just copy it somewhere) and run speaker-test -c 2. You should get a sound right away. If not then your default sound card is not defined properly. Define your card order with alsa.conf in /etc/modprobe.d, reboot and try again if the module order is rectified. Pulseaudio, if you're using it should be disabled when running speaker test. You want ALSA alone for this test.
Offline
"snd_hda_intel 0000:00:1b.0: couldn't bind with audio component" https://github.com/torvalds/linux/blob/ … 915.c#L140
This is probably pointing me in the right direction. I don't need the onboard graphics, but I see in lsmod that i915 is loaded right from the start. Honestly I simply don't understand the conditional. Where is CONFIG_MODULES defined? Why does it wait if IS_ENABLED returns false? No idea. I still don't know how to solve the issue. Just blacklisting i915 didn't work, although I can't say why as it doesn't seem to be needed by any other modules:
> lsmod | grep i915
i915 2617344 0
i2c_algo_bit 16384 1 i915
intel_gtt 24576 1 i915
drm_kms_helper 253952 2 nvidia_drm,i915
cec 69632 2 drm_kms_helper,i915
drm 581632 6 drm_kms_helper,nvidia_drm,i915
Although I don't think I should even have to be messing with this. I'm pretty sure this should work out of the box without a problem, otherwise I would consider it a bug. Having to wait 60 seconds is never reasonable.
I think what is happening is your MB card and Nvidia card use the same module snd_hda_intel and somehow your default card is being blocked. You should define their order with an alsa.conf in /etc/modrobe.d.
I'm not sure that's the case. Why would it work after 60 seconds? The nvidia card is card index 1, even from the beginning, too. So the "order", if there is such a thing, is correct, anyway.
Your asoundrc looks rather complicated so if I were you, I would try to test everything back to the barebone basics first.
Like I said, same problem without any asound.conf. I don't have pulse installed.
Last edited by Shapeshifter (2020-08-14 07:56:52)
Offline
If you don't need the onboard graphics, the most surefire way to ensure it doesn't interfere is disabling it in your UEFI/BIOS. Though I'd also think that blacklisting it should generally suffice, but it seems that as the intel hardware is generally present snd_hda_intel detects it and autoloads i915 as a result of trying to initialize the audio controller (... in which case blacklisting it harder like noted in the note should help. You could probably carefully doctor out a snd_hda_intel modprobe/options line so that it disables polling the i915 audio controller from the get go, but I still don't know of a 100% reliable way to dictate which devices are handled here. From what we know of the general logic in this thread I'd suspect
options snd_hda_intel enable=1,1,0
but either of the other two will be more guaranteed.
Last edited by V1del (2020-08-14 08:39:05)
Online
If you don't need the onboard graphics, the most surefire way to ensure it doesn't interfere is disabling it in your UEFI/BIOS.
I had already tried that. Unfortunately, the UEFI doesn't let me disable onboard graphics. I can only set PCI as priority.
Though I'd also think that blacklisting it should generally suffice, but it seems that as the intel hardware is generally present snd_hda_intel detects it and autoloads i915 as a result of trying to initialize the audio controller. You could probably carefully doctor out a snd_hda_intel modprobe/options line so that it disables polling the i915 audio controller from the get go, but I still don't know of a 100% reliable way to dictate which devices are handled here. From what we know of the general logic in this thread I'd suspect
options snd_hda_intel enable=1,1,0
I think it's
options snd_hda_intel enable=1,0
Enabling card 0 and disabling card 1. I tried this, but as I suspected, this simply disabled the NVIDIA card. Fine, I guess, since I don't use it, but still, card 0, the onboard audio, which I do use, doesn't work for the first 60 seconds. I don't think this has anything to do with the additional NVIDIA card.
I also tried adding i915 to the kernel image MODULES, so that it will sure be present if the snd_hda_intel module wants it early, but that had no effect.
I will now try to follow your suggestion of somehow convincing snd_hda_intel not to poll for i915.
Last edited by Shapeshifter (2020-08-14 09:00:14)
Offline
No the three parameters are intended (you have an i915 audio component that it doesn't find, that's the one you need to have disabled, it might also be logically reversed i.e. enable=0,1,1, maybe if enable doesn't work try probe_only=), but check my edit, it might be simpler to just prevent i915 from simply being requested at all.
Edit: But yeah I'd guess that might be a good idea to file a report, or at the very least it shouldn't block initialization of devices entirely unrelated to the one it wants to set up
Last edited by V1del (2020-08-14 09:01:09)
Online
Okay, so I found that adding module_blacklist=i915 does work around the problem. Unlike when blacklisting via /etc/modprobe.d/, where i915 is still loaded for some reason, blacklisting via the kernel line actually works. I can hardly consider the problem [solved] though.
I think I might file a bug anyway, since like I said, I can't fathom it reasonable in any scenario to just hardcode a 60 second timeout for any reason whatsoever... That's just a bad implementation.
No the three parameters are intended (you have an i915 audio component that it doesn't find, that's the one you need to have disabled, it might also be logically reversed i.e. enable=0,1,1, maybe if enable doesn't work try probe_only=), but check my edit, it might be simpler to just prevent i915 from simply being requested at all.
I read the docs for "enable=" differently, as it's talking about cards, not devices or components, but I'll give it a try.
Thanks in either case!
Offline
For the record:
options snd_hda_intel enable=1,0
disabled only the NVIDIA card
options snd_hda_intel enable=1,1,0
didn't disable anything
options snd_hda_intel enable=0,1,1
disabled the onboard audio and left the NVIDIA card enabled.
Offline