High CPU frequency and temperature while charging

Hello,

During charging on Manjaro KDE, the CPU temperature reaches ~77C.
The reason seems to be the CPU load that is higher than usual (normally it stays at the minimum 1.20 GHz in idle with the conservative governor).

$ sudo cpupower frequency-info && cat /proc/cpuinfo | grep "MHz"
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 1.20 GHz - 4.46 GHz
  available frequency steps:  3.20 GHz, 1.30 GHz, 1.20 GHz
  available cpufreq governors: conservative ondemand userspace powersave performance schedutil
  current policy: frequency should be within 1.20 GHz and 3.20 GHz.
                  The governor "conservative" may decide which speed to use
                  within this range.
  current CPU frequency: 1.20 GHz (asserted by call to hardware)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3200MHz
    Pstate-P1:  1300MHz
    Pstate-P2:  1200MHz
cpu MHz         : 2814.759
cpu MHz         : 2930.085
cpu MHz         : 2988.454
cpu MHz         : 3966.650
cpu MHz         : 3651.625
cpu MHz         : 4170.143
cpu MHz         : 2488.129
cpu MHz         : 3335.907
cpu MHz         : 3227.493
cpu MHz         : 3164.581
cpu MHz         : 3247.575
cpu MHz         : 3350.503
cpu MHz         : 3348.081
cpu MHz         : 3072.870
cpu MHz         : 3233.953
cpu MHz         : 3336.623

Running top, I see this command/process with high CPU usage:
irq/79-ACPI:Eve
What is this and why it’s using the CPU so much?

The temperature drops to ~60C when the battery reaches 90% charge and that process is gone when it’s fully charged.

Also, as a side question, why does cpupower report 1.20 GHz frequency while /proc/cpuinfo shows above 3 GHz?

System info:

System:
  Kernel: 5.10.59-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 
  root=UUID=2c7eabfe-e72e-4af0-88fc-ee6f581a53cd rw quiet udev.log_priority=3 
  nowatchdog resume=/dev/disk/by-uuid/2c7eabfe-e72e-4af0-88fc-ee6f581a53cd 
  resume_offset=1413120 
  Desktop: KDE Plasma 5.22.4 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 dm: SDDM 
  Distro: Manjaro Linux base: Arch Linux 
Machine:
  Type: Laptop System: TIMI product: RedmiBook Pro 15S v: N/A serial: <filter> 
  Chassis: type: 10 serial: <filter> 
  Mobo: TIMI model: TM2019 v: V44B2 serial: <filter> UEFI: TIMI 
  v: RMACZ5B0P0303 date: 03/26/2021 
Battery:
  ID-1: BATT charge: 71.7 Wh (100.0%) condition: 71.7/70.0 Wh (102.4%) 
  volts: 15.4 min: 15.4 model: SCUD R15B02W type: Li-ion serial: <filter> 
  status: Full cycles: -1 
Memory:
  RAM: total: 15.05 GiB used: 3.23 GiB (21.4%) 
  RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:
  Info: 8-Core model: AMD Ryzen 7 5800H with Radeon Graphics bits: 64 
  type: MT MCP arch: Zen 3 family: 19 (25) model-id: 50 (80) stepping: 0 
  microcode: A50000C cache: L2: 4 MiB bogomips: 102243 
  Speed: 1135 MHz min/max: 1200/3200 MHz boost: enabled Core speeds (MHz): 
  1: 1135 2: 1141 3: 1297 4: 1296 5: 1135 6: 1134 7: 1297 8: 1296 9: 1135 
  10: 1133 11: 1135 12: 1134 13: 1135 14: 1135 15: 1135 16: 1135 
  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1 
  bmi2 bpext cat_l3 cdp_l3 clflush clflushopt clwb clzero cmov cmp_legacy 
  constant_tsc cpb cpuid cqm cqm_llc cqm_mbm_local cqm_mbm_total cqm_occup_llc 
  cr8_legacy cx16 cx8 de decodeassists erms extapic extd_apicid f16c 
  flushbyasid fma fpu fsgsbase fsrm fxsr fxsr_opt ht hw_pstate ibpb ibrs ibs 
  invpcid irperf lahf_lm lbrv lm mba mca mce misalignsse mmx mmxext monitor 
  movbe msr mtrr mwaitx nonstop_tsc nopl npt nrip_save nx ospke osvw 
  overflow_recov pae pat pausefilter pclmulqdq pdpe1gb perfctr_core 
  perfctr_llc perfctr_nb pfthreshold pge pku pni popcnt pse pse36 rdpid rdpru 
  rdrand rdseed rdt_a rdtscp rep_good sep sha_ni skinit smap smca smep ssbd 
  sse sse2 sse4_1 sse4_2 sse4a ssse3 stibp succor svm svm_lock syscall tce 
  topoext tsc tsc_scale umip v_vmsave_vmload vaes vgif vmcb_clean vme vmmcall 
  vpclmulqdq wbnoinvd wdt xgetbv1 xsave xsavec xsaveerptr xsaveopt xsaves 
  Vulnerabilities: Type: itlb_multihit status: Not affected 
  Type: l1tf status: Not affected 
  Type: mds status: Not affected 
  Type: meltdown status: Not affected 
  Type: spec_store_bypass 
  mitigation: Speculative Store Bypass disabled via prctl and seccomp 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, IBRS_FW, 
  STIBP: always-on, RSB filling 
  Type: srbds status: Not affected 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: AMD Cezanne vendor: Xiaomi driver: amdgpu v: kernel 
  bus-ID: 03:00.0 chip-ID: 1002:1638 class-ID: 0300 
  Device-2: Cheng Uei Precision Industry (Foxlink) XiaoMi USB 2.0 Webcam 
  type: USB driver: N/A bus-ID: 1-3:2 chip-ID: 05c8:03ec class-ID: 0e02 
  Display: x11 server: X.Org 1.20.13 compositor: kwin_x11 driver: 
  loaded: amdgpu,ati unloaded: modesetting alternate: fbdev,vesa 
  display-ID: :0 screens: 1 
  Screen-1: 0 s-res: 3200x2000 s-dpi: 192 s-size: 423x264mm (16.7x10.4") 
  s-diag: 499mm (19.6") 
  OpenGL: renderer: AMD RENOIR (DRM 3.40.0 5.10.59-1-MANJARO LLVM 12.0.1) 
  v: 4.6 Mesa 21.1.6 direct render: Yes 
Audio:
  Device-1: AMD vendor: Xiaomi driver: snd_hda_intel v: kernel bus-ID: 03:00.1 
  chip-ID: 1002:1637 class-ID: 0403 
  Device-2: AMD Raven/Raven2/FireFlight/Renoir Audio Processor vendor: Xiaomi 
  driver: snd_rn_pci_acp3x v: kernel alternate: snd_pci_acp3x bus-ID: 03:00.5 
  chip-ID: 1022:15e2 class-ID: 0480 
  Device-3: AMD Family 17h HD Audio vendor: Xiaomi driver: snd_hda_intel 
  v: kernel bus-ID: 03:00.6 chip-ID: 1022:15e3 class-ID: 0403 
  Sound Server-1: ALSA v: k5.10.59-1-MANJARO running: yes 
  Sound Server-2: JACK v: 1.9.19 running: no 
  Sound Server-3: PulseAudio v: 15.0 running: yes 
  Sound Server-4: PipeWire v: 0.3.33 running: yes 
Network:
  Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel bus-ID: 01:00.0 
  chip-ID: 8086:2723 class-ID: 0280 
  IF: wlp1s0 state: up mac: <filter> 
  IP v4: <filter> type: dynamic noprefixroute scope: global 
  broadcast: <filter> 
  IP v6: <filter> type: noprefixroute scope: link 
  WAN IP: <filter> 
Bluetooth:
  Device-1: Intel AX200 Bluetooth type: USB driver: N/A bus-ID: 1-4:3 
  chip-ID: 8087:0029 class-ID: e001 
  Report: This feature requires one of these tools: hciconfig/bt-adapter 
Logical:
  Message: No logical block device data found. 
RAID:
  Message: No RAID data found. 
Drives:
  Local Storage: total: 476.94 GiB used: 29.59 GiB (6.2%) 
  SMART Message: Unable to run smartctl. Root privileges required. 
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Toshiba model: KBG40ZNV512G KIOXIA 
  size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s 
  lanes: 4 type: SSD serial: <filter> rev: AEXA0102 temp: 31.9 C scheme: GPT 
  Message: No optical or floppy data found. 
Partition:
  ID-1: / raw-size: 406.39 GiB size: 398.94 GiB (98.17%) 
  used: 29.57 GiB (7.4%) fs: ext4 dev: /dev/nvme0n1p4 maj-min: 259:4 
  label: N/A uuid: 2c7eabfe-e72e-4af0-88fc-ee6f581a53cd 
  ID-2: /boot/efi raw-size: 550 MiB size: 547.8 MiB (99.61%) 
  used: 25.4 MiB (4.6%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1 label: N/A 
  uuid: CE2B-6F80 
Swap:
  Kernel: swappiness: 10 (default 60) cache-pressure: 100 (default) 
  ID-1: swap-1 type: file size: 17 GiB used: 0 KiB (0.0%) priority: -2 
  file: /swapfile 
Unmounted:
  ID-1: /dev/nvme0n1p2 maj-min: 259:2 size: 16 MiB fs: <superuser required> 
  label: N/A uuid: N/A 
  ID-2: /dev/nvme0n1p3 maj-min: 259:3 size: 70 GiB fs: ntfs label: N/A 
  uuid: 74AC585FAC581DC4 
USB:
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 4 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Device-1: 1-3:2 
  info: Cheng Uei Precision Industry (Foxlink) XiaoMi USB 2.0 Webcam 
  type: Video driver: N/A interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA 
  chip-ID: 05c8:03ec class-ID: 0e02 
  Device-2: 1-4:3 info: Intel AX200 Bluetooth type: Bluetooth driver: N/A 
  interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 8087:0029 
  class-ID: e001 
  Hub-2: 2-0:1 info: Full speed (or root) Hub ports: 2 rev: 3.1 speed: 10 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
  Hub-3: 3-0:1 info: Full speed (or root) Hub ports: 4 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Device-1: 3-3:2 info: FPC Sensor Controller type: <vendor specific> 
  driver: N/A interfaces: 2 rev: 1.1 speed: 480 Mb/s power: 100mA 
  chip-ID: 10a5:9200 class-ID: ef00 serial: <filter> 
  Device-2: 3-4:3 info: Xenta 2.4G Receiver type: Keyboard,Mouse,HID 
  driver: hid-generic,usbhid interfaces: 3 rev: 1.1 speed: 12 Mb/s 
  power: 100mA chip-ID: 1d57:fa60 class-ID: 0300 
  Hub-4: 4-0:1 info: Full speed (or root) Hub ports: 2 rev: 3.1 speed: 10 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
Sensors:
  System Temperatures: cpu: 53.0 C mobo: N/A gpu: amdgpu temp: 52.0 C 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 334 Uptime: 1h 20m wakeups: 3771 Init: systemd v: 248 
  tool: systemctl Compilers: gcc: 11.1.0 Packages: pacman: 1082 lib: 297 
  Shell: Bash v: 5.1.8 running-in: konsole inxi: 3.3.06 

Interrupt ReQuest (IRQ) 79 is an Advanced Configuration and Power Interface (ACPI) IRQ.

Probably:

  • a kernel bug (Try kernel 5.13 as you’ve got an AMD Ryzen)
    OR
  • a misconfiguration of your kernel’s ACPI settings
    • the above parameters need to be added to the file /etc/defaul/grub

    • to the end of the line starting with GRUB_CMDLINE_LINUX_DEFAULT

    • You need to:

      sudo update-grub
      

      after you’ve updated your grub configuration.

Please give the exact commands (with their output) you’re using before we can voice an opinion…

If the above sounds a bit like mumbo-jumbo, please read this:

(All of it, except the “Upstream / Downstream business”)

:crossed_fingers:

1 Like

@Fabby thanks for the reading material :slight_smile:
I’ve tried the following (on kernel 5.13, where the issue is still present) without any result:

Doing watch -n1 cat /proc/interrupts I’ve observed both interrupts #7 and #79 going at the same pace:

7:          0          0          0          0          0          0          0          0          0          0          0          0          0   12620934          0          0  IR-IO-APIC    7-fasteoi   pinctrl_amd

79:          0          0          0          0          0          0          0          0          0          0          0          0          0   12620888          0          0  amd_gpio   24  ACPI:Event

I’ve checked if this is linked to a device, and it seems like it’s not (although I don’t know if this is the complete list, or should I check somewhere else):

$ lspci -nnkv | grep IRQ

        Flags: bus master, fast devsel, latency 0, IRQ -2147483648
        Flags: bus master, fast devsel, latency 0, IRQ 26, IOMMU group 2
        Flags: bus master, fast devsel, latency 0, IRQ 27, IOMMU group 3
        Flags: bus master, fast devsel, latency 0, IRQ 28, IOMMU group 4
        Flags: bus master, fast devsel, latency 0, IRQ 29, IOMMU group 4
        Flags: bus master, fast devsel, latency 0, IRQ 89, IOMMU group 7
        Flags: bus master, fast devsel, latency 0, IRQ 30, NUMA node 0, IOMMU group 8
        Flags: bus master, fast devsel, latency 0, IRQ 61, IOMMU group 4
        Flags: bus master, fast devsel, latency 0, IRQ 87, IOMMU group 4
        Flags: bus master, fast devsel, latency 0, IRQ 82, IOMMU group 4
        Flags: bus master, fast devsel, latency 0, IRQ 52, IOMMU group 4
        Flags: bus master, fast devsel, latency 0, IRQ 61, IOMMU group 4
        Flags: bus master, fast devsel, latency 0, IRQ 86, IOMMU group 4
        Flags: bus master, fast devsel, latency 0, IRQ 88, IOMMU group 4
        Flags: bus master, fast devsel, latency 0, IRQ 33, IOMMU group 4
        Flags: bus master, fast devsel, latency 0, IRQ 35, IOMMU group 4

Though, there is that misconfigured IRQ -2147483648:

00:00.2 IOMMU [0806]: Advanced Micro Devices, Inc. [AMD] Renoir IOMMU [1022:1631]
        Subsystem: Xiaomi Device [1d72:2019]
        Flags: bus master, fast devsel, latency 0, IRQ -2147483648
        Capabilities: [40] Secure device <?>
        Capabilities: [64] MSI: Enable- Count=1/4 Maskable- 64bit+
        Capabilities: [74] HyperTransport: MSI Mapping Enable+ Fixed+

Then I’ve tried masking interrupt #7 and #79 by adding acpi_mask_gpe=0x07 acpi_mask_gpe=0x4F to GRUB cmd:

GRUB_CMDLINE_LINUX_DEFAULT="quiet udev.log_priority=3 resume=/dev/disk/by-uuid/4f91938f-abb0-4b1d-8045-0eb44cf1b387 resume_offset=579584 acpi_mask_gpe=0x07 acpi_mask_gpe=0x4F"

Followed by sudo update-grub.

This did not change anything.
I’ve also checked journalctl and there’s no “GPE storm” reported.

Any other idea on how can I block this interrupt?

1 Like

Ok, so apparently the problem comes from the kernel module pinctrl_amd.
I’ve blacklisted it by adding this to /etc/modprobe.d/blacklist.conf:
blacklist pinctrl_amd

This fixes the issue, but it also breaks the power button and the touchpad so it’s not a solution for me.
I will wait for an update. In the meantime, if I want to lower the temperature, I can set the governor to powersave during charging or disable CPU boost.

There’s also the possibility that this is a HW issue from the charging controller or noise on some IO interrupt pin, but since I did not see this problem in Windows, I hope it’s not.

1 Like

That is -(2 ** 31) and looks like an overflow (or rather wrong type cast) of some kind to me.

2 Likes