Sound stopped working

Today my motherboard sound stopped working.
I left my computer running for the night and it was playing some music, when I woke up I found my computer frozen on screenlock with some sound artifacts in a loop.
After rebooting my sound doesn’t work anymore.

my sound device according to lspci:

00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)

And here are my logs

dom0 kernel: pci 0000:00:1f.3: [8086:a348] type 00 class 0x040300
dom0 kernel: pci 0000:00:1f.3: reg 0x10: [mem 0xa1330000-0xa1333fff 64bit]
dom0 kernel: pci 0000:00:1f.3: reg 0x20: [mem 0xa1000000-0xa10fffff 64bit]
dom0 kernel: pci 0000:00:1f.3: PME# supported from D3hot D3cold
dom0 kernel: snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
dom0 kernel: snd_hda_intel 0000:00:1f.3: Unknown capability 0
dom0 systemd-vconsole-setup[1011]: KD_FONT_OP_GET failed while trying to get the font metadata: Invalid argument
dom0 systemd-vconsole-setup[1011]: Fonts will not be copied to remaining consoles
dom0 kernel: snd_hda_intel 0000:00:1f.3: CORB reset timeout#1, CORBRP = 0
dom0 kernel: snd_hda_intel 0000:00:1f.3: no codecs found!
dom0 pulseaudio[4755]: Failed to find a working profile.
dom0 sudo[4787]: pam_unix(sudo:session): session opened for user root by (uid=1000)
dom0 pulseaudio[4755]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_00_1f.3" card_name="alsa_card.pci-0000_00_1f.3" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.

God, sound is such a massive mess on linux even without the Qubes overhead that I can’t even understand if this is Qubes specific or alsa/pulse/kernel specific…

Found in my logs something that looks like an alsa bug:

Mar 08 02:27:14 dom0 systemd[4966]: pulseaudio.service: Succeeded.
Mar 08 02:27:14 dom0 systemd[4966]: pulseaudio.service: Consumed 4h 21min 43.581s CPU time.
Mar 08 02:27:19 dom0 systemd[1066729]: pulseaudio.socket: Succeeded.
Mar 08 02:27:19 dom0 systemd[4966]: pulseaudio.socket: Succeeded.
Mar 08 02:28:47 dom0 rtkit-daemon[4649]: Successfully made thread 4641 of process 4641 (/usr/bin/pulseaudio) owned by '1000' high priority at nice level -11.
Mar 08 02:28:47 dom0 pulseaudio[4641]: Disabling timer-based scheduling because running inside a VM.
Mar 08 02:28:47 dom0 rtkit-daemon[4649]: Successfully made thread 4696 of process 4641 (/usr/bin/pulseaudio) owned by '1000' RT at priority 5.
Mar 08 02:28:54 dom0 systemd[3291]: pulseaudio.socket: Succeeded.
Mar 08 02:34:13 dom0 pulseaudio[4641]: ALSA woke us up to write new data to the device, but there was actually nothing to write.
Mar 08 02:34:13 dom0 pulseaudio[4641]: Most likely this is a bug in the ALSA driver 'snd_hda_intel'. Please report this issue to the ALSA developers.
Mar 08 02:34:13 dom0 pulseaudio[4641]: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.
Mar 12 02:11:03 dom0 rtkit-daemon[5624]: Successfully made thread 5609 of process 5609 (/usr/bin/pulseaudio) owned by '1000' high priority at nice level -11.
Mar 12 02:11:04 dom0 pulseaudio[5609]: Failed to find a working profile.
Mar 12 02:11:04 dom0 pulseaudio[5609]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_00_1f.3" card_name="alsa_card.pci-0000_00_1f.3" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
Mar 12 02:11:04 dom0 rtkit-daemon[5624]: Successfully made thread 5655 of process 5609 (/usr/bin/pulseaudio) owned by '1000' RT at priority 5.
Mar 12 02:11:11 dom0 systemd[4178]: pulseaudio.socket: Succeeded.
Mar 12 02:40:14 dom0 systemd[46976]: pulseaudio.socket: Succeeded.
Mar 12 02:40:15 dom0 systemd[5387]: pulseaudio.service: Succeeded.
Mar 12 02:40:15 dom0 systemd[5387]: pulseaudio.service: Consumed 33.645s CPU time.
Mar 12 02:40:15 dom0 systemd[5387]: pulseaudio.socket: Succeeded.
Mar 12 02:42:16 dom0 rtkit-daemon[4768]: Successfully made thread 4755 of process 4755 (/usr/bin/pulseaudio) owned by '1000' high priority at nice level -11.
Mar 12 02:42:16 dom0 pulseaudio[4755]: Failed to find a working profile.
Mar 12 02:42:16 dom0 pulseaudio[4755]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_00_1f.3" card_name="alsa_card.pci-0000_00_1f.3" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
Mar 12 02:42:16 dom0 rtkit-daemon[4768]: Successfully made thread 4811 of process 4755 (/usr/bin/pulseaudio) owned by '1000' RT at priority 5.

Here’s an output of alsa-info.sh

upload=true&script=true&cardinfo=
!!################################
!!ALSA Information Script v 0.4.65
!!################################

!!Script ran on:


!!Linux Distribution
!!------------------




!!DMI Information
!!---------------

Manufacturer:      To Be Filled By O.E.M.
Product Name:      To Be Filled By O.E.M.
Product Version:   To Be Filled By O.E.M.
Firmware Version:  P1.00
System SKU:        To Be Filled By O.E.M.
Board Vendor:      ASRock
Board Name:        H370M-ITX/ac


!!ACPI Device Status Information
!!---------------

/sys/bus/acpi/devices/ACPI000C:00/status 	 15
/sys/bus/acpi/devices/INT33A1:00/status 	 15
/sys/bus/acpi/devices/INT3450:00/status 	 15
/sys/bus/acpi/devices/INT3F0D:00/status 	 15
/sys/bus/acpi/devices/LNXPOWER:00/status 	 1
/sys/bus/acpi/devices/LNXPOWER:01/status 	 1
/sys/bus/acpi/devices/LNXPOWER:02/status 	 15
/sys/bus/acpi/devices/LNXPOWER:03/status 	 1
/sys/bus/acpi/devices/LNXPOWER:04/status 	 1
/sys/bus/acpi/devices/LNXPOWER:05/status 	 1
/sys/bus/acpi/devices/LNXPOWER:06/status 	 1
/sys/bus/acpi/devices/PNP0103:00/status 	 15
/sys/bus/acpi/devices/PNP0303:00/status 	 15
/sys/bus/acpi/devices/PNP0C02:03/status 	 3
/sys/bus/acpi/devices/PNP0C02:05/status 	 3
/sys/bus/acpi/devices/PNP0C04:00/status 	 31
/sys/bus/acpi/devices/PNP0C0C:00/status 	 15
/sys/bus/acpi/devices/PNP0C0E:00/status 	 11
/sys/bus/acpi/devices/PNP0C0F:00/status 	 11
/sys/bus/acpi/devices/PNP0C0F:01/status 	 11
/sys/bus/acpi/devices/PNP0C0F:02/status 	 11
/sys/bus/acpi/devices/PNP0C0F:03/status 	 11
/sys/bus/acpi/devices/PNP0C0F:04/status 	 11
/sys/bus/acpi/devices/PNP0C0F:05/status 	 11
/sys/bus/acpi/devices/PNP0C0F:06/status 	 11
/sys/bus/acpi/devices/PNP0C0F:07/status 	 11
/sys/bus/acpi/devices/PNP0F03:00/status 	 15
/sys/bus/acpi/devices/PRP00001:00/status 	 11


!!Kernel Information
!!------------------

Kernel release:    5.15.94-1.qubes.fc32.x86_64
Operating System:  GNU/Linux
Architecture:      x86_64
Processor:         x86_64
SMP Enabled:       Yes


!!ALSA Version
!!------------

Driver version:     k5.15.94-1.qubes.fc32.x86_64
Library version:    
Utilities version:  1.2.4


!!Loaded ALSA modules
!!-------------------

snd_hda_intel


!!Sound Servers on this system
!!----------------------------

Pulseaudio:
      Installed - Yes (/usr/bin/pulseaudio)
      Running - Yes


!!Soundcards recognised by ALSA
!!-----------------------------

 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xa1330000 irq 164


!!PCI Soundcards installed in the system
!!--------------------------------------

00:1f.3 Audio device [0403]: Intel Corporation Cannon Lake PCH cAVS [8086:a348] (rev 10)
	DeviceName: Onboard - Sound


!!Loaded sound module options
!!---------------------------

!!Module: snd_hda_intel
	align_buffer_size : -1
	bdl_pos_adj : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
	beep_mode : N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N
	dmic_detect : Y
	enable : Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y
	enable_msi : -1
	id : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
	index : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
	jackpoll_ms : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
	model : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
	patch : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
	pm_blacklist : Y
	position_fix : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
	power_save : 1
	power_save_controller : Y
	probe_mask : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
	probe_only : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
	single_cmd : -1
	snoop : -1


!!ALSA Device nodes
!!-----------------

crw-rw----+ 1 root audio 116,  2 Mar 12 10:53 /dev/snd/controlC0
crw-rw----+ 1 root audio 116,  1 Mar 12 10:53 /dev/snd/seq
crw-rw----+ 1 root audio 116, 33 Mar 12 10:53 /dev/snd/timer

/dev/snd/by-path:
total 0
drwxr-xr-x 2 root root  60 Mar 12 10:53 .
drwxr-xr-x 3 root root 120 Mar 12 10:53 ..
lrwxrwxrwx 1 root root  12 Mar 12 10:53 pci-0000:00:1f.3 -> ../controlC0


!!ALSA configuration files
!!------------------------

!!System wide config file (/etc/asound.conf)

#
# Place your global alsa-lib configuration here...
#


!!Aplay/Arecord output
!!--------------------

APLAY

**** List of PLAYBACK Hardware Devices ****

ARECORD

**** List of CAPTURE Hardware Devices ****

!!Amixer output
!!-------------

!!-------Mixer controls for card PCH

Card hw:0 'PCH'/'HDA Intel PCH at 0xa1330000 irq 164'
  Mixer name	: ''
  Components	: ''
  Controls      : 1
  Simple ctrls  : 1
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 254 [100%] [-0.20dB]
  Front Right: Playback 254 [100%] [-0.20dB]


!!Alsactl output
!!--------------

--startcollapse--
state.PCH {
	control.1 {
		iface MIXER
		name 'PCM Playback Volume'
		value.0 254
		value.1 254
		comment {
			access 'read write user'
			type INTEGER
			count 2
			range '0 - 255'
			tlv '0000000100000008ffffec1400000014'
			dbmin -5100
			dbmax 0
			dbvalue.0 -20
			dbvalue.1 -20
		}
	}
}
--endcollapse--


!!All Loaded Modules
!!------------------

ac97_bus
asn1_encoder
cec
cfg80211
crc32_pclmul
crc32c_intel
crct10dif_pclmul
dca
dm_bio_prison
dm_crypt
dm_persistent_data
dm_thin_pool
drm
drm_kms_helper
e1000e
ee1004
fuse
ghash_clmulni_intel
hwmon_vid
i2c_algo_bit
i2c_i801
i2c_smbus
i915
iTCO_vendor_support
iTCO_wdt
igb
intel_pch_thermal
intel_pmc_bxt
intel_powerclamp
intel_rapl_common
intel_rapl_msr
ip_tables
iwlwifi
ledtrig_audio
loop
mei
mei_hdcp
mei_me
nct6775
pcspkr
pinctrl_cannonlake
rfkill
serio_raw
snd
snd_compress
snd_hda_codec
snd_hda_core
snd_hda_ext_core
snd_hda_intel
snd_hwdep
snd_intel_dspcfg
snd_intel_sdw_acpi
snd_pcm
snd_pcm_dmaengine
snd_seq
snd_seq_device
snd_soc_acpi
snd_soc_acpi_intel_match
snd_soc_core
snd_soc_hdac_hda
snd_soc_skl
snd_soc_sst_dsp
snd_soc_sst_ipc
snd_sof
snd_sof_intel_hda
snd_sof_intel_hda_common
snd_sof_pci
snd_sof_pci_intel_cnl
snd_sof_xtensa_dsp
snd_timer
soundcore
soundwire_bus
soundwire_cadence
soundwire_generic_allocation
soundwire_intel
trusted
ttm
uinput
video
wmi
wmi_bmof
xen_acpi_processor
xen_blkback
xen_evtchn
xen_gntalloc
xen_gntdev
xen_pciback
xen_privcmd
xenfs
xhci_hcd
xhci_pci
xhci_pci_renesas


!!ALSA/HDA dmesg
!!--------------

[    2.672957] ACPI: Added _OSI(Linux-Dell-Video)
[    2.672958] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[    2.672960] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
--
[   34.254016] Already setup the GSI :16
[   34.254070] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   34.258472] snd_hda_intel 0000:00:1f.3: Unknown capability 0
[   34.365444] snd_hda_intel 0000:00:1f.3: CORB reset timeout#1, CORBRP = 0
[   34.366888] snd_hda_intel 0000:00:1f.3: no codecs found!
[   35.099977] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: discard. Quota mode: none.


!!Packages installed
!!--------------------

alsa-utils-1.2.4-2.fc32.x86_64
alsa-lib-1.2.4-5.fc32.x86_64
alsa-sof-firmware-2.1.1-1.fc32.noarch

Anything else I can try? Any more diagnostics I can do?



Ok, this is weird

this are my logs related to snd_hda_intel

Mar 08 02:28:19 dom0 kernel: snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
Mar 08 02:34:13 dom0 pulseaudio[4641]: Most likely this is a bug in the ALSA driver 'snd_hda_intel'. Please report this issue to the ALSA developers.
Mar 12 02:10:22 dom0 kernel: snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
Mar 12 02:10:22 dom0 kernel: snd_hda_intel 0000:00:1f.3: Unknown capability 0
Mar 12 02:10:22 dom0 kernel: snd_hda_intel 0000:00:1f.3: CORB reset timeout#1, CORBRP = 0
Mar 12 02:10:22 dom0 kernel: snd_hda_intel 0000:00:1f.3: no codecs found!
Mar 12 02:41:42 dom0 kernel: snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
Mar 12 02:41:42 dom0 kernel: snd_hda_intel 0000:00:1f.3: Unknown capability 0
Mar 12 02:41:42 dom0 kernel: snd_hda_intel 0000:00:1f.3: CORB reset timeout#1, CORBRP = 0
Mar 12 02:41:42 dom0 kernel: snd_hda_intel 0000:00:1f.3: no codecs found!
Mar 12 10:53:28 dom0 kernel: snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
Mar 12 10:53:28 dom0 kernel: snd_hda_intel 0000:00:1f.3: Unknown capability 0
Mar 12 10:53:28 dom0 kernel: snd_hda_intel 0000:00:1f.3: CORB reset timeout#1, CORBRP = 0
Mar 12 10:53:28 dom0 kernel: snd_hda_intel 0000:00:1f.3: no codecs found!

I maybe didn’t reboot my machine since the eight of March so maybe that bug is the cause… but what could’ve triggered it? Every time I update dom0 I reboot to check if everything is working, and everything worked since my last update.

Also the last dom0 update related to sound was on 28 February when qubes-audio-daemon and qubes-audio-dom0 were updated.
My last update was on 08 March that updated a bunch of xen packages.

That last update on 08 March was at 1:30 and that alsa bug got triggered at 2:30, but again there were updated only xen related packages… could a xen related package trigger an alsa bug?

Update: Noticed that with the next kernel update soundcard gets initialized at last and sound is working. BUT got another freeze today with stuck up sounds and slightly different ALSA error messages have reappeared (they disappeared while I wasn’t using on-board audio).

May 02 00:52:58 dom0 pulseaudio[4333]: ALSA woke us up to write new data to the device, but there was actually nothing to write.
May 02 00:52:58 dom0 pulseaudio[4333]: Most likely this is a bug in the ALSA driver 'snd_hda_intel'. Please report this issue to the ALSA developers.
May 02 00:52:58 dom0 pulseaudio[4333]: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.

If I install kernel-latest now, can I then switch to it back and forth through gui like usual?

You’ll have grub menu entries to boot with old or new kernel.