Issues with power usage

powertop reports an idle power usage of 7-8W. I have no idea what’s using the power, because the cpu is at <1% usage and the gpu is at ~5% usage when idling. Powertop says the wifi adapter is using 10W (which is more than the total power usage?), so I don’t think I can trust anything but the overall usage in there. The battery is draining fast enough to suggest 7-8W usage, though (only 4-5 hours of battery life idling).

I am using a sdd and wifi card from an old laptop, but I don’t think they could drive the idle up that much.

I have configured the correct settings, I will attach the output of tlp-stat as well:

--- TLP 1.4.0 --------------------------------------------

+++ Configured Settings:
defaults.conf L0004: TLP_ENABLE="1"
defaults.conf L0005: TLP_WARN_LEVEL="3"
defaults.conf L0006: TLP_PERSISTENT_DEFAULT="0"
defaults.conf L0007: DISK_IDLE_SECS_ON_AC="0"
defaults.conf L0008: DISK_IDLE_SECS_ON_BAT="2"
defaults.conf L0009: MAX_LOST_WORK_SECS_ON_AC="15"
defaults.conf L0010: MAX_LOST_WORK_SECS_ON_BAT="60"
defaults.conf L0011: CPU_ENERGY_PERF_POLICY_ON_AC="balance_performance"
/etc/tlp.conf L0117: CPU_ENERGY_PERF_POLICY_ON_BAT="power"
/etc/tlp.conf L0152: SCHED_POWERSAVE_ON_AC="0"
defaults.conf L0014: SCHED_POWERSAVE_ON_BAT="1"
defaults.conf L0015: NMI_WATCHDOG="0"
defaults.conf L0016: DISK_DEVICES="nvme0n1 sda"
defaults.conf L0017: DISK_APM_LEVEL_ON_AC="254 254"
defaults.conf L0018: DISK_APM_LEVEL_ON_BAT="128 128"
defaults.conf L0019: DISK_APM_CLASS_DENYLIST="usb ieee1394"
defaults.conf L0020: DISK_IOSCHED="keep keep"
defaults.conf L0021: SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
/etc/tlp.conf L0236: SATA_LINKPWR_ON_BAT="min_power med_power_with_dipm"
defaults.conf L0023: AHCI_RUNTIME_PM_ON_AC="on"
defaults.conf L0024: AHCI_RUNTIME_PM_ON_BAT="auto"
/etc/tlp.conf L0261: AHCI_RUNTIME_PM_TIMEOUT="5"
defaults.conf L0026: PCIE_ASPM_ON_AC="default"
/etc/tlp.conf L0344: PCIE_ASPM_ON_BAT="powersupersave"
defaults.conf L0028: RADEON_DPM_PERF_LEVEL_ON_AC="auto"
defaults.conf L0029: RADEON_DPM_PERF_LEVEL_ON_BAT="auto"
defaults.conf L0030: RADEON_POWER_PROFILE_ON_AC="default"
defaults.conf L0031: RADEON_POWER_PROFILE_ON_BAT="default"
defaults.conf L0032: WIFI_PWR_ON_AC="off"
defaults.conf L0033: WIFI_PWR_ON_BAT="on"
defaults.conf L0034: WOL_DISABLE="Y"
defaults.conf L0035: SOUND_POWER_SAVE_ON_AC="1"
defaults.conf L0036: SOUND_POWER_SAVE_ON_BAT="1"
defaults.conf L0037: SOUND_POWER_SAVE_CONTROLLER="Y"
defaults.conf L0038: BAY_POWEROFF_ON_AC="0"
defaults.conf L0039: BAY_POWEROFF_ON_BAT="0"
defaults.conf L0040: BAY_DEVICE="sr0"
/etc/tlp.conf L0349: RUNTIME_PM_ON_AC="auto"
defaults.conf L0042: RUNTIME_PM_ON_BAT="auto"
defaults.conf L0043: RUNTIME_PM_DRIVER_DENYLIST="mei_me nouveau radeon"
defaults.conf L0044: USB_AUTOSUSPEND="1"
defaults.conf L0045: USB_EXCLUDE_AUDIO="1"
defaults.conf L0046: USB_EXCLUDE_BTUSB="0"
defaults.conf L0047: USB_EXCLUDE_PHONE="0"
defaults.conf L0048: USB_EXCLUDE_PRINTER="1"
defaults.conf L0049: USB_EXCLUDE_WWAN="0"
defaults.conf L0050: USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN="0"
defaults.conf L0051: RESTORE_DEVICE_STATE_ON_STARTUP="0"
defaults.conf L0052: RESTORE_THRESHOLDS_ON_BAT="0"
defaults.conf L0053: NATACPI_ENABLE="1"
defaults.conf L0054: TPACPI_ENABLE="1"
defaults.conf L0055: TPSMAPI_ENABLE="1"
/etc/tlp.conf L0044: TLP_DEFAULT_MODE="AC"
/etc/tlp.conf L0087: CPU_SCALING_GOVERNOR_ON_AC="powersave"
/etc/tlp.conf L0088: CPU_SCALING_GOVERNOR_ON_BAT="powersave"
/etc/tlp.conf L0136: CPU_BOOST_ON_AC="1"
/etc/tlp.conf L0137: CPU_BOOST_ON_BAT="1"
/etc/tlp.conf L0145: CPU_HWP_DYN_BOOST_ON_AC="1"
/etc/tlp.conf L0146: CPU_HWP_DYN_BOOST_ON_BAT="1"
/etc/tlp.conf L0169: PLATFORM_PROFILE_ON_AC="performance"
/etc/tlp.conf L0170: PLATFORM_PROFILE_ON_BAT="low-power"

+++ System Info
System         = Framework AA Laptop
BIOS           = 03.06
OS Release     = Arch Linux
Kernel         = 5.15.7-zen1-1-zen #1 ZEN SMP PREEMPT Wed, 08 Dec 2021 14:33:18 +0000 x86_64
/proc/cmdline  = BOOT_IMAGE=/vmlinuz-linux-zen root=UUID=f389e8f0-aab6-43d2-beae-37ec0165907a rw rootflags=subvol=@ quiet cryptdevice=/dev/disk/by-uuid/b92f5a07-6428-49b1-b1d2-dcf878162684:root root=/dev/mapper/root resume=/dev/mapper/root resume_offset=1739377 rd.udev.log_priority=3 vt.global_cursor_default=0 systemd.unified_cgroup_hierarchy=1 loglevel=3 mem_sleep_default=deep
Init system    = systemd 
Boot mode      = UEFI

+++ TLP Status
State          = enabled
RDW state      = enabled
Last run       = 10:22:17 AM,    180 sec(s) ago
Mode           = battery
Power source   = battery

Warning: systemd-rfkill.service is not masked, radio device switching may not work as configured.
>>> Invoke 'systemctl mask systemd-rfkill.service' to correct this.

+++ Processor
CPU model      = 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz

/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver    = intel_pstate
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors = performance powersave
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq  =   400000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq  =  4200000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/energy_performance_preference = power [HWP.EPP]
/sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences = default performance balance_performance balance_power power 

/sys/devices/system/cpu/cpu1..cpu7: omitted for clarity, use -v to show all

/sys/devices/system/cpu/intel_pstate/status            = active
/sys/devices/system/cpu/intel_pstate/min_perf_pct      =   9 [%]
/sys/devices/system/cpu/intel_pstate/max_perf_pct      = 100 [%]
/sys/devices/system/cpu/intel_pstate/no_turbo          =   0
/sys/devices/system/cpu/intel_pstate/hwp_dynamic_boost =   1
/sys/devices/system/cpu/intel_pstate/turbo_pct         =  47 [%]
/sys/devices/system/cpu/intel_pstate/num_pstates       =  39

/sys/module/workqueue/parameters/power_efficient       = Y
/proc/sys/kernel/nmi_watchdog                          = 0

+++ Platform Profile
/sys/firmware/acpi/platform_profile                    = (not available)
/sys/firmware/acpi/platform_profile_choices            = (not available)

+++ Temperatures
CPU temp               =    42 [°C]
Fan speed              = (not available)

+++ File System
/proc/sys/vm/laptop_mode               =     2
/proc/sys/vm/dirty_writeback_centisecs =  6000
/proc/sys/vm/dirty_expire_centisecs    =  6000
/proc/sys/vm/dirty_ratio               =    20
/proc/sys/vm/dirty_background_ratio    =    10

+++ Disks
Devices = nvme0n1 sda

/dev/nvme0n1:
  Type       = NVMe
  Disk ID    = nvme-nvme.144d-53324a354e583048383038313436-53414d53554e47204d5a564c56323536484348502d3030303030-00000001
  Model      = SAMSUNG MZVLV256HCHP-00000              
  Firmware   = BXV7000Q
  Temp       = 43 °C
  Scheduler  = mq-deadline kyber [bfq] none (multi queue)

  Runtime PM:
    /sys/block/nvme0n1/power/control = auto, autosuspend_delay_ms = (not available)

  SMART info:
    Critical Warning:                   0x00
    Temperature:                        43 Celsius
    Available Spare:                    100%
    Available Spare Threshold:          10%
    Percentage Used:                    2%
    Data Units Written:                 20,245,852 [10.3 TB]
    Power Cycles:                       4,151
    Power On Hours:                     3,992
    Unsafe Shutdowns:                   218
    Media and Data Integrity Errors:    0

/dev/sda: not present.

+++ Intel Graphics
/sys/class/drm/card0/device/driver           = i915

/sys/class/drm/card0/power/rc6_enable        =  1 (enabled)
/sys/kernel/debug/dri/0/i915_fbc_status      = FBC disabled: not supported with PSR2
/sys/kernel/debug/dri/0/i915_edp_psr_status  = PSR mode: PSR2 enabled

/sys/class/drm/card0/gt_min_freq_mhz         =   100 [MHz]
/sys/class/drm/card0/gt_max_freq_mhz         =  1300 [MHz]
/sys/class/drm/card0/gt_boost_freq_mhz       =  1300 [MHz]
/sys/class/drm/card0/gt_RPn_freq_mhz         =   100 [MHz] (GPU min)
/sys/class/drm/card0/gt_RP0_freq_mhz         =  1300 [MHz] (GPU max)

+++ Wireless
bluetooth = on
wifi      = on
wwan      = none (no device)

hci0(btusb)                   : bluetooth, not connected
wlp170s0(ath10k_pci)          : wifi, connected, power management = on

+++ Audio
/sys/module/snd_hda_intel/parameters/power_save            = 1
/sys/module/snd_hda_intel/parameters/power_save_controller = Y

+++ PCIe Active State Power Management
/sys/module/pcie_aspm/parameters/policy = default performance powersave [powersupersave]

+++ PCIe Runtime Power Management
Enable devices    = (disabled)
Disable devices   = (disabled)
Device denylist   = (disabled)
Driver denylist   = mei_me nouveau radeon

/sys/bus/pci/devices/0000:00:00.0/power/control = auto (0x060000, Host bridge, no driver)
/sys/bus/pci/devices/0000:00:02.0/power/control = auto (0x030000, VGA compatible controller, i915)
/sys/bus/pci/devices/0000:00:04.0/power/control = auto (0x118000, Signal processing controller, proc_thermal)
/sys/bus/pci/devices/0000:00:06.0/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:07.0/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:07.1/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:07.2/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:07.3/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:08.0/power/control = auto (0x088000, System peripheral, no driver)
/sys/bus/pci/devices/0000:00:0a.0/power/control = auto (0x118000, Signal processing controller, intel-pmt)
/sys/bus/pci/devices/0000:00:0d.0/power/control = auto (0x0c0330, USB controller, xhci_hcd)
/sys/bus/pci/devices/0000:00:0d.2/power/control = auto (0x0c0340, USB controller, thunderbolt)
/sys/bus/pci/devices/0000:00:0d.3/power/control = auto (0x0c0340, USB controller, thunderbolt)
/sys/bus/pci/devices/0000:00:12.0/power/control = auto (0x070000, Serial controller, intel_ish_ipc)
/sys/bus/pci/devices/0000:00:14.0/power/control = auto (0x0c0330, USB controller, xhci_hcd)
/sys/bus/pci/devices/0000:00:14.2/power/control = auto (0x050000, RAM memory, no driver)
/sys/bus/pci/devices/0000:00:15.0/power/control = auto (0x0c8000, Serial bus controller [0c80], intel-lpss)
/sys/bus/pci/devices/0000:00:15.1/power/control = auto (0x0c8000, Serial bus controller [0c80], intel-lpss)
/sys/bus/pci/devices/0000:00:15.3/power/control = auto (0x0c8000, Serial bus controller [0c80], intel-lpss)
/sys/bus/pci/devices/0000:00:16.0/power/control = auto (0x078000, Communication controller, no driver)
/sys/bus/pci/devices/0000:00:1d.0/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1f.0/power/control = auto (0x060100, ISA bridge, no driver)
/sys/bus/pci/devices/0000:00:1f.3/power/control = auto (0x040380, Audio device, snd_hda_intel)
/sys/bus/pci/devices/0000:00:1f.4/power/control = auto (0x0c0500, SMBus, i801_smbus)
/sys/bus/pci/devices/0000:00:1f.5/power/control = auto (0x0c8000, Serial bus controller [0c80], intel-spi)
/sys/bus/pci/devices/0000:01:00.0/power/control = auto (0x010802, Non-Volatile memory controller, nvme)
/sys/bus/pci/devices/0000:aa:00.0/power/control = auto (0x028000, Network controller, ath10k_pci)

+++ USB
Autosuspend       = enabled
Device allowlist  = (not configured)
Device denylist   = (not configured)
Exclude audio     = enabled
Exclude bluetooth = disabled
Exclude phones    = disabled
Exclude printers  = enabled
Exclude WWAN      = disabled

Bus 004 Device 001 ID 1d6b:0003 control = auto, autosuspend_delay_ms =    0 -- Linux Foundation 3.0 root hub (hub)
Bus 003 Device 003 ID 27c6:609c control = auto, autosuspend_delay_ms = 2000 -- Shenzhen Goodix Technology Co.,Ltd. Goodix USB2.0 MISC (no driver)
Bus 003 Device 002 ID 32ac:0002 control = auto, autosuspend_delay_ms = 2000 -- Framework HDMI Expansion Card (usbhid)
Bus 003 Device 004 ID 0cf3:e300 control = auto, autosuspend_delay_ms = 2000 -- Qualcomm Atheros Communications QCA61x4 Bluetooth 4.0 (btusb)
Bus 003 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms =    0 -- Linux Foundation 2.0 root hub (hub)
Bus 002 Device 001 ID 1d6b:0003 control = auto, autosuspend_delay_ms =    0 -- Linux Foundation 3.0 root hub (hub)
Bus 001 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms =    0 -- Linux Foundation 2.0 root hub (hub)

+++ Battery Care
Plugin: generic
Supported features: none available

+++ Battery Status: BAT1
/sys/class/power_supply/BAT1/manufacturer                   = NVT
/sys/class/power_supply/BAT1/model_name                     = Framewo
/sys/class/power_supply/BAT1/cycle_count                    = (not supported)
/sys/class/power_supply/BAT1/charge_full_design             =   3572 [mAh]
/sys/class/power_supply/BAT1/charge_full                    =   3571 [mAh]
/sys/class/power_supply/BAT1/charge_now                     =   3139 [mAh]
/sys/class/power_supply/BAT1/current_now                    =    666 [mA]
/sys/class/power_supply/BAT1/status                         = Discharging

/sys/class/power_supply/BAT1/charge_control_start_threshold = (not available) 
/sys/class/power_supply/BAT1/charge_control_end_threshold   = (not available) 

Charge                                                      =   87.9 [%]
Capacity                                                    =  100.0 [%]

Screenshot of powertop and intel_gpu_top for good measure. The power usage can also get to 10W under light usage and 15-20W under load, which I don’t think is normal either. I’ve tried running the system on a different laptop and had the same issues, so it’s a system issue rather than an issue with the framework laptop. Powertop has also switched to saying the display is consuming 11W now, which is definitely not possible

I’ve narrowed it down to the idle states of the CPU - I’m only reaching C3 when idle for some reason (unless the Pkg section is wrong and I should be looking at individual cores), despite the CPU idling at 1% usage, 2 cores at 500mhz, and the rest at 1000mhz. I also got GPU idle down to 3-4%, even with all the blur effects, although I don’t know if it they matter since pstate is a thing and the image is static, blur or not.

Relevant powertop page:

Pkg(HW)             |            Core(HW) |            CPU(OS) 0   CPU(OS) 4
                    |                     | C0 active   3.1%        3.5%
                    |                     | POLL        0.0%    0.1 ms  0.0%    0.0 ms
                    |                     | C1_ACPI     1.4%    0.3 ms 19.7%    0.4 ms
C2 (pc2)   18.4%    |                     | C2_ACPI     4.2%    0.8 ms 32.1%    0.8 ms
C3 (pc3)   14.5%    | C3 (cc3)    0.0%    | C3_ACPI    79.7%    5.1 ms 40.2%    3.3 ms
C6 (pc6)    0.0%    | C6 (cc6)    0.0%    |
C7 (pc7)    0.0%    | C7 (cc7)   58.0%    |
C8 (pc8)    0.0%    |                     |
C9 (pc9)    0.0%    |                     |
C10 (pc10)  0.0%    |                     |

                    |            Core(HW) |            CPU(OS) 1   CPU(OS) 5
                    |                     | C0 active   3.7%        3.2%
                    |                     | POLL        0.0%    0.0 ms  0.0%    0.0 ms
                    |                     | C1_ACPI     3.5%    0.3 ms  8.2%    0.5 ms
                    |                     | C2_ACPI     7.3%    0.8 ms 12.2%    0.8 ms
                    | C3 (cc3)    0.0%    | C3_ACPI    82.3%    5.7 ms 72.8%    3.8 ms
                    | C6 (cc6)    0.0%    |
                    | C7 (cc7)   73.1%    |
                    |                     |
                    |                     |
                    |                     |

                    |            Core(HW) |            CPU(OS) 2   CPU(OS) 6
                    |                     | C0 active   5.5%        3.0%
                    |                     | POLL        0.0%    0.0 ms  0.0%    0.0 ms
                    |                     | C1_ACPI     7.3%    0.3 ms  9.8%    0.4 ms
                    |                     | C2_ACPI    12.8%    0.7 ms 12.8%    0.8 ms
                    | C3 (cc3)    0.0%    | C3_ACPI    70.0%    3.0 ms 71.2%    4.4 ms
                    | C6 (cc6)    0.0%    |
                    | C7 (cc7)   67.4%    |
                    |                     |
                    |                     |
                    |                     |

                    |            Core(HW) |            CPU(OS) 3   CPU(OS) 7
                    |                     | C0 active   2.1%        1.3%
                    |                     | POLL        0.0%    0.0 ms  0.0%    0.0 ms
                    |                     | C1_ACPI     2.0%    0.2 ms  1.8%    0.3 ms
                    |                     | C2_ACPI     3.4%    0.5 ms  2.0%    0.9 ms
                    | C3 (cc3)    0.0%    | C3_ACPI    83.2%    5.3 ms 93.6%    7.3 ms
                    | C6 (cc6)    0.0%    |
                    | C7 (cc7)   80.7%    |
                    |                     |
                    |                     |
                    |                     |

                    |             GPU     |
                    |                     |
                    | Powered On 17.0%    |
                    | RC6        83.0%    |
                    | RC6p        0.0%    |
                    | RC6pp       0.0%    |
                    |                     |
                    |                     |
                    |                     |
                    |                     |
                    |                     |

Maybe you’ve already made more headway with this, but if not, here are a few suggestions based on my own recent attempts to get handle on power usage via tlp & powertop:

  • If you haven’t already, run powertop -c to calibrate [see the bottom of the Arch wiki for details].

  • Make sure everything is set to “Good” on Tunables tab of powertop. [On your tlp-stat readout, I noticed your dirty_writeback_centisecs set at 6000. That’s something powertop is always telling me is “Bad” and wants to adjust to 1500.]

  • Do you have the Intel PCH Thermal driver installed? That seems to be the one out of all the various Intel power management drivers that works with Tiger Lake.

  • Since you’re systemd, you might get something out of auto-cpufreq [which according to this post works well in tandem with tlp].

  • Is it possible that Brave/Electron were the culprit for the backlight usage in your screenshot? Although, that didn’t seem to be effecting the overall battery discharge rate as much.

Good luck getting to C10 nirvana. Maybe post to the Linux battery life tuning thread if you don’t get more feedback here. I’ve found useful suggestions there.

3 Likes

I’ve found that using s2idle (see /sys/power/mem_sleep) will put it into a state where it will never go past C3 for some reason. Rebooting or using “deep” seems to fix it, allowing for C10; alas “deep” takes about 15 seconds to wake from sleep for some reason (maybe depending on your exact configuration).

3 Likes

I have already calibrated powertop many times. As for dirty_writeback_centisecs, iirc it’s the maximum time before data is written to disk, in centisecs, so what I’ve set via TLP is more aggressive than what powertop wants to set it to (60s vs 15s).

I’ve tried auto-cpufreq, but it decided to just have the cpu constantly turbo to 3ghz (???). I think TLP’s constant 800mhz is better than that lmao

I have also done these tests without any apps open and in a tty, and the lowest I can possibly get idle power consumption is around 6W in a tty with nothing else running.

As for the driver, how would I go about installing that? Can’t seem to find it anywhere

Yeah, that’s one of the first things I did after reading the linux thread on the forum

Solved.

Issue was that I was running linux-zen, strangely. With linux-zen, the CPU wouldn’t get past C3 and idle power usage was 7-13W. With regular linux, the CPU reaches C8 and idle power usage is ~5W. Strange that linux-zen did that, but ok ig

2 Likes