You are not logged in.
As this is my first post. Maybe there will be some rules that I don't know. I will correct them when pointed out, thx.
------
Recently I found that there's a fixed red usage on a single core when I use htop, which indicates there's something wrong on my kernel or drivers.
Though It doesn't have much impact on performance of my computer, I still want to figure out what's happening.
The fixed red usage is now on CPU10. It looks like below:
After some research I found that "snd_hda_intel" is flooding at about 200,000 interrupts to CPU10 per second, which should be the cause. (See the line marked with ** at the begining)
$ cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 CPU8 CPU9 CPU10 CPU11
0: 11 0 0 0 0 0 0 0 0 0 0 0 IO-APIC 2-edge timer
8: 0 0 0 0 0 0 0 0 0 0 0 0 IO-APIC 8-edge rtc0
9: 0 0 0 0 0 0 0 0 0 0 0 0 IO-APIC 9-fasteoi acpi
14: 0 0 0 0 0 0 0 0 0 0 0 0 IO-APIC 14-fasteoi INTC1056:00
** 17: 0 0 0 0 0 0 0 0 0 0 46638404 0 IO-APIC 17-fasteoi snd_hda_intel:card0, snd_hda_intel:card1
18: 0 0 3 0 0 0 0 0 0 0 0 0 IO-APIC 18-fasteoi i801_smbus
27: 0 0 0 0 0 0 0 0 0 0 0 0 IO-APIC 27-fasteoi idma64.0, i2c_designware.0
29: 0 0 0 0 0 0 0 0 0 0 0 0 IO-APIC 29-fasteoi idma64.2, i2c_designware.2
31: 0 0 0 0 0 0 0 0 0 0 0 0 IO-APIC 31-fasteoi idma64.4, i2c_designware.4
32: 0 0 0 0 0 0 0 0 0 0 0 0 IO-APIC 32-fasteoi idma64.5, i2c_designware.5
40: 0 0 0 0 0 0 0 0 0 0 0 0 IO-APIC 40-fasteoi idma64.1, i2c_designware.1
43: 0 0 0 0 0 0 0 0 0 0 0 0 IO-APIC 43-fasteoi idma64.3, i2c_designware.3
120: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI-0000:00:01.0 0-edge PCIe PME, aerdrv
121: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI-0000:00:06.0 0-edge PCIe PME, aerdrv
122: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI-0000:00:1c.0 0-edge PCIe PME, aerdrv
123: 0 0 0 0 0 28514 0 0 0 0 0 0 PCI-MSI-0000:00:17.0 0-edge ahci[0000:00:17.0]
124: 0 0 0 0 0 0 0 17133 0 0 0 0 PCI-MSI-0000:00:14.0 0-edge xhci_hcd
125: 0 0 0 0 0 0 0 0 0 69 0 0 PCI-MSIX-0000:02:00.0 0-edge nvme0q0
126: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI-0000:01:00.2 0-edge xhci_hcd
127: 1511 0 0 0 0 0 0 0 0 0 0 0 PCI-MSIX-0000:02:00.0 1-edge nvme0q1
128: 0 1069 0 0 0 0 0 0 0 0 0 0 PCI-MSIX-0000:02:00.0 2-edge nvme0q2
129: 0 0 1786 0 0 0 0 0 0 0 0 0 PCI-MSIX-0000:02:00.0 3-edge nvme0q3
130: 0 0 0 1588 0 0 0 0 0 0 0 0 PCI-MSIX-0000:02:00.0 4-edge nvme0q4
131: 0 0 0 0 2436 0 0 0 0 0 0 0 PCI-MSIX-0000:02:00.0 5-edge nvme0q5
132: 0 0 0 0 0 3429 0 0 0 0 0 0 PCI-MSIX-0000:02:00.0 6-edge nvme0q6
133: 0 0 0 0 0 0 3015 0 0 0 0 0 PCI-MSIX-0000:02:00.0 7-edge nvme0q7
134: 0 0 0 0 0 0 0 1716 0 0 0 0 PCI-MSIX-0000:02:00.0 8-edge nvme0q8
135: 0 0 0 0 0 0 0 0 3406 0 0 0 PCI-MSIX-0000:02:00.0 9-edge nvme0q9
136: 0 0 0 0 0 0 0 0 0 1089 0 0 PCI-MSIX-0000:02:00.0 10-edge nvme0q10
137: 0 0 0 0 0 0 0 0 0 0 1494 0 PCI-MSIX-0000:02:00.0 11-edge nvme0q11
138: 0 0 0 0 0 0 0 0 0 0 0 2526 PCI-MSIX-0000:02:00.0 12-edge nvme0q12
140: 0 49 0 0 0 0 0 0 0 0 0 0 PCI-MSI-0000:00:16.0 0-edge mei_me
141: 0 0 0 0 0 0 0 0 6528 0 0 0 PCI-MSIX-0000:00:14.3 0-edge iwlwifi:default_queue
142: 124 0 0 0 0 0 0 0 0 1 0 0 PCI-MSIX-0000:00:14.3 1-edge iwlwifi:queue_1
143: 0 158 0 0 0 0 0 0 0 0 1 0 PCI-MSIX-0000:00:14.3 2-edge iwlwifi:queue_2
144: 0 0 251 0 0 0 0 0 0 0 0 1 PCI-MSIX-0000:00:14.3 3-edge iwlwifi:queue_3
145: 1 0 0 298 0 0 0 0 0 0 0 0 PCI-MSIX-0000:00:14.3 4-edge iwlwifi:queue_4
146: 0 1 0 0 507 0 0 0 0 0 0 0 PCI-MSIX-0000:00:14.3 5-edge iwlwifi:queue_5
147: 0 0 1 0 0 586 0 0 0 0 0 0 PCI-MSIX-0000:00:14.3 6-edge iwlwifi:queue_6
148: 0 0 0 1 0 0 105 0 0 0 0 0 PCI-MSIX-0000:00:14.3 7-edge iwlwifi:queue_7
149: 0 0 0 0 1 0 0 221 0 0 0 0 PCI-MSIX-0000:00:14.3 8-edge iwlwifi:queue_8
150: 0 0 0 0 0 1 0 0 244 0 0 0 PCI-MSIX-0000:00:14.3 9-edge iwlwifi:queue_9
151: 0 0 0 0 0 0 1 0 0 416 0 0 PCI-MSIX-0000:00:14.3 10-edge iwlwifi:queue_10
152: 0 0 0 0 0 0 0 1 0 0 486 0 PCI-MSIX-0000:00:14.3 11-edge iwlwifi:queue_11
153: 0 0 0 0 0 0 0 0 1 0 0 1921 PCI-MSIX-0000:00:14.3 12-edge iwlwifi:queue_12
154: 0 0 0 0 0 0 0 0 0 5 0 0 PCI-MSIX-0000:00:14.3 13-edge iwlwifi:exception
155: 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSIX-0000:03:00.0 0-edge enp3s0
156: 0 0 504 0 0 0 0 0 0 0 0 0 PCI-MSIX-0000:03:00.0 1-edge enp3s0-TxRx-0
157: 0 0 0 504 0 0 0 0 0 0 0 0 PCI-MSIX-0000:03:00.0 2-edge enp3s0-TxRx-1
158: 0 0 0 0 504 0 0 0 0 0 0 0 PCI-MSIX-0000:03:00.0 3-edge enp3s0-TxRx-2
159: 0 0 0 0 0 504 0 0 0 0 0 0 PCI-MSIX-0000:03:00.0 4-edge enp3s0-TxRx-3
160: 0 0 0 0 0 0 0 0 0 0 0 2120 PCI-MSI-0000:01:00.0 0-edge nvidia
161: 138638 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI-0000:00:02.0 0-edge i915
NMI: 1 0 2 1 1 0 1 1 1 0 71 1 Non-maskable interrupts
LOC: 130985 50088 152808 56842 43691 24475 38875 36696 47035 22503 302800 55010 Local timer interrupts
SPU: 0 0 0 0 0 0 0 0 0 0 0 0 Spurious interrupts
PMI: 1 0 2 1 1 0 1 1 1 0 71 1 Performance monitoring interrupts
IWI: 62944 436 2364 292 45 50 87 82 22 30 326 118 IRQ work interrupts
RTR: 11 0 0 0 0 0 0 0 0 0 0 0 APIC ICR read retries
RES: 513 345 1242 436 175 202 225 405 198 190 3375 305 Rescheduling interrupts
CAL: 30094 25180 27348 27463 25128 24712 29082 27645 28720 26779 30118 26115 Function call interrupts
TLB: 6080 5716 6326 5601 7427 5564 7700 6915 7395 7849 3230 5004 TLB shootdowns
TRM: 1 1 1 1 1 1 1 1 1 1 1 1 Thermal event interrupts
THR: 0 0 0 0 0 0 0 0 0 0 0 0 Threshold APIC interrupts
DFR: 0 0 0 0 0 0 0 0 0 0 0 0 Deferred Error APIC interrupts
MCE: 0 0 0 0 0 0 0 0 0 0 0 0 Machine check exceptions
MCP: 4 5 5 5 5 5 5 5 5 5 5 5 Machine check polls
ERR: 0
MIS: 0
PIN: 0 0 0 0 0 0 0 0 0 0 0 0 Posted-interrupt notification event
NPI: 0 0 0 0 0 0 0 0 0 0 0 0 Nested posted-interrupt event
PIW: 0 0 0 0 0 0 0 0 0 0 0 0 Posted-interrupt wakeup event
It can be confirmed that the fixed CPU usage is related to "snd_hda_intel" interrupts because the fixed usage CPU on htop is always the same as which the interrupts flood.
I also search about "snd_hda_intel" module and read the kernel document.
I suspect the "power_saver" or "enable_msi" maybe the problem, so I pass the kernel parameters with modprobe.
$ cat /etc/modprobe.d/snd_hda_intel.conf
options snd_hda_intel power_save=0
options snd_hda_intel power_save_controller=N
options snd_hda_intel enable_msi=0
The options are applied after reboot, but the problem still exist. Here's the module parameters for snd_hda_Intel:
$ systool -m snd_hda_intel -v
Module = "snd_hda_intel"
Attributes:
coresize = "65536"
initsize = "0"
initstate = "live"
refcnt = "7"
srcversion = "7BFCA901A2A42D9C631A5CA"
taint = ""
uevent = <store method only>
Parameters:
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"
ctl_dev_id = "N"
dmic_detect = "Y"
enable_msi = "0"
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"
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 = "0"
power_save_controller= "N"
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"
Sections:
And according to https://www.kernel.org/doc/html/latest/ … racepoints, I enable hda event tracing and find that there are so many "hda_unsol_event" flooding the screen.
$ echo 1 > /sys/kernel/tracing/events/hda/enable
$ tail -f /sys/kernel/tracing/trace
......
<idle>-0 [010] d.h2. 3975.802968: hda_unsol_event: [0000:00:1f.3:0] res=0xffffffff, res_ex=0x00000010
<idle>-0 [010] d.h2. 3975.802992: hda_unsol_event: [0000:00:1f.3:0] res=0xffffffff, res_ex=0x00000010
<idle>-0 [010] d.h2. 3975.803011: hda_unsol_event: [0000:00:1f.3:0] res=0xffffffff, res_ex=0x00000010
<idle>-0 [010] d.h2. 3975.803031: hda_unsol_event: [0000:00:1f.3:0] res=0xffffffff, res_ex=0x00000010
<idle>-0 [010] d.h2. 3975.803055: hda_unsol_event: [0000:00:1f.3:0] res=0xffffffff, res_ex=0x00000010
<idle>-0 [010] d.h2. 3975.803074: hda_unsol_event: [0000:00:1f.3:0] res=0xffffffff, res_ex=0x00000010
<idle>-0 [010] d.h2. 3975.803093: hda_unsol_event: [0000:00:1f.3:0] res=0xffffffff, res_ex=0x00000010
<idle>-0 [010] d.h2. 3975.803117: hda_unsol_event: [0000:00:1f.3:0] res=0xffffffff, res_ex=0x00000010
<idle>-0 [010] d.h2. 3975.803137: hda_unsol_event: [0000:00:1f.3:0] res=0xffffffff, res_ex=0x00000010
<idle>-0 [010] dNh2. 3975.803151: hda_unsol_event: [0000:00:1f.3:0] res=0xffffffff, res_ex=0x00000010
I wondered if this helps to pinpoint the problem.
Though the issue will only appear when I connect my HDMI to the motherboard. I can easily bypass the issue by connectting both my monitors to my dedicated graphic card, but then I have to buy a new DisplayPort cable. (My graphic card have 1 HDMI but 2 DP interfaces.)
------
A few additional infomation:
$ dmesg | grep "snd\|hda\|intel"
[ 3.811171] intel_pstate: Intel P-state driver initializing
[ 3.811805] intel_pstate: HWP enabled
[ 5.910902] intel_pmc_core INT33A1:00: initialized
[ 5.911119] intel-hid INTC1070:00: failed to enable HID power button
[ 6.202813] snd_hda_intel 0000:00:1f.3: enabling device (0000 -> 0002)
[ 6.203102] snd_hda_intel 0000:01:00.1: enabling device (0000 -> 0002)
[ 6.203138] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
[ 6.536932] intel_tcc_cooling: TCC Offset locked
[ 6.612083] intel_rapl_msr: PL4 support detected.
[ 6.612103] intel_rapl_common: Found RAPL domain package
[ 6.612104] intel_rapl_common: Found RAPL domain core
[ 6.612105] intel_rapl_common: Found RAPL domain uncore
[ 7.107747] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 8.037434] Bluetooth: hci0: Found device firmware: intel/ibt-1040-0041.sfi
[ 8.127276] snd_hda_intel 0000:00:1f.3: azx_get_response timeout, switching to polling mode: last cmd=0x000f0000
[ 9.130637] snd_hda_intel 0000:00:1f.3: Codec #0 probe error; disabling it...
[ 10.313568] usbcore: registered new interface driver snd-usb-audio
$ lspci
00:00.0 Host bridge: Intel Corporation 12th Gen Core Processor Host Bridge (rev 05)
00:01.0 PCI bridge: Intel Corporation 12th Gen Core Processor PCI Express x16 Controller #1 (rev 05)
00:02.0 VGA compatible controller: Intel Corporation Alder Lake-S GT1 [UHD Graphics 770] (rev 0c)
00:06.0 PCI bridge: Intel Corporation 12th Gen Core Processor PCI Express x4 Controller #0 (rev 05)
00:14.0 USB controller: Intel Corporation Alder Lake-S PCH USB 3.2 Gen 2x2 XHCI Controller (rev 11)
00:14.2 RAM memory: Intel Corporation Alder Lake-S PCH Shared SRAM (rev 11)
00:14.3 Network controller: Intel Corporation Alder Lake-S PCH CNVi WiFi (rev 11)
00:15.0 Serial bus controller: Intel Corporation Alder Lake-S PCH Serial IO I2C Controller #0 (rev 11)
00:15.1 Serial bus controller: Intel Corporation Alder Lake-S PCH Serial IO I2C Controller #1 (rev 11)
00:15.2 Serial bus controller: Intel Corporation Alder Lake-S PCH Serial IO I2C Controller #2 (rev 11)
00:15.3 Serial bus controller: Intel Corporation Alder Lake-S PCH Serial IO I2C Controller #3 (rev 11)
00:16.0 Communication controller: Intel Corporation Alder Lake-S PCH HECI Controller #1 (rev 11)
00:17.0 SATA controller: Intel Corporation Alder Lake-S PCH SATA Controller [AHCI Mode] (rev 11)
00:19.0 Serial bus controller: Intel Corporation Alder Lake-S PCH Serial IO I2C Controller #4 (rev 11)
00:19.1 Serial bus controller: Intel Corporation Alder Lake-S PCH Serial IO I2C Controller #5 (rev 11)
00:1c.0 PCI bridge: Intel Corporation Alder Lake-S PCH PCI Express Root Port #1 (rev 11)
00:1f.0 ISA bridge: Intel Corporation Z690 Chipset LPC/eSPI Controller (rev 11)
00:1f.3 Audio device: Intel Corporation Alder Lake-S HD Audio Controller (rev 11)
00:1f.4 SMBus: Intel Corporation Alder Lake-S PCH SMBus Controller (rev 11)
00:1f.5 Serial bus controller: Intel Corporation Alder Lake-S PCH SPI Controller (rev 11)
01:00.0 VGA compatible controller: NVIDIA Corporation TU102 [GeForce RTX 2080 Ti Rev. A] (rev a1)
01:00.1 Audio device: NVIDIA Corporation TU102 High Definition Audio Controller (rev a1)
01:00.2 USB controller: NVIDIA Corporation TU102 USB 3.1 Host Controller (rev a1)
01:00.3 Serial bus controller: NVIDIA Corporation TU102 USB Type-C UCSI Controller (rev a1)
02:00.0 Non-Volatile memory controller: Shenzhen Longsys Electronics Co., Ltd. Lexar NM800 PRO NVME SSD (rev 01)
03:00.0 Ethernet controller: Intel Corporation Ethernet Controller I225-V (rev 03)
$ lsmod | grep snd
snd_seq_dummy 12288 0
snd_hrtimer 12288 1
snd_seq 131072 7 snd_seq_dummy
snd_usb_audio 466944 6
snd_usbmidi_lib 49152 1 snd_usb_audio
snd_ump 36864 1 snd_usb_audio
snd_rawmidi 53248 2 snd_usbmidi_lib,snd_ump
snd_seq_device 16384 3 snd_seq,snd_ump,snd_rawmidi
mc 90112 1 snd_usb_audio
snd_sof_pci_intel_tgl 12288 0
snd_sof_intel_hda_common 249856 1 snd_sof_pci_intel_tgl
soundwire_intel 81920 1 snd_sof_intel_hda_common
snd_sof_intel_hda_mlink 36864 2 soundwire_intel,snd_sof_intel_hda_common
snd_sof_intel_hda 24576 1 snd_sof_intel_hda_common
snd_sof_pci 24576 2 snd_sof_intel_hda_common,snd_sof_pci_intel_tgl
snd_sof_xtensa_dsp 16384 1 snd_sof_intel_hda_common
snd_sof 434176 3 snd_sof_pci,snd_sof_intel_hda_common,snd_sof_intel_hda
snd_sof_utils 16384 1 snd_sof
snd_soc_hdac_hda 28672 1 snd_sof_intel_hda_common
snd_hda_ext_core 36864 4 snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda_mlink,snd_sof_intel_hda
snd_soc_acpi_intel_match 98304 2 snd_sof_intel_hda_common,snd_sof_pci_intel_tgl
snd_soc_acpi 16384 2 snd_soc_acpi_intel_match,snd_sof_intel_hda_common
snd_hda_codec_hdmi 94208 2
snd_soc_core 466944 4 soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hda
snd_compress 28672 1 snd_soc_core
ac97_bus 12288 1 snd_soc_core
snd_pcm_dmaengine 16384 1 snd_soc_core
snd_hda_intel 65536 5
snd_intel_dspcfg 40960 3 snd_hda_intel,snd_sof,snd_sof_intel_hda_common
snd_intel_sdw_acpi 16384 2 snd_sof_intel_hda_common,snd_intel_dspcfg
snd_hda_codec 225280 4 snd_hda_codec_hdmi,snd_hda_intel,snd_soc_hdac_hda,snd_sof_intel_hda
snd_hda_core 151552 7 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
snd_hwdep 20480 2 snd_usb_audio,snd_hda_codec
snd_pcm 204800 12 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_compress,snd_soc_core,snd_sof_utils,snd_hda_core,snd_pcm_dmaengine
snd_timer 53248 3 snd_seq,snd_hrtimer,snd_pcm
snd 159744 39 snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_sof,snd_timer,snd_compress,snd_soc_core,snd_ump,snd_pcm,snd_rawmidi
soundcore 16384 1 snd
Last edited by lyriclaw (2024-04-06 18:21:32)
Offline
Recently I found the situation happened after installing the AUR package mkinitcpio-firmware(https://aur.archlinux.org/packages/mkinitcpio-firmware/).
The problem disappeared after I remove this package and reboot.
I don't known the exact cause.
But I want to post my discovery here for people who encountered the same problem like me.
Last edited by lyriclaw (2024-04-06 18:19:32)
Offline