No package C-State deeper than C3 utilized by Alder Lake i7-12650H in Asus Vivobook K6500ZE

Bug #2017158 reported by Artem
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

It seems to be that my processor isn't utilizing deeper C-states than C3 while idling.

ProblemType: Bug
DistroRelease: Ubuntu 23.04
Package: linux-image-6.2.0-20-generic 6.2.0-20.20
ProcVersionSignature: Ubuntu 6.2.0-20.20-generic 6.2.6
Uname: Linux 6.2.0-20-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.26.1-0ubuntu2
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: atimonder1 1635 F.... wireplumber
 /dev/snd/controlC1: atimonder1 1635 F.... wireplumber
 /dev/snd/seq: atimonder1 1632 F.... pipewire
CRDA: N/A
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Thu Apr 20 20:23:57 2023
InstallationDate: Installed on 2023-04-18 (2 days ago)
InstallationMedia: Ubuntu 23.04 "Lunar Lobster" - Release amd64 (20230415)
MachineType: ASUSTeK COMPUTER INC. Vivobook_ASUSLaptop K6500ZE_K6500ZE
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-6.2.0-20-generic root=UUID=acf5cbfb-1c4e-4e67-b2fe-4b4283ebf889 ro quiet splash mem_sleep_default=deep vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-6.2.0-20-generic N/A
 linux-backports-modules-6.2.0-20-generic N/A
 linux-firmware 20230323.gitbcdcfbcf-0ubuntu1
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/30/2022
dmi.bios.release: 5.25
dmi.bios.vendor: American Megatrends International, LLC.
dmi.bios.version: K6500ZE.301
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: K6500ZE
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: 1.0
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK COMPUTER INC.
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInternational,LLC.:bvrK6500ZE.301:bd08/30/2022:br5.25:svnASUSTeKCOMPUTERINC.:pnVivobook_ASUSLaptopK6500ZE_K6500ZE:pvr1.0:rvnASUSTeKCOMPUTERINC.:rnK6500ZE:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct10:cvr1.0:sku:
dmi.product.family: Vivobook
dmi.product.name: Vivobook_ASUSLaptop K6500ZE_K6500ZE
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK COMPUTER INC.

Revision history for this message
Artem (atimonder1) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Artem (atimonder1) wrote :
Download full text (8.7 KiB)

atimonder1@VivobookPro15:~$ sudo powertop #idle tab
           Pkg(HW) | Core(HW) | CPU(OS) 0 CPU(OS) 1
                    | | C0 active 0.2% 0.1%
                    | | POLL 0.0% 0.1 ms 0.0% 0.0 ms
                    | | C1E 0.2% 0.4 ms 0.0% 0.3 ms
C2 (pc2) 20.3% | |
C3 (pc3) 62.1% | C3 (cc3) 0.0% |
C6 (pc6) 0.0% | C6 (cc6) 0.0% | C6 0.0% 0.5 ms 0.0% 1.1 ms
C7 (pc7) 0.0% | C7 (cc7) 98.0% |
C8 (pc8) 0.0% | | C8 0.0% 0.5 ms 0.0% 0.0 ms
C9 (pc9) 0.0% | |
C10 (pc10) 0.0% | |
                    | | C10 98.8% 17.6 ms 99.7% 60.8 ms

                    | Core(HW) | CPU(OS) 2 CPU(OS) 3
                    | | C0 active 0.4% 0.0%
                    | | POLL 0.0% 0.0 ms 0.0% 0.0 ms
                    | | C1E 0.2% 0.4 ms 0.1% 1.5 ms
                    | |
                    | C3 (cc3) 0.0% |
                    | C6 (cc6) 0.1% | C6 0.1% 0.8 ms 0.0% 0.0 ms
                    | C7 (cc7) 97.7% |
                    | | C8 0.1% 0.7 ms 0.0% 0.0 ms
                    | |
                    | |
                    | | C10 98.3% 18.7 ms 99.9% 294.7 ms

                    | Core(HW) | CPU(OS) 4 CPU(OS) 5
                    | | C0 active 0.4% 0.0%
                    | | POLL 0.0% 0.1 ms 0.0% 0.0 ms
                    | | C1E 0.2% 0.4 ms 0.0% 0.3 ms
                    | |
                    | C3 (cc3) 0.0% |
                    | C6 (cc6) 0.0% | C6 0.0% 0.7 ms 0.0% 0.0 ms
                    | C7 (cc7) 98.0% |
                    | | C8 0.0% 0.4 ms 0.0% 0.0 ms
                    | |
                    | |
                    | | C10 98.6% 25.8 ms 99.9% 155.3 ms
                    | Core(HW) | CPU(OS) 6 CPU(OS) 7
                    | | C0 active 3.6% 2.6%
                    | | POLL 0.0% 0.1 ms 0.0% 0.0 ms
                    | | C1E 1.6% 0.3 ms 0.2% 0.2 ms
                    | |
                    | C3 (cc3) 0.0% |
                    | C6 (cc6) 0.4% | C6 0.5% 0.6 ms 0.1% 0.4 ms
                    | C7 (cc7) 80.7% |
                    | | C8 0.3% 0.5 ms 0.1% 0.6 ms
                    | |
                    | |
         ...

Read more...

Revision history for this message
Artem (atimonder1) wrote :

~$ cat /sys/module/intel_idle/parameters/max_cstate
9

Revision history for this message
Artem (atimonder1) wrote :

~$ sudo dmesg | grep -i idle
[ 0.031388] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
[ 0.079676] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x26bef67878b, max_idle_ns: 440795293631 ns
[ 0.081984] process: using mwait in idle threads
[ 0.152517] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.153198] cpuidle: using governor ladder
[ 0.153198] cpuidle: using governor menu
[ 1.005098] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[ 1.019957] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x26bef67878b, max_idle_ns: 440795293631 ns

Revision history for this message
Artem (atimonder1) wrote (last edit ):

upd. So, on Ubuntu 22.10, it utilizes C-States lower than C3, BUT! It utilizes them only if the laptop itself is started without the charger (reboot doesn't do that job). If the condition isn't met, it won't go lower than C3. Don't know if it's useful, but I am going to write this one down here.

Revision history for this message
Artem (atimonder1) wrote :

Also, I tested mainline kernel, the situation is even worse - CPU package doesn't go past C2 state, for some reason.

Revision history for this message
ils (etnivor) wrote (last edit ):

I can confirm this aswell.

When ASPM is disabled cpu's can reach package C3, when ASPM enabled they can reach package C2
Core C-states seems to be working fine, going to C6-C7 on both.

pc 1:
cpu: i7-1260P
kernel: 6.2
ubuntu 22.04 desktop

pc2
cpu: i5-12500H
kernel: 6.2
ubuntu: 23.04 server

However having ASPM enabled seem to lower CPU package power consumption with 2W. Could it be software which having problems displaying correct C states for alderlake cpu's?

Have been using powertop 1.14/1.15 and corefreq to read package states.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.