Page 1 of 1

T440s: Improving battery life

Posted: Fri Apr 04, 2014 8:11 am
by yak_sk
I am running Gentoo (kernel 3.12.13-gentoo kernel), have a new T440s with
the default 3-cell battery. Windows users report about 6 hours of battery life
on Wifi, but I can only squeeze2.5 hours out of it, it seems the system is not
doing everything it can.

What I have done so far:
  • Enable frequency scaling (cpu_power). When on battery, linux switches to the "powersave" CPU frequency governor. It seems the governor is not very conservative though, the frequency of
    every cpu core is still usually about 2 GHz. Do you think that disabling desktop effects / choosing a different desktop environment (currently using KDE4) might have a significant impact?
  • Decrease display brightness to about 70%, it is pretty much unreadable if I go lower
What are the other options that windows commonly does and are potentially doable on linux?
Also do you think it might have major impact on battery life?

Straight out of my mind:
  • Spinning down the hard drive - seems off-topic, because I'm using an SSD
  • Decreasing the TX-power of the wifi radio
  • Disabling bluetooth, power to the internal dongle (while wifi is on)
  • Turning on power saving on the sound card?
  • ...any ideas please?
This is a very open question and I do not expect any of you guys to solve my
problems for me, so even if you just direct me to any valuable sources, that
will be great!

Re: T440s: Improving battery life

Posted: Sat Apr 05, 2014 4:18 am
by Jah-Buddha
Hello! I'm running Gentoo too, ~amd64 on T530 with SSD, and battery life with 9-cell battery is around 10 hours (with discrete graphics card disabled, but that's another story).

From my experience, 80% of power management under linux is enabling ONDEMAND frequency governor by default (it is more energy-efficient then POWERSAVE and doesn't cap performance) and installing laptop-mode-tools package.
Then laptop_mode service will automatically handle all the power-saving options - bluetooth, sound card, ethernet etc.
And kernel doesn't switch governors by itself, you need a service for it - cpufreqd, for example. But ondemand governor does its job even better.

Make sure that you enable all intel-related frequency scaling options in kernel config. And link to main source: http://wiki.gentoo.org/wiki/Power_management/HOWTO
Please tell about the results!

Re: T440s: Improving battery life

Posted: Sat Apr 05, 2014 12:40 pm
by kony
As said before, install laptop-mod-tools. Alternatively, install TLP:
sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp tlp-rdw
sudo apt-get install tp-smapi-dkms acpi-call-tools

Re: T440s: Improving battery life

Posted: Sat Apr 05, 2014 7:59 pm
by yak_sk
Thank you!

I have carefully read what laptop-mode does and managed to tweak
almost all those things manually to my liking. I have managed to get the computer
to draw to about 6.5 - 7 Watts from the battery (as reported by powertop) with
about 65% display backlight - at the brink of straining my eyes too much (matte
display).

I have written a script for the ac power plug on/off and also run it after booting. It detects
when the pc is running off the battery and switches governors using cpupower.
It also changes screen brightness, disables radios, enables sata link power management, usb
autosuspend and sound card power saving.

So far, so good!

What puzzles me, is that with the powersave frequency governor, all CPU cores
are still at about 2 Ghz.

People have told me they have more success with the ondemand governor (I wouldn't
mind turning on the userspace governor and settings the CPU frequency to the lowest
possible - 800Mhz.)

I have enabled all governors before compiling the kernel, the default governor in kernel menuconfig is
userspace (kernel 3.12.13-gentoo), but:

Code: Select all

# cpupower frequency-info
only reports two available governors: performance and powersave.

also

Code: Select all

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
performance powersave
People told me it might have something to do with disabling "Intel P-state control" but this
can't be such a bad idea to use Intel's native scaling driver - which I assume this is?
  1. Can I get userspace and ondemand as options too?
  2. Can I manage this without losing the performance and powersave governors?

Re: T440s: Improving battery life

Posted: Tue Apr 08, 2014 9:23 am
by Jah-Buddha
According to http://www.kernel.org
The CPUfreq governor "userspace" allows the user, or any userspace
program running with UID "root", to set the CPU to a specific frequency
by making a sysfs file "scaling_setspeed" available in the CPU-device
directory.
So, with userspace governor you need to manually adjust frequency scaling, or manage frequency scaling with userspace program, so have it enabled by default is not a good idea. I have no information about benefits from using frequency-switching daemons instead of native kernel implementation. If I were you, I'd try to enable ondemand governor by default. Actually, dynamic frequency switching is more power-efficient than throttling the CPU to the lowest avaliable frequency.
You can have ondemand as a default option and change governors via laptop_mode:
BATT_CPU_GOVERNOR=ondemand
NOLM_AC_CPU_GOVERNOR=performance
Can you post the output of cpupower -c 0 frequency-info? It shows what driver your processor use, too.