Reset and setup from scratch battery settings / cpu governors

Good morning everyone,

After a couple months I was forced to boot into win10 partition for some work. To my surprise, I discovered that a stock "balanced" battery settings gives me more working hours than what I was used to on manjaro (clocked 12+ hours on win10 vs usual 7+ hours on manjaro - regular office work)

I recall playing a lot with tlp and other guides on the web / arch wiki desribing various methods of tweaking battery life. I'm pretty sure I might have gone too far and end up running to many different options at the same time.

Could anyone please guide me on how can I:

  1. reset any battery life / cpu governors that might be running on the background (assuming I don't recall how many of them are there)
  2. ensure that only one - preferred option is taking care of how my t480s thinkpad uses energy
  3. set up the preferred option for great battery life when on battery only, and on demand / performance when on AC?

my current sudo tlp-stat gives the following:

--- TLP 1.2.2 --------------------------------------------

+++ Configured Settings: /etc/default/tlp
TLP_ENABLE=1
TLP_DEFAULT_MODE=BAT
TLP_PERSISTENT_DEFAULT=0
DISK_IDLE_SECS_ON_AC=0
DISK_IDLE_SECS_ON_BAT=2
MAX_LOST_WORK_SECS_ON_AC=15
MAX_LOST_WORK_SECS_ON_BAT=60
CPU_SCALING_GOVERNOR_ON_AC=ondemand
CPU_SCALING_GOVERNOR_ON_BAT=powersave
CPU_SCALING_MAX_FREQ_ON_AC=100
CPU_SCALING_MAX_FREQ_ON_BAT=90
CPU_HWP_ON_AC=balance_performance
CPU_HWP_ON_BAT=balance_power
CPU_MAX_PERF_ON_BAT=90
CPU_BOOST_ON_AC=1
SCHED_POWERSAVE_ON_AC=0
SCHED_POWERSAVE_ON_BAT=1
NMI_WATCHDOG=0
ENERGY_PERF_POLICY_ON_AC=performance
ENERGY_PERF_POLICY_ON_BAT=power
DISK_DEVICES="sda sdb"
DISK_APM_LEVEL_ON_AC="254 254"
DISK_APM_LEVEL_ON_BAT="128 128"
SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
SATA_LINKPWR_ON_BAT="med_power_with_dipm max_performance"
AHCI_RUNTIME_PM_TIMEOUT=15
PCIE_ASPM_ON_AC=performance
PCIE_ASPM_ON_BAT=powersave
WIFI_PWR_ON_AC=off
WIFI_PWR_ON_BAT=off
WOL_DISABLE=N
SOUND_POWER_SAVE_ON_AC=0
SOUND_POWER_SAVE_ON_BAT=1
SOUND_POWER_SAVE_CONTROLLER=Y
BAY_POWEROFF_ON_AC=0
BAY_POWEROFF_ON_BAT=0
BAY_DEVICE="sr0"
RUNTIME_PM_ON_AC=on
RUNTIME_PM_ON_BAT=auto
RUNTIME_PM_DRIVER_BLACKLIST="amdgpu nouveau nvidia radeon pcieport"
USB_AUTOSUSPEND=0
USB_BLACKLIST_BTUSB=0
USB_BLACKLIST_PHONE=0
USB_BLACKLIST_PRINTER=1
USB_BLACKLIST_WWAN=1
USB_BLACKLIST="0000:1111 2222:3333 4444:5555"
RESTORE_DEVICE_STATE_ON_STARTUP=1
DEVICES_TO_DISABLE_ON_STARTUP="wwan"
DEVICES_TO_ENABLE_ON_STARTUP="bluetooth wifi"
DEVICES_TO_ENABLE_ON_SHUTDOWN=""
START_CHARGE_THRESH_BAT0=60
STOP_CHARGE_THRESH_BAT0=80
START_CHARGE_THRESH_BAT1=70
STOP_CHARGE_THRESH_BAT1=80
RESTORE_THRESHOLDS_ON_BAT=1

+++ System Info
System         = LENOVO ThinkPad T480s 20L7001LPB
BIOS           = N22ET56W (1.33 )
Release        = "Manjaro Linux"
Kernel         = 5.2.8-1-MANJARO #1 SMP PREEMPT Fri Aug 9 19:34:20 UTC 2019 x86_64
/proc/cmdline  = BOOT_IMAGE=/boot/vmlinuz-5.2-x86_64 root=UUID=711acba1-5efb-427b-a46d-686daf4836f9 rw quiet
Init system    = systemd 
Boot mode      = UEFI

+++ TLP Status
State          = enabled
RDW state      = not installed
Last run       = 07:26:10,    144 sec(s) ago
Mode           = battery (manual)
Power source   = AC

Notice: systemd-rfkill.socket is not masked -- invoke "systemctl mask systemd-rfkill.socket" to correct this!

+++ Processor
CPU model      = Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz

/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  =  4000000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/energy_performance_preference = balance_power
/sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences = default performance balance_performance balance_power power 

/sys/devices/system/cpu/cpu1/cpufreq/scaling_driver    = intel_pstate
/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu1/cpufreq/scaling_available_governors = performance powersave
/sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq  =   400000 [kHz]
/sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq  =  4000000 [kHz]
/sys/devices/system/cpu/cpu1/cpufreq/energy_performance_preference = balance_power
/sys/devices/system/cpu/cpu1/cpufreq/energy_performance_available_preferences = default performance balance_performance balance_power power 

/sys/devices/system/cpu/cpu2/cpufreq/scaling_driver    = intel_pstate
/sys/devices/system/cpu/cpu2/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu2/cpufreq/scaling_available_governors = performance powersave
/sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq  =   400000 [kHz]
/sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq  =  4000000 [kHz]
/sys/devices/system/cpu/cpu2/cpufreq/energy_performance_preference = balance_power
/sys/devices/system/cpu/cpu2/cpufreq/energy_performance_available_preferences = default performance balance_performance balance_power power 

/sys/devices/system/cpu/cpu3/cpufreq/scaling_driver    = intel_pstate
/sys/devices/system/cpu/cpu3/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu3/cpufreq/scaling_available_governors = performance powersave
/sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq  =   400000 [kHz]
/sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq  =  4000000 [kHz]
/sys/devices/system/cpu/cpu3/cpufreq/energy_performance_preference = balance_power
/sys/devices/system/cpu/cpu3/cpufreq/energy_performance_available_preferences = default performance balance_performance balance_power power 

/sys/devices/system/cpu/cpu4/cpufreq/scaling_driver    = intel_pstate
/sys/devices/system/cpu/cpu4/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu4/cpufreq/scaling_available_governors = performance powersave
/sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq  =   400000 [kHz]
/sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq  =  4000000 [kHz]
/sys/devices/system/cpu/cpu4/cpufreq/energy_performance_preference = balance_power
/sys/devices/system/cpu/cpu4/cpufreq/energy_performance_available_preferences = default performance balance_performance balance_power power 

/sys/devices/system/cpu/cpu5/cpufreq/scaling_driver    = intel_pstate
/sys/devices/system/cpu/cpu5/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu5/cpufreq/scaling_available_governors = performance powersave
/sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq  =   400000 [kHz]
/sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq  =  4000000 [kHz]
/sys/devices/system/cpu/cpu5/cpufreq/energy_performance_preference = balance_power
/sys/devices/system/cpu/cpu5/cpufreq/energy_performance_available_preferences = default performance balance_performance balance_power power 

/sys/devices/system/cpu/cpu6/cpufreq/scaling_driver    = intel_pstate
/sys/devices/system/cpu/cpu6/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu6/cpufreq/scaling_available_governors = performance powersave
/sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq  =   400000 [kHz]
/sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq  =  4000000 [kHz]
/sys/devices/system/cpu/cpu6/cpufreq/energy_performance_preference = balance_power
/sys/devices/system/cpu/cpu6/cpufreq/energy_performance_available_preferences = default performance balance_performance balance_power power 

/sys/devices/system/cpu/cpu7/cpufreq/scaling_driver    = intel_pstate
/sys/devices/system/cpu/cpu7/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu7/cpufreq/scaling_available_governors = performance powersave
/sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq  =   400000 [kHz]
/sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq  =  4000000 [kHz]
/sys/devices/system/cpu/cpu7/cpufreq/energy_performance_preference = balance_power
/sys/devices/system/cpu/cpu7/cpufreq/energy_performance_available_preferences = default performance balance_performance balance_power power 

/sys/devices/system/cpu/intel_pstate/min_perf_pct      =  10 [%]
/sys/devices/system/cpu/intel_pstate/max_perf_pct      =  90 [%]
/sys/devices/system/cpu/intel_pstate/no_turbo          =   0
/sys/devices/system/cpu/intel_pstate/turbo_pct         =  60 [%]
/sys/devices/system/cpu/intel_pstate/num_pstates       =  37

x86_energy_perf_policy: program not installed.

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

+++ Undervolting
PHC kernel not available.

+++ Temperatures
/proc/acpi/ibm/thermal = 36 -128 0 0 0 0 0 0 0 0 66 0 0 0 0 0 [°C]
/proc/acpi/ibm/fan     =     0 [/min]

+++ 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

+++ Storage Devices
Devices = sda sdb

/dev/sda:
  Type      = USB
  Model     = Generic SD MMC
  Firmware  = unknown
  APM Level = none/disabled
  Status    = standby
  Scheduler = [mq-deadline] kyber bfq none (multi queue)

  Runtime PM: control = on, autosuspend_delay_ms =   -1

/dev/sdb: not present.

+++ AHCI Link Power Management (ALPM)
No AHCI-enabled host controller detected.

+++ Intel Graphics
/sys/module/i915/parameters/enable_dc        = -1 (use per-chip default)
/sys/module/i915/parameters/enable_fbc       =  1 (enabled)
/sys/module/i915/parameters/enable_psr       = -1 (use per-chip default)
/sys/module/i915/parameters/modeset          = -1 (use per-chip default)

/sys/class/drm/card0/gt_min_freq_mhz         =   300 [MHz]
/sys/class/drm/card0/gt_max_freq_mhz         =  1150 [MHz]
/sys/class/drm/card0/gt_boost_freq_mhz       =  1150 [MHz]
/sys/kernel/debug/dri/0/i915_ring_freq_table: 300 350 400 450 500 550 600 650 700 750 800 850 900 950 1000 1050 1100 1150 [MHz] 

+++ Wireless
bluetooth = on
wifi      = on
wwan      = off (software)

hci0(btusb)                   : bluetooth, connected
wlp61s0(iwlwifi)              : wifi, connected, power management = off
wwp0s20f0u6(cdc_mbim)         : wwan, not connected

+++ 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 (using bios preferences)

+++ Runtime Power Management
Device blacklist = (not configured)
Driver blacklist = amdgpu nouveau nvidia radeon pcieport

/sys/bus/pci/devices/0000:00:00.0/power/control = auto (0x060000, Host bridge, skl_uncore)
/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:08.0/power/control = auto (0x088000, System peripheral, no driver)
/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 (0x118000, Signal processing controller, intel_pch_thermal)
/sys/bus/pci/devices/0000:00:15.0/power/control = auto (0x118000, Signal processing controller, intel-lpss)
/sys/bus/pci/devices/0000:00:16.0/power/control = auto (0x078000, Communication controller, mei_me)
/sys/bus/pci/devices/0000:00:1c.0/power/control = on   (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1c.4/power/control = on   (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1c.6/power/control = auto (0x060400, PCI bridge, pcieport)
/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.2/power/control = auto (0x058000, Memory controller, no driver)
/sys/bus/pci/devices/0000:00:1f.3/power/control = auto (0x040300, 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.6/power/control = auto (0x020000, Ethernet controller, e1000e)
/sys/bus/pci/devices/0000:3d:00.0/power/control = auto (0x028000, Network controller, iwlwifi)
/sys/bus/pci/devices/0000:3e:00.0/power/control = auto (0x010802, Non-Volatile memory controller, nvme)

+++ USB
Autosuspend         = disabled
Device whitelist    = (not configured)
Device blacklist    = 0000:1111 2222:3333 4444:5555
Bluetooth blacklist = disabled
Phone blacklist     = disabled
WWAN blacklist      = enabled

Bus 002 Device 002 ID 0bda:0316 control = on,   autosuspend_delay_ms = 2000 -- Realtek Semiconductor Corp.  (usb-storage)
Bus 002 Device 001 ID 1d6b:0003 control = auto, autosuspend_delay_ms =    0 -- Linux Foundation 3.0 root hub (hub)
Bus 001 Device 006 ID 06cb:009a control = on,   autosuspend_delay_ms = 2000 -- Synaptics, Inc.  (no driver)
Bus 001 Device 005 ID 04f2:b604 control = auto, autosuspend_delay_ms = 2000 -- Chicony Electronics Co., Ltd  (uvcvideo)
Bus 001 Device 004 ID 8087:0a2b control = auto, autosuspend_delay_ms = 2000 -- Intel Corp.  (btusb)
Bus 001 Device 003 ID 2cb7:0210 control = on,   autosuspend_delay_ms = 2000 -- <unknown> (cdc_mbim, cdc_acm)
Bus 001 Device 002 ID 058f:9540 control = on,   autosuspend_delay_ms = 2000 -- Alcor Micro Corp. AU9540 Smartcard Reader (no driver)
Bus 001 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms =    0 -- Linux Foundation 2.0 root hub (hub)

+++ Battery Features: Charge Thresholds and Recalibrate
natacpi    = active (data, thresholds)
tpacpi-bat = active (recalibrate)
tp-smapi   = inactive (ThinkPad not supported)

+++ ThinkPad Battery Status: BAT0 (Main / Internal)
/sys/class/power_supply/BAT0/manufacturer                   = SMP
/sys/class/power_supply/BAT0/model_name                     = 01AV479
/sys/class/power_supply/BAT0/cycle_count                    =     51
/sys/class/power_supply/BAT0/energy_full_design             =  57020 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  54690 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  42960 [mWh]
/sys/class/power_supply/BAT0/power_now                      =      0 [mW]
/sys/class/power_supply/BAT0/status                         = Unknown (threshold effective)

/sys/class/power_supply/BAT0/charge_start_threshold         =     60 [%]
/sys/class/power_supply/BAT0/charge_stop_threshold          =     80 [%]
tpacpi-bat.BAT0.forceDischarge                              =      0

Charge                                                      =   78.6 [%]
Capacity                                                    =   95.9 [%]

Thank you very much,
b.

On point 1:

For modern Intel CPUs, there are by default only two governors, which (AFAIK) are handled by intel_pstate: powersave and performance, the former is the default.
Check output of cpupower frequency-info to find out which one is in use.

Oh, just saw your tlp output: you can see that it is intel_pstate with powersave governor.

intel-undervolt might be worth a try, with a slight amount of undervoltage you could increase battery life a little bit but don't expect any miracles.

1 Like

also, your cpu max scaling frequency and cpu max performance on battery is way too high, reduce that to increase battery life. mine is at 50% for example. fairly sure 2000000 over eight cores should provide sufficient performance for any tasks you need to run on battery. you could also limit the number of cores available on battery to 4.

1 Like

Thanks for these hints, I'll try and see what's there to gain.

How about checking (I mean globally / system wise) if there are any other governors / software / scripts that might be active in the background?
I sure I've been following a couple of tutorials one day and installing various packages, until I read on arch (I think) that basically one should stick to a single solution. If I don't recall what I might have installed, is there any way to check what on my system is trying to set cpu load or anything else battery / performance related?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by