From Fedora Project Wiki

Revision as of 15:05, 2 March 2018 by Jkurik (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Improved Laptop Battery Life

Summary

Improve Fedora (Workstation) Battery Life by enabling various hardware power-saving features by default.

Owner

Current status

Detailed Description

The initial focus of this change is to enable to following 3 hardware power-saving features by default:

  • A new SATA link-powermanagement-policy has been written which mirrors Windows defaults: med_power_with_dipm, this has been merged for kernel 4.15, as part of this change this new policy will be the default on all Intel mobile chipsets. This saves aprox. 1.0 - 1.5 Watts of power on an idle laptop.
  • Enable Intel HDA codec power-saving by default with a 1 second timeout. This saves aprox. 0.4 Watts of power on an idle laptop.
  • Enable USB autosuspend for USB bluetooth receivers by default. If all other USB devices on the laptop also have USB auto-suspend enabled (which typically is true) this saves aprox. 0.4 Watts of power on an idle laptop.

Depending on how much time this takes, this list may be extended.

Benefit to Fedora

Laptops running Fedora will last longer on battery :)

Scope

  • Proposal owners: Write kernel patches adding new policies / setting the defaults where necessary and merge these upstream (done for the new SATA link-pm-policy and for allowing USB autosuspend for btusb), temporarily add these patches to the Fedora kernels where necessary and set the Kconfig options to enable these features by default.
  • Other developers: This should not impact other developers, but e.g. developers working on bluetooth may see regressions which have their root cause in this change. All the changes will have kernel cmdline options to disable them, so that developers can easily ask users to test if these changes are the cause of any problems.
  • Release engineering: [1] (a check of an impact with Release Engineering is needed)
  • Policies and guidelines: The policies and guidelines do not need to be updated.
  • Trademark approval: Not needed for this Change.

Upgrade/compatibility impact

All changes are in base packages, so on upgrade all users will automatically get these improvements.

How To Test

  1. Install Fedora 27 (with its 4.13.x release kernel), or boot Fedora 28 with a F27 4.13.x kernel, install powertop, run laptop on battery power, login and run "sudo powertop" in a terminal, let it idle for 5 minutes and note idle power-consumption rate
  2. Install Fedora 28, install powertop, run laptop on battery power, login and run "sudo powertop" in a terminal, let it idle for 5 minutes and note idle powerconsumption rate
  3. Note the screen brightness should be the same for both tests, if your laptop has a brightness sensor, disable automatic brightness adjustments
  4. Fedora 28 idle power-consumption should be lower then Fedora 27's power-consumption, esp. on Haswell and later systems using a SATA disk


The sata link power management pollcy changes have been tested in the following devices (the listed improvement in power-consumptions are from changing SATA LPM policy the med_power_with_dipm only) :

Laptop model Disk Normal Idle use med_power_with_dipm use notes
Dell Latitude E6400 TOSHIBA THNSFC12 16.0 W 14.5 W
Dell Latitude E6430 C400-MTFDDAC256M 12.1 W 11.0 W
T-Bao T-Book Air Starsway-N200 3.7W 2.9 W
HP EliteBook 8540w Samsung SSD 850 18.8 W 17.9 W
Lenovo W530 M4-CT128M4SSD2 11.9 W 10.4 W
Lenovo Thinkpad T530 Samsung SSD 850 7.7 W 6.9 W
ThinkPad T510 WDC WD800BEVS-08 10.6 W 9.6 W
Dell Latitude E7450 SAMSUNG SSD PM87 6.4 W 5.2 W
Lenovo Thinkpad T400 SanDisk Ultra II 13.6 W 11.8 W
Lenovo ThinkPad T450s Samsung SSD 850 EVO 500GB 4.5 W 3.4 W
Asus Zenbook UX31A Crucial_CT275MX3 4.9 W 4.4 W
Lenovo ThinkPad X1 Carbon 2nd gen Crucial_CT525MX3 11 W 8 W Data corruption when using min_power
Lenovo ThinkPad T520 INTEL SSDSC2BW18 10.7 W 10.1 W
Lenovo Thinkpad T440s SAMSUNG MZ7TE256 7.9 W 6.7 W
Lenovo ThinkPad X220 SAMSUNG MZ7TD128 8.8 W 7.6 W

User Experience

Laptops running Fedora Workstation will last longer on battery :)

Dependencies

None.

Contingency Plan

  • Contingency mechanism: All the power-saving features enabled by this change will have both a kernel commandline option to disable them during runtime for testing / debugging purposes and as a possible workaround. All the power-saving features will also have a Kconfig option to enable/disable them by default if any of the enabled features is causing trouble we can choose to disable that feature by default.
  • Contingency deadline: Beta Freeze
  • Blocks release? No
  • Blocks product? Workstation

Documentation

Release Notes

TODO