I have a Lenovo Thinkpad T420s with the following main features:
- Intel Core i7 2640M 2.8GHz
- 4GB RAM, 160GB SSD
- 14" TFT
- Wifi Ultimate-N 6300, WiMAX (what's that BTW?), WWAN UMTS/3G Ericsson F5521
- Hybrid grahics (Intel HD plus nVidia Optimus, NVS 4200M)
As you can see, that's a beast so I can imagine that its battery life may not be very good.
Nevertheless, it has dual boot (I kept the original Windows 7 in a separate partition), and in Windows the battery life is significantly longer (at least 3h or so) and the laptop is in general much cooler (and the fan much more silent). In Gentoo the battery lasts at most 2h without even stressing the CPU.

I've been improving this a bit, thanks to many hints found in thinkwiki.org and other sites (including these Gentoo forums). I've found the PowerTOP utility specially interesting.
But I've reached a point where I don't know what else to do. So that's why I write you, hoping that somebody can clearly see something that I may be doing wrong...
I use to travel rather frequently, so obviously I'm interested in having better autonomy - even if that's at the expense of slightly worse performance when on battery power.

First, I use to set the CPU like this:

Code:

/usr/bin/cpufreq-set -f 800000 -r

...that is, the lowest frequency (800MHz). I've verified that it helps a bit. Intel and PowerTOP recommend the 'ondemand' strategy, but this minimum frequency setting gives slightly better results.
Then, after some checks, I prepared this simple script that I launch when going into battery (taken from some web that I cannot recall now):

I've also included things like 'thinkfan' for tuning the fan level of the CPU, keeping it a bit cooler when needed (it was reaching 90ºC when emerging!), and also a bit more silent when possible (i.e. when around 40-50ºC).
I also found some recommendations such as passing the "pcie_aspm=force" (for the PCI Express) and "usbcore.autosuspend=1" options to the kernel. Or like using 'irqbalance' and adding that (init.d) to the boot level.

With all this, I get typical CPU temperatures of 55-60ºC, the fan always on (typ. level 3 over 7) - and the air temperature from the fan is indeed warm. And... the funny thing is that, in an 'idle' KDE (even with some applications open such as Chromium, Thunderbird or Eclipse), the CPU usage, even with this setting of 800MHz forced, is typ. below 10% (and most time <4-5%). Except, of course, when opening some other application or running intensive things (e.g. watching a YouTube full-screen it goes to 50%). I mean, there's nothing eating up the CPU, it's simply... hot, and that's it.
I don't know if it could be the nVidia being always on. How could I check the nVidia GPU usage?
The problem is that it seems that my X/KDE is not even detecting the nVidia Optimus! (it's just running on the Intel graphics - and OK, that's fine if that means more battery time). Even deactivating the nVidia from BIOS doesn't help.

"powertop -d" shows this (in KDE, just Kate+Konsole open, Wifi active, screen brightness around 60%, WiMAX+Bluetooth turned off by BIOS, also HyperThreading turned off but keeping both i7 cores active):

BillWho, many thanks! I was a bit sleepy when copying those commands into that script so I didn't realize that it was setting the CPU governor (I'm already setting that separately - and I do consider all the CPUs).
Regarding the windoze/linux issue, yes, I fear that the Lenovo guys sell their laptops with a very-well-prepared windoze installation (with all the power utilities, etc), so it will be tricky to beat that.
Anyway I must say that I'm very happy with my Gentoo there. It's running very smooth
Cheers!_________________Did you know that we typically make use of only 5% of the power of our personal computers?
Check http://setiathome.berkeley.edu or http://www.seti.cat to use 100%!

I have a very similar configuration; the only difference is graphics (and the hard drive, I have no SSD): no discrete graphics, only the integrated intel HD. When near-idling (writing text, code, surfing the web, etc). I have a power consumption of 9 - 11 watts, giving me a battery life with the stock battery of well above 3 hours. I didn't invest much time in power tuning; I use the ondemand governor (laptop-mode-tools is very handy for setting the governor).

However, I have found the intel GPU has a deep power-saving mode which was deactivated by default somewhere around 2.6.39 -> 3.0 due to issues on some systems which makes a difference of 2- 3 watts for me. You can activate it by adding

With a T420 I do this (http://bpaste.net/show/42623/) thinkfan config file currently test. At least the values in /sys/devices/system/cpu/cpu?/thermal_throttle/package_power_limit_count are all 0 so I'm with that config file I'm on the safe site IMHO.

A few days ago I updated the kernel to 3.4.9 and... it seemed to improve the battery life!
That was forcing the nVidia to Disabled in BIOS (completely disabled, not even trying to detect that 'optimus' automatic feature).

A few days later I wanted to give BOINC/Seti@home's CUDA a try so I activated again the nVidia through Bios, restarted and... found that I forgot to update the nVidia drivers after the kernel update. I did it, and then I was able to use CUDA (amazing computing power, considering that it's a laptop...)

After that small experiment, I assessed that leaving nVidia activated through Bios significantly warms up the laptop (and obviously reduces the battery time). So I deactivated it... but afterwards I was seeing some ~10-15% continuous CPU usage. That was some knotify4, some kworker I think, and things like that. Hmm. Dammit.
I checked that no nvidia module was loaded. I also removed the nvidia section/screen from my X config. I saw once the 'modprobe' process consuming some CPU (???). And... I finally tried removing the nvidia-drivers, and deleting the nvidia.ko module from the lib folder. And it seems to work! The CPU usage is negligible again, and (I'll check tomorrow) the battery seems to last as before - about 2h or so with a normal usage.

For some reason it seems that the... kernel? tries to use the nvidia module even without having the nVidia card activated through Bios, so if you really want the best battery simply remove everything.

I don't have a T420 - I have a W510, quite a different beast, but many of the same problems. I also have friends around here with other Thinkpads and have seen them have problems like this.

* There have been some reports that its better for power to use "ondemand" instead of "powersave" for the governor. The concept is called "race-to-idle", and that you're better off running as fast as possible until everything is done, then go into the deeper idle states to save more power.

* From what I've read, the best OSS video drivers are for Intel - AFAIK the only company with a significant presence in OSS video driver development.

* From what I've heard, the OSS video drivers aren't that hot (or more precisely, cool) with the power issue - except for Intel. If you need to use nVidia or ATI video and want the best possible power, you're probably better off with the proprietary drivers. That said, I'm using Nouveau, though my W510 spends most of its time in its port replicator.

* XOrg really can't use the switchable video like Windows can - yet. They're getting there - a whole bunch of infrastructure needs to be built, and that work is getting done. At some point in the future you will be able to get the low power of the Intel graphics when graphical demands are light, then have the nVidia hardware kick in when the going gets tough. That may well come some time in the next year.

* With current XOrg, the dual video can be problematic. You're probably best off going whole-hog with one video or the other. Either disable nVidia in BIOS, or fully install nVidia support. Doing the job halfway results in a slow, crash-prone system._________________.sigs waste space and bandwidth