You are not logged in.

#1 2024-01-01 11:50:36

summentier
Member
Registered: 2017-12-16
Posts: 2

[SOLVED] Power management on Lenovo X1C11 - Low Pkg C states !reached

Hi everyone,

I spent way too much time trying to optimize the battery life of my Lenovo X1 Carbon Gen 11 21HM002EUS (I know I have a problem and I should probably seek help wink.)

Anyway, my TLP config, after the Arch wiki recommendations, looks like this:

#/etc/tlp.d/10-my.conf
DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth nfc wwan"
PLATFORM_PROFILE_ON_BAT=low-power
PCIE_ASPM_ON_BAT=powersave

Following the corresponding Arch wiki pages and stackoverflow, I have also set (after rummaging through the kernel iwlwifi source, I believe "1" is the least aggressive power save setting):

# /etc/modprobe.d/iwlwifi.conf
options iwlwifi power_save=Y power_level=1

I now get a decent battery life (about 10 hrs), but not the battery life reported in reviews. Looking in powertop, every setting seems to be "Good" (except the known one), and most CPUs spend their time in C6/C7 states.

However, when on battery, the Pkg C-states only reach C2 and C3. Looking through a different forum post on the topic, and in particular this image, it seems that with the CPUs idling, at least Pkg C6 should be possible. (Someone in the arch forum encountered a similar issue, but with them, it was a problem with a driver I do not load.)

           Pkg(HW)  |            Core(HW) |            CPU(OS) 0   CPU(OS) 1
                    |                     | C0 active   0.6%        0.4%
                    |                     | POLL        0.0%    0.0 ms  0.0%    0.0 ms
                    |                     | C1_ACPI     0.4%    0.3 ms  0.1%    0.2 ms
C2 (pc2)   38.4%    |                     | C2_ACPI    18.4%    2.2 ms 10.4%    2.6 ms
C3 (pc3)   36.0%    | C3 (cc3)    0.0%    | C3_ACPI    78.0%   10.7 ms 88.3%   23.8 ms
C6 (pc6)    0.0%    | C6 (cc6)   26.5%    |
C7 (pc7)    0.0%    | C7 (cc7)   67.8%    |
C8 (pc8)    0.0%    |                     |
(...) (C9/C10 have 0%)

What is even stranger is, that on AC power (!), sometimes powertop indeed reports lower Pkg C-states, but I have not been able to reproduce this consistently:

           Pkg(HW)  |            Core(HW) |            CPU(OS) 0   CPU(OS) 1
                    |                     | C0 active   0.2%        0.6%
                    |                     | POLL        0.0%    0.0 ms  0.0%    0.0 ms
                    |                     | C1_ACPI     0.0%    0.2 ms  0.2%    0.3 ms
C2 (pc2)   47.2%    |                     | C2_ACPI     1.3%    2.1 ms 31.9%    2.8 ms
C3 (pc3)    1.0%    | C3 (cc3)    0.0%    | C3_ACPI    98.2%   13.2 ms 65.8%   18.2 ms
C6 (pc6)    0.3%    | C6 (cc6)   31.9%    |
C7 (pc7)    0.0%    | C7 (cc7)   64.5%    |
C8 (pc8)   39.4%    |                     |
(...)  (C9/C10 have 0%)

(In a related issue, it was suggested that the kernel config may influence power saving, but I observe the same behaviour on a Ubuntu 24.04 live system.)

So now I am confused - do I have to disable power saving to save power? Did I optimize too much? Am I misunderstanding Pkg C states?

Last edited by summentier (2024-01-01 17:54:26)

Offline

#2 2024-01-01 17:50:39

summentier
Member
Registered: 2017-12-16
Posts: 2

Re: [SOLVED] Power management on Lenovo X1C11 - Low Pkg C states !reached

So, of course I wrestle with this for weeks and then an hour after I post it I stumble across the solution, which is to replace `powersave` by `powersupersave` and reboot.

# Requires reboot to take effect
PCIE_ASPM_ON_BAT=powersupersave

According to the docs, powersupersave unlocks the L1.2 low-power states of ASPM, which one can verify as follows (note the + beside all the low-power states):

# lspci -vvv | grep -E "^\S|ASPM_"
...
0:06.0 PCI bridge: Intel Corporation Raptor Lake PCIe 4.0 Graphics Port (rev 01) (prog-if 00 [Normal decode])
                L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
                L1SubCtl1: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1-
04:00.0 Non-Volatile memory controller: Sandisk Corp WD PC SN810 / Black SN850 NVMe SSD (rev 01) (prog-if 02 [NVM Express])
                L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1- L1_PM_Substates+
                L1SubCtl1: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1-

I did not notice this because on my machine, powersupersave requires a reboot (tlp reload/start is not enough). In fact, as soon as I enter powersave once, I am unable to reach any low C-states until I reboot. It seems there is a problem with `powersave` specifically - `default` also allows the package to reach C8. Might be a kernel bug.

Offline

Board footer

Powered by FluxBB