Skip to content

snd_hda_core freezes system on warm boot or causes 100% cpu usage #4443

@nicktelindert

Description

@nicktelindert

Describe the bug
On a warm boot the snd_hda_core module cause the system to freeze completely and if it boots it causes a kworker to use 100% CPU>

I did some debugging using sysrq-trigger:
[ 1075.378322] Hardware name: HP HP Laptop 15s-fq4xxx/89BC, BIOS F.31 03/25/2023
[ 1075.378323] Workqueue: events sof_probe_work [snd_sof]
[ 1075.378335] RIP: 0010:snd_hdac_bus_send_cmd+0x5b/0xb0 [snd_hda_core]
[ 1075.378345] Code: a3 89 a9 d8 03 00 00 48 8b 43 20 48 83 c0 48 66 8b 00 0f b7 c0 3d ff ff 00 00 74 54 83 c0 01 48 8b 73 20 0f b6 c0 66 8b 56 4a <0f> b7 d2 39 d0 74 30 83 81 94 03 00 00 01 48 8b 93 28 03 00 00 89
[ 1075.378346] RSP: 0018:ffffc9000039bb68 EFLAGS: 00000002
[ 1075.378347] RAX: 0000000000000007 RBX: ffff88810250b030 RCX: ffff88810250b040
[ 1075.378348] RDX: 0000000000000007 RSI: ffffc90001650000 RDI: ffff88810250b4d8
[ 1075.378348] RBP: 00000000401f0005 R08: ffff88810250b430 R09: ffffc9000039bb40
[ 1075.378349] R10: ffff888121a4ec00 R11: 00000000fbef7bd5 R12: 0000000000000004
[ 1075.378350] R13: ffff88810250b4d8 R14: ffffc9000039bc7c R15: ffff88810250b4e0
[ 1075.378350] FS: 0000000000000000(0000) GS:ffff888277ac0000(0000) knlGS:0000000000000000
[ 1075.378351] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1075.378352] CR2: 00007fe5d2250000 CR3: 0000000105bd4002 CR4: 0000000000770ee0
[ 1075.378353] PKRU: 55555554
[ 1075.378353] Call Trace:
[ 1075.378355]
[ 1075.378355] ? nmi_cpu_backtrace+0x95/0x110
[ 1075.378358] ? nmi_cpu_backtrace_handler+0xd/0x20
[ 1075.378359] ? nmi_handle+0x5b/0x150
[ 1075.378361] ? default_do_nmi+0x42/0x1e0
[ 1075.378364] ? exc_nmi+0x1a9/0x240
[ 1075.378366] ? end_repeat_nmi+0x16/0x67
[ 1075.378367] ? snd_hdac_bus_send_cmd+0x5b/0xb0 [snd_hda_core]
[ 1075.378374] ? snd_hdac_bus_send_cmd+0x5b/0xb0 [snd_hda_core]
[ 1075.378380] ? snd_hdac_bus_send_cmd+0x5b/0xb0 [snd_hda_core]
[ 1075.378386]
[ 1075.378386]
[ 1075.378387] snd_hdac_bus_exec_verb_unlocked+0x75/0x190 [snd_hda_core]
[ 1075.378393] snd_hdac_bus_exec_verb+0x3a/0x60 [snd_hda_core]
[ 1075.378399] hda_reg_read+0x1b7/0x250 [snd_hda_core]
[ 1075.378405] snd_hdac_regmap_read_raw+0x67/0xe0 [snd_hda_core]
[ 1075.378412] snd_hdac_device_init+0x204/0x420 [snd_hda_core]
[ 1075.378419] snd_hda_codec_device_init+0xad/0x280 [snd_hda_codec]
[ 1075.378431] ? __kmalloc_node_track_caller+0x8c/0x1a0
[ 1075.378433] hda_codec_probe_bus+0x16d/0x300 [snd_sof_intel_hda]
[ 1075.378439] ? sdw_intel_acpi_scan+0x11d/0x1e0 [snd_intel_sdw_acpi]
[ 1075.378443] hda_dsp_probe+0x462/0x760 [snd_sof_intel_hda_common]
[ 1075.378452] sof_probe_work+0x2c/0x3d0 [snd_sof]
[ 1075.378459] process_one_work+0x1d9/0x3d0
[ 1075.378462] worker_thread+0x4d/0x480
[ 1075.378464] ? __pfx_worker_thread+0x10/0x10
[ 1075.378466] kthread+0xd6/0x100
[ 1075.378469] ? __pfx_kthread+0x10/0x10
[ 1075.378470] ret_from_fork+0x29/0x50
[ 1075.378473]

Reproduction Rate
Every warm boot

Expected behavior
I expect it to load the audio driver without crashing.

** Kernel driver
It seems to use this snd_sof_pci_intel_tgl driver and it reports ALC236 for its codec.

Impact
It makes the system unusable

Name of the topology file:
Topology: There is no mentioning of any topology file in the kernel log.

Name of the platform(s) on which the bug is observed.
Ubuntu 22.04, Arch Linux, Debian 12

I don´t mention a kernel because it happens on every kernel i have tried from 5.15 to 6.3.9.

I did find a workaround:
options snd-intel-dspcfg dsp_driver=1 // Switch to legacy driver
options snd-hda-intel model=dell-headset-multi

The model part is very important, without adding this model the system will still freeze.

Metadata

Metadata

Assignees

No one assigned

    Labels

    HDAApplies to HD-Audio bus for codec connectionTGLApplies to Tiger Lake platformbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions