FS#43150 - powertop auto-tune crashes Attached to Project: Community Packages Opened by Heinrich Siebmanns (Harvey) - Thursday, 18 December 2014, 11:42 GMT. Hi there:slightsmile: I'm newbie here. So i searched for it and found things like services and things like that Can someone explain in details how to run powertop on startup. Sudo powertop -auto-tune Call powertop auto-tune automatically at boot time 1. On systems using systemd as startup manager (like Ubuntu) install it as a service.
- Autotune Free Download
- Antares Auto-tune
- Powertop Auto Tune Startup Service
- Powertop Auto Tune Startup Reviews
- Autotune Download
UPDATE: If you want to turn all tunable flags to 'Good' in some startup script, you can use the -auto-tune parameter. Together with the pm-utils mentioned above it would be: sudo pm-powersave true sudo powertop -auto-tune UPDATE II: Nowadays I do not use laptop-mode-tools and pm-utils any more. I use TLP from the latest Ubuntu distribution. Aug 10, 2015 How to set PowerTOP options at boot time by Milosz Galazka on August 10, 2015 and tagged with Ubuntu, System management, systemd Today, I will show you how to set all tunable PowerTOP options at boot time using systemd service. May 08, 2016 So I took note of the Linux commands that PowerTOP was running for the USB peripherals and the audio device when it disabled power saving. The plan is to use the power of powertop ––auto-tune but I’ll then turn power saving back off for those specific devices.
Preface
Start powertop automatically at boot time. Included with libreboot is a script called ‘powertop.debian’. Run this as root and it will setup powertop to run with –auto-tune at boot time.
This post discusses a combined method to extend battery life of high-end laptops with 6-core or 9-core Intel CPUs while reducing the heat generation at the same time. The method sets CPU peformance differently depending on the power source (AC or battery) and uses TLP as a frontend for automation.
Summary
- Intel p_state driver
- Completely software method (will not harm your hardware)
- Intel processors with 6+ physical cores
- Adjust perf for dynamic frequency downscaling, thus significantly reduce power consumption + heat
- Disable unused CPU cores to maximize battery (not necessary for laptops with high-capacity battery)
- Disable unused hardware in battery mode (ethernet/bluetooth..)
- Can be used in tandem with other methods such as reducing CPU operating voltage (undervolt) or changing thermal conductivity substance (repaste)
Test Spec
Tested with Ubuntu 16.04.6 and Ubuntu 18.04.2 with latest kernel.
Battery:
Results:
powerstat
is used to evaluate the battery discharge rate of different profiles.
Method | Discharge rate | CPU Temp. | Load | Method Description |
---|---|---|---|---|
1 | 11.64W | 38-40C | Light load: gnome-system-monitor , powerstat , powertop , background: Google Chrome (1 tab), psensor | Intel GPU + this combined method + backlight display @ 15% |
2 | 16.41W | 41-43C | Light load: gnome-system-monitor , powerstat , powertop , background: Google Chrome (1 tab), psensor | Intel GPU + TurboBoost disable + perf:19%-50% + original config + backlight display @ 15% |
3 | 23.56W | 48-50C | Light load: gnome-system-monitor , powerstat , powertop , background: Google Chrome (1 tab), psensor | nvidia GPU (GTX 1070 max-q) + TurboBoost disable + perf:19%-50% + original config + backlight display @ 15% |
4 | 9.11W | 36C | No load (idle) | Intel GPU + this combined method + backlight display @ 15% |
Note: I used system76-power to disable the nvidia GPU.
While powertop
reports the current recharge rate per process at the moment, it is not accurate to use it to measure the total power consumption. A tool that statistically measures the power consumption over a long period of time (7-10 minutes) will produce more reliable results. In this end, we use powerstat
.
From the evaluation, method 1 can help oryx4 laptop last about 5 hours under light load (I often got 5h - 5.2h). While method 4 can prolong the laptop battery to 6 hours in idle (a convenient test case for different profiles, not practical use case).
Prerequisites
- Intel p_state driver
Optional (but recommended)
- TLP to automate the setting below.
- powertop (one should not run
powertop --auto-tune
at start-up to avoid conflict with TLP).
Method Explained
To extend battery life, I use the following combined methods:
- Enable dynamic frequency down-scaling based on performance profile in Intel p_state.
- Disable unnecessary services/processes that adversely affect the battery life.
- Automate the process with
tlp
. - Reduce the number of operational cores in battery mode. (manually run after startup)
- Tuning with
powertop
.
Enable dynamic frequency down-scaling (runtime)
Instead of manual underclocking the CPU, I use a dynamic method to down-scale the CPU frequency by setting the maximum and minimum performance allowed in AC and battery.
Require: an active intel p_state driver (power governor = powersave(default))(to check: cat /sys/devices/system/cpu/intel_pstate/status
)
Battery Mode:
Explain: Set the maximum performance allowed equal to 19% of the highest possible performance. The Intel p_state driver will down-scale the CPU frequency accordingly. This can be executed at run-time.
- max-performance <- 20/100 is equivalent to set maximum CPU freq @ 800MHz (intel i7-8750H)
- min-performance <- 20/100 is equivalent to set minimum CPU freq @ 800MHz (intel i7-8750H)
- Turbo Boost <- disable
Note: You should experiment and try different max_perf_pct value
and see what best suits your need. Suggest: if you are using in battery mode, try first with a value between 20-30%. If you are on AC, try a value between 70-90%.
AC Mode:
Explain: Set the maximum performance allowed equal to 80% of the highest possible performance. The Intel p_state driver will down-scale the CPU frequency accordingly. This can be executed at run-time.
- max-performance <- 80/100 is equivalent to set maximum CPU freq @ 3400MHz (intel i7-8750H)
- min-performance <- 20/100 is equivalent to set minimum CPU freq @ 800MHz (intel i7-8750H)
- Turbo Boost <- enable
With these setting, the maximum CPU temperature is 40C (light load + no TurboBoost) on battery and 75-80C (high load + TurboBoost) with AC plugged in. Refer to this post for the relation between frequency and temperature.
To automate the process, I use TLP. You can find my TLP config here
Please read thru the config before applying. Also, I encourage you to peruse the tlp document here
Disable unnecessary processes
Autotune Free Download
Disable Bluetooth (started with TLP at startup)
To disable bluetooth when on battery, change the following line in your TLP config:
DEVICES_TO_DISABLE_ON_STARTUP='bluetooth'
Disable Ethernet (runtime)
Ethernet consumes huge energy when it is used (12-14W) and considerable energy (0.5-1W) when it is not used/idle. To turn off your ethernet, refer to ifconfig
for the ethernet interface name, then kill it
Note: ethernet could be on idle (i.e. no cable hooked up), but powertop
would report it as in full utilization.
Refer to the bash script (execute after restart on battery): here
Disable unused CPU cores (runtime)
I found out that I never utilized all my CPU cores in battery mode. Since my goal was to keep my laptop's battery from draining, I never ran any computationally expensive programs without an AC plugged. Therefore, it is helpful for me to disable few CPU cores on battery mode. It hasn't introduced any perceived performance drop since I only ran simple programs such as VI text editor, 4 or 5 Chrome tabs, LibreOffice, etc.
Antares Auto-tune
To disable 4/6 physical cores in i7-8750H (don't worry, they will become online if you explicitly enable them back on or after restart)
Powertop Auto Tune Startup Service
Replace echo 0
by echo 1
if you want to turn these CPU cores back on.
Refer to the bash script (execute after restart on battery) here.
Powertop Auto Tune Startup Reviews
Tuning with powertop (runtime)
- Often it requires a calibration
powertop --calibrate
on battery for an extended period of time before you can start to tune. - Run
powertop --auto-tune
to let powertop tweak the bad processes that are eating your battery. - Refer to reference.
- This should be done manually. Do not run
powertop --auto-tune
at startup to avoid conflict with TLP.
Autotune Download
Hope it helps.
Comments are closed.