qubes-issues
qubes-issues copied to clipboard
Dom0 sound card driver stops the whole machine from being suspended
Qubes OS release
R4.1
dom0 kernel 5.15.52 / 5.18.9 both have the issue; I have not been observing the issue when the kernel was 5.16.18 .
Brief summary
sof-audio-pci-intel-tgl stops the whole machine from suspending.
Output for sudo dmesg|grep sof
in dom0
[47801.255132] sof-audio-pci-intel-tgl 0000:00:1f.3: swiotlb buffer is full (sz: 512000 bytes), total 32768 (slots), used 0 (slots)
[47804.330056] sof-audio-pci-intel-tgl 0000:00:1f.3: error: cl_copy_fw: timeout HDA_DSP_SRAM_REG_ROM_STATUS read
[47804.330560] sof-audio-pci-intel-tgl 0000:00:1f.3: ------------[ DSP dump start ]------------
[47804.330563] sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware download failed
[47804.330565] sof-audio-pci-intel-tgl 0000:00:1f.3: fw_state: SOF_FW_BOOT_IN_PROGRESS (2)
[47804.330589] sof-audio-pci-intel-tgl 0000:00:1f.3: extended rom status: 0x80000006 0x14 0x0 0x0 0x0 0x0 0x25101c2 0x0
[47804.330591] sof-audio-pci-intel-tgl 0000:00:1f.3: ------------[ DSP dump end ]------------
[47804.331103] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to start DSP
[47804.331105] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to boot DSP firmware after resume -110
[47804.331134] sof-audio-pci-intel-tgl 0000:00:1f.3: error: PM_GATE ipc error -19
[47804.331158] sof-audio-pci-intel-tgl 0000:00:1f.3: failed to set requested target DSP state 0 substate 1
[47804.331160] sof-audio-pci-intel-tgl 0000:00:1f.3: error: setting dsp state 0 substate 1
[47804.331163] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to power down DSP during suspend -19
[47804.331165] sof-audio-pci-intel-tgl 0000:00:1f.3: PM: pci_pm_suspend(): snd_sof_suspend+0x0/0x10 [snd_sof] returns -19
[47804.331186] sof-audio-pci-intel-tgl 0000:00:1f.3: PM: dpm_run_callback(): pci_pm_suspend+0x0/0x160 returns -19
[47804.331201] sof-audio-pci-intel-tgl 0000:00:1f.3: PM: failed to suspend async: error -19
[47806.933526] sof-audio-pci-intel-tgl 0000:00:1f.3: error: PM_GATE ipc error -19
[47806.933552] sof-audio-pci-intel-tgl 0000:00:1f.3: failed to set requested target DSP state 0 substate 1
[47806.933556] sof-audio-pci-intel-tgl 0000:00:1f.3: error: setting dsp state 0 substate 1
[47806.933559] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to power down DSP during suspend -19
[47806.933561] sof-audio-pci-intel-tgl 0000:00:1f.3: PM: pci_pm_suspend(): snd_sof_suspend+0x0/0x10 [snd_sof] returns -19
[47806.933586] sof-audio-pci-intel-tgl 0000:00:1f.3: PM: dpm_run_callback(): pci_pm_suspend+0x0/0x160 returns -19
[47806.933595] sof-audio-pci-intel-tgl 0000:00:1f.3: PM: failed to suspend async: error -19
[47924.336370] sof-audio-pci-intel-tgl 0000:00:1f.3: error: -19 failed to prepare DSP for device removal
[47924.388982] sof-audio-pci-intel-tgl 0000:00:1f.3: error: hda_dsp_core_reset_enter: timeout on HDA_DSP_REG_ADSPCS read
[47924.388990] sof-audio-pci-intel-tgl 0000:00:1f.3: error: dsp core reset failed: core_mask 1
The device is (sudo lspci -v
)
00:1f.3 Multimedia audio controller: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20)
Subsystem: Lenovo Device 508f
Flags: fast devsel, IRQ 16
Memory at 601d380000 (64-bit, non-prefetchable) [size=16K]
Memory at 601d200000 (64-bit, non-prefetchable) [size=1M]
Capabilities: [50] Power Management version 3
Capabilities: [80] Vendor Specific Information: Len=14 <?>
Capabilities: [60] MSI: Enable- Count=1/1 Maskable- 64bit+
Kernel modules: snd_hda_intel, snd_sof_pci_intel_tgl
At time 47801 I had clicked "suspend"; however the computer did not suspend and I relogined and looked at logs only to see that sof-audio-pci-intel-tgl
have certain errors and then the computer says that suspend failed because certain device failed to suspend.
I sudo rmmod sof_audio_pci_intel_tgl
and try suspension again and it suspends.
It seems that the culprit is swiotlb buffer is full
. I do not have much of the time currently to investigate the root cause (mostly it should be a memory leak of a driver but who knows), and merely log the error here.
Steps to reproduce
- Under specified hardware and specified kernel versions, suspend and wake up for several times.
Expected behavior
Suspend always succeeds
Actual behavior
Suspend is blocked at one time.
"swiotlb buffer full" is interesting because we also see that in recent kernels that partially break sound on some intel hardware.
B
[47801.255132] sof-audio-pci-intel-tgl 0000:00:1f.3: swiotlb buffer is full (sz: 512000 bytes), total 32768 (slots), used 0 (slots)
"used 0" - sounds rather like "too small" than "full"
By default it should be 64MB, but can you verify what actual size you got? There should be a boot message about "software IO TLB"
[47801.255132] sof-audio-pci-intel-tgl 0000:00:1f.3: swiotlb buffer is full (sz: 512000 bytes), total 32768 (slots), used 0 (slots)
"used 0" - sounds rather like "too small" than "full"
By default it should be 64MB, but can you verify what actual size you got? There should be a boot message about "software IO TLB"
software IO TLB: mapped [mem 0x0000000170a00000-0x0000000174a00000] (64MB)