High power consumption on Matebook D14 with AMD Ryzen 2500U/3500U CPUs on kernel >= 5.8

Hi!

I noticed high power consumption on my laptops with AMD Ryzen 3500U and 2500U CPU after kernel upgrade to 5.8.x, 5.9.x, 5.10.2. The last good working kernel is 5.7.19.

Battery powered, all Tunables in powertop set to Good, the same screen brightness, fan off:

  • kernel 5.7.19: ~3.9W
  • kernel 5.10.2: ~5.5W

Increased power consumption is visible also on AC powered on wattmeter.

sensors output shows:

  • kernel 5.7.19: Vsoc 800 mV , Isoc 2.00 A
  • kernel 5.10.2: Vsoc 1.04 V , Isoc 5.00 A

Vcore and Icore are similar in both kernels.

System:
  Kernel: 5.10.2-2-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 
  root=UUID=6117344d-bbf4-4fbd-9695-69be3c50f3fb rw apparmor=1 
  security=apparmor udev.log_priority=3 sysrq_always_enabled=1 idle=nomwait 
  rcu_nocbs=0-7 iommu=soft 
  Desktop: MATE 1.24.1 info: mate-panel wm: Openbox 3.6.1 dm: LightDM 1.30.0 
  Distro: Manjaro Linux 
Machine:
  Type: Laptop System: HUAWEI product: NBLK-WAX9X v: M1010 serial: <filter> 
  Mobo: HUAWEI model: NBLK-WAX9X-PCB v: M1010 serial: <filter> UEFI: HUAWEI 
  v: 1.07 date: 06/02/2020 
Battery:
  ID-1: BAT1 charge: 55.2 Wh condition: 55.9/55.3 Wh (101%) volts: 17.2/15.3 
  model: Sunwoda-H HB4692Z9ECW-41 type: Li-ion serial: <filter> 
  status: Discharging cycles: 106 
CPU:
  Info: Quad Core model: AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx 
  bits: 64 type: MT MCP arch: Zen/Zen+ note: check family: 17 (23) 
  model-id: 18 (24) stepping: 1 microcode: 8108109 L2 cache: 2 MiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 
  bogomips: 33548 
  Speed: 1365 MHz min/max: 1400/2100 MHz boost: enabled Core speeds (MHz): 
  1: 1365 2: 1222 3: 1269 4: 1381 5: 1244 6: 1306 7: 1256 8: 1396 
  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, STIBP: 
  disabled, RSB filling 
  Type: srbds status: Not affected 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: AMD Picasso vendor: Huawei driver: amdgpu v: kernel 
  bus ID: 03:00.0 chip ID: 1002:15d8 
  Device-2: IMC Networks ov9734_azurewave_camera type: USB driver: N/A 
  bus ID: 1-4:2 chip ID: 13d3:56db serial: <filter> 
  Display: x11 server: X.Org 1.20.10 driver: amdgpu,ati unloaded: modesetting 
  alternate: fbdev,vesa display ID: :0 screens: 1 
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") 
  s-diag: 582mm (22.9") 
  Monitor-1: eDP res: 1920x1080 hz: 60 dpi: 158 size: 309x173mm (12.2x6.8") 
  diag: 354mm (13.9") 
  OpenGL: renderer: AMD Radeon Vega 8 Graphics (RAVEN DRM 3.40.0 
  5.10.2-2-MANJARO LLVM 11.0.0) 
  v: 4.6 Mesa 20.3.1 direct render: Yes 
Audio:
  Device-1: AMD Raven/Raven2/Fenghuang HDMI/DP Audio vendor: Huawei 
  driver: snd_hda_intel v: kernel bus ID: 03:00.1 chip ID: 1002:15de 
  Device-2: AMD Raven/Raven2/FireFlight/Renoir Audio Processor vendor: Huawei 
  driver: N/A alternate: snd_pci_acp3x, snd_rn_pci_acp3x bus ID: 03:00.5 
  chip ID: 1022:15e2 
  Device-3: AMD Family 17h HD Audio vendor: Huawei driver: snd_hda_intel 
  v: kernel bus ID: 03:00.6 chip ID: 1022:15e3 
  Sound Server: ALSA v: k5.10.2-2-MANJARO 
Network:
  Device-1: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter 
  vendor: & Tele RSH driver: rtw_8822ce v: N/A modules: rtw88_8822ce 
  port: 2000 bus ID: 02:00.0 chip ID: 10ec:c822 
  IF: wlp2s0 state: up mac: <filter> 
Drives:
  Local Storage: total: 476.94 GiB used: 50.72 GiB (10.6%) 
  SMART Message: Unable to run smartctl. Root privileges required. 
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital 
  model: PC SN730 SDBPNTY-512G-1027 size: 476.94 GiB block size: 
  physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 serial: <filter> 
  rev: 11110000 temp: 30.9 C 
Partition:
  ID-1: / raw size: 238.41 GiB size: 235.01 GiB (98.57%) 
  used: 50.68 GiB (21.6%) fs: ext4 block size: 4096 B dev: /dev/nvme0n1p2 
  maj-min: 259:2 
  ID-2: /boot/efi raw size: 116 MiB size: 96 MiB (82.76%) 
  used: 47.2 MiB (49.2%) fs: vfat block size: 512 B dev: /dev/nvme0n1p1 
  maj-min: 259:1 
Swap:
  Kernel: swappiness: 60 (default) cache pressure: 100 (default) 
  ID-1: swap-1 type: file size: 1024 MiB used: 0 KiB (0.0%) priority: -2 
  file: /var/swap 
Sensors:
  System Temperatures: cpu: 35.2 C mobo: N/A gpu: amdgpu temp: 35.0 C 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 251 Uptime: 1m wakeups: 1 Memory: 6.72 GiB 
  used: 921.3 MiB (13.4%) Init: systemd v: 247 Compilers: gcc: 10.2.0 
  clang: 11.0.0 Packages: pacman: 1466 lib: 442 Shell: Bash v: 5.1.0 
  running in: mate-terminal inxi: 3.2.01 

Is it possible to fix it, or I have to use kernel 5.7.19? Thanks!

My 2500u on a D14 seems to be using ~2.67W even while plugged.
And I have not used powertop besides for reporting.

(PS - I am using the raven kernels from AUR … one is tied to 5.4, other latest )

Thanks for the response.

Just tried 5.10.2 linux-amd from AUR, no difference on 3500U…

Probably you have low power consumption, because it is 5.4.x kernel which is also OK.

I meant linux-amd-raven and/or linux-amd-raven-latest

For whats its worth … you can also peruse my outdated old dump when I first was getting it going:

You removed battery from your laptop, right? Otherwise your readings of 1-2W difference can be skewed by battery trickle charging and sustaining the charge by the battery logic. Remove it and repeat the tests.
Besides, why 1-2W is that important to you? I bet these new kernels fixed a ton of bugs, security vulnerabilities and improved performance hence slight higher power usage.

@cryptocurious

You removed battery from your laptop, right? Otherwise your readings of 1-2W difference can be skewed by battery trickle charging and sustaining the charge by the battery logic. Remove it and repeat the tests.

The most important is when laptop runs on battery. When it is on AC current and charged - fan runs most of time on new kernel, on older it can be passive on idle (Ryzen 3500U laptop is worse in this case).

Besides, why 1-2W is that important to you? I bet these new kernels fixed a ton of bugs, security vulnerabilities and improved performance hence slight higher power usage.

Compare running time on battery on idle 5.5W vs 3.9W - it is a few more hours! Also it is 2-3 degrees of Celsius difference which causes fan to run more often. It is Ultrabook, not desktop PC.

@cscs

I can’t find linux-amd-raven-latest in AUR.

I used your cmdline - no difference in power consumption.

Of course linux-amd-raven can achieve much better power saving, because it is 5.4.x kernel which is OK in this case. The regression is since kernel 5.8.x and still not fixed in 5.10.7 :confused:
I can try to switch to 5.4.x, but it is old kernel, probably worse GPU drivers and no microphone LED support.