Battery life decreased after upgrade to 11.04 [duplicate]

Last year I purchased a Dell Inspiron 5315 laptop shipping with Windows 7 preinstalled. I installed Ubuntu 10.10 alongside it with dual-booting. On upgrading to Ubuntu 11.10, I was upset to find I now get less than one hour of battery life! Windows 7 gives me 2.5 hours of running time.

Is there any possible explanation why my battery is running out faster with Ubuntu? Can anybody tell me better power options?


It's claimed that Windows 7 provides better battery life than Ubuntu, I haven't compared it on my laptops though. That said there are many approaches to increase it. Here are those I've found the most effective:

  1. Install package laptop-mode-tools. It switches your laptop to a "laptop mode" whenever it's on the battery, hard disks are spun down, power saving mode is turned on for peripherals/devices etc.
  2. Use task manager to find the most intensive processes and disable them (check PowerTOP as well). Also disable boot services you don't need (apt-get install bum) and services started by your graphical window manager.
  3. Check that your CPU frequency is scaled down dynamically (cat /proc/cpuinfo).
  4. Reduce screen brightness (display consumes the most power).
  5. Some random tips might help, i.e. see this answer.

There is a reasonably well known kernel issue with power management on PCI Express systems.

Try editing your boot-up grub entry to include pcie_aspm=force to the kernel parameters, and seeing if that improves your power consumption.


For 13.04

There are quite a lot of myths about battery life. Essentially, what kills batteries on the long run is heat. What kills them on the short run are unnecessary services and processes. Windows is fairly good at limiting power use because a lot of collaboration with hardware vendors has gone into optimizing hardware power limitations.

You want to try and make sure your computer heats as little as possible when working on battery. On Ubuntu 13.04 you can use TLP. It has the following functions (non exhaustive list):

  • Kernel laptop mode and dirty buffer timeouts;
  • Processor frequency scaling including "turbo boost" / "turbo core";
  • Power aware process scheduler for multi-core/hyper-threading;
  • Hard disk advanced power management level and spin down timeout (per disk);
  • SATA aggressive link power management (ALPM);
  • PCI Express active state power management (PCIe ASPM) – Linux 2.6.35 and above;
  • Runtime power management for PCI(e) bus devices – Linux 2.6.35 and above;
  • Radeon KMS power management – Linux 2.6.35 and above, not fglrx;
  • Wifi power saving mode – depending on kernel/driver;
  • Power off optical drive in drive bay (on battery).

There is a full answer here explaining in great detail how to use and configure it. The answer here might also help you to make sure your (possibly tweaked) settings apply whenever you boot on battery.

As for the difference between windows and ubuntu, there are a few questions you should ask yourself:

  • Do you have a power management tool installed? Something like TLP? Also did you configure it well? [Side note: a power management tool can also make sure you use all your horse power when needed. I have noticed considerable differences.]
  • Are you running the same things on Windows and on Ubuntu? Is everything you run necessary (do you have an apache server running for a joomla or wordpress tutorial you once tried)? Sometimes people have a full development stack in Ubuntu and just some office apps in Windows.
  • Are the measurements the same? Did you check whether Windows and Ubuntu actually gave you the promised time?
  • How many processors do you use? Also when you boot?
  • Are you using your GPU? This can make an enormous difference! If you have a Nvidia card with Optimus technology (essentially, this is a power saving option which your Windows machine will support out of the box) you should use bumblebee. By the way, its developpers are great people that help you on the spot in IRC.
  • Are you using the same settings for the brightness of your screen?

The advantage of Ubuntu over and against Windows is that you could also choose another desktop manager (Unity is quite CPU intensive). Better configuration (even with unity) can allow you to double your battery life. Mileage may (and will) vary.