186

This question is present as a matter of historical interest. While you are encouraged to help maintain its answers, please understand that "big list" questions are not generally allowed on Ask Ubuntu and will be closed per the FAQ.

Is it possible to greatly extend the usage time of a laptop or notebook running on battery by disabling various services and installing various packages?

What tricks or tips do people have for getting an extra hour or two out of their batteries?

0

24 Answers 24

85

Use powertop to see which programs are doing unneeded background processing such as beagle/tracker, weather notifications, gnome-do, and (if you don't need the internet) network-manager, mail-notifications.

Run sudo powertop --auto-tune to set all tunable options to their GOOD settings.

9
  • 39
    A tip about powertop. If you are using an external usb mouse and powertop ask about autosuspending usb, don't do it. You mouse will be suspended and it will drive you crazy. At least it did it to me. Aug 6, 2010 at 13:47
  • 1
    @javier sadly, I read this too late and am having the exact same problem. Tried changing power/autosuspend to both 0 and -1 but without effect (have not tried rebooting yet). How did you solve this problem? Jan 26, 2011 at 19:00
  • 7
    Great app but how can I make the changes more permanent rather than have to do the same everytime I log in? Aug 4, 2011 at 13:49
  • 1
    I find this hardly useful if I have to apply the settings every time I reboot. How can I apply custom settings in powertop automatically?
    – user24668
    May 11, 2012 at 5:50
  • 2
    @andybleaden makeuseof.com/tag/… this post tells how to do this permanently. You might consider adding this information to your answer Niall.
    – sage88
    Apr 3, 2015 at 15:39
32

Install the package laptop-mode-tools.

This package is not necessary on newer versions of Ubuntu:

4
  • 1
    A kernel feature that saves power by spinning down the HDD for longer periods, and also managing daemons depending on power mode, auto hibernation and adjusting terminal and X11 blanking.
    – invert
    Aug 6, 2010 at 10:48
  • Does GNOME already use the kernel's laptop mode without installing this? Aug 6, 2010 at 18:10
  • 14
    Are these tools moot when using a SSD? Will they affect performance negatively? Aug 13, 2010 at 15:34
  • 1
    @DmitriyLikhten I think yes. Because, according to the description "it also supports various other power management features, such as starting and stopping daemons depending on power mode, automatically hibernating if battery levels are too low, and adjusting terminal blanking and X11 screen blanking."
    – user24668
    May 11, 2012 at 5:47
26

I've been able to more than double the battery life of my netbook by turning off a bunch of services I don't need, and unloading their kernel drivers.

Use service --status-all to see what's running on your system, and service <service-name> stop to shut it down.

Use lsmod to see what kernel modules are loaded, and rmmod <module> to unload it.

If/when you want to bring things back, easiest way is to simply reboot.

Sometimes you also need to kill daemons or programs that are using the service or driver before they can be turned off. Look at output from ps aux to see what's running, and kill -9 <pid> to terminate them.

Services I usually turn off include: Ubuntu One, ssh, apache, databases, avahi, pulseaudio, cups, apparmor, acpi-daemon, bluetooth. Modules I unload: The whole audio stack, usb_storage, webcam drivers, wireless, bluetooth. (Some services like audio don't die easily.)

I've even gone as far as shutting down x (service gdm stop) and working entirely just from consoles, which let me stretch my netbook battery life to nearly 8 hours.

25

Here are a few ideas:

  • Turn off WiFi and Bluetooth
  • Reduce screen brightness
  • Reduce desktop effects (System->Preferences->Appearance->Visual Effects->None)
  • Use Hibernate rather than suspend power features (System->Preferences->Power Management->On Battery Power)
5
  • Oops! I see that Marco Ceppi posted a similar comment just as I was submitting my own! Sorry about the duplication. Jul 29, 2010 at 16:31
  • No worries - you've touched a few settings I didn't! Jul 29, 2010 at 16:32
  • 7
    Enabling or disabling desktop effects generally has no impact on battery consumption (again, see codon.org.uk/~mjg59/power/good_practices.html ). In empirical tests, power consumption of Compiz vs Metacity was the same, within the limits of measurement accuracy (0.1W).
    – RAOF
    Oct 11, 2010 at 9:40
  • 2
    this is the worst solution, with win77 64bit also win8 64, i can get with turned on wifi bluetooth half screen birghtness, about 3 hours of surfing on internet, listening song on youtube in Hd, browsing facebook, doing some other stuff. When i do it on ubuntu or elementaryos or any other linux distro regardless of DE and its effects. i cant get more than 2 hours. Jul 2, 2014 at 5:09
  • Does reducing screen resolution help?
    – Orion
    Aug 24, 2016 at 18:53
13

Apart from using Jupiter, I was using TLP and it helped a little. Plus, it is my advice to not use Wubi as it sometimes drains battery faster than the standard install.

Also, keeping your drivers updates and installing most stable proprietary drivers helps.

Anyway, to install TLP use this:

sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp tlp-rdw
sudo tlp start
1
10

As I tell with all my clients with laptops - if you have a laptop make sure you are properly discharging and recharging your battery. This greatly extends the life of your battery.

Ubuntu has some great power saving options (System > Preferences > Power Management) Which will allow you to setup functions to help save your batteries life while away from A/C

Other things to take into consideration - if you're not using Bluetooth or Networking turn off those services (some Vendors even include hardware buttons for this) Dimming your Laptop Display is also a good way to conserve battery power. Lastly straying away (when possible) from CPU/GPU intensive operations will help to conserve battery power.

EDIT:

Usually it is said that Lithium ion battery has no memory effect. I read that a lot of times in several different places and chose to believe in it and charge my notebook battery randomly. Don't know if that is the reason, but in two years I ended up with a lousy battery (doesn't last more then 10/20 minutes). On the other side, for my smartphone I almost only recharge when the battery is around 5%, and after two years I almost can't notice any difference in the battery state. I would say it is good luck with the phone, but then I stumble across this article. It is a Nature publication and though I haven't read it all, it says that lithium ion battery do present a memory effect. So be aware that it is relevant to spare your battery of unnecessary charge cicles.

4
  • 2
    What do you mean by properly discharging and recharging? Different kinds of batteries require different things, but the most common kind, Lithium ion, require nothing more than running it on battery for a while at least once a month. Aug 6, 2010 at 18:12
  • 1
    Well as you mentioned each battery is different. So Lithium Ion's they usually recommend discharging the battery all the way to 0 once a month. As an example Aug 6, 2010 at 18:25
  • 4
    I think you may be confusing battery types here. What you said is true, I think, for nickel-cadmium batteries, not for lithium-ion ones. You should research the topic and (if necessary) edit your answer. Oct 29, 2010 at 4:53
  • 1
    My two last laptops, both Dell, have a UEFI/BIOS feature that optimizes the use for always on AC (as I do always keep them plugged in). Normally, having the laptop always plugged in charges and discharges the battery too often, killing it fast. But with this setting, battery is just never used when charged and in AC, so it never discharges, so it has a much lower battery wear than other laptops. YMMV.
    – Nicolay77
    Apr 3, 2020 at 20:43
8

In addition to dimming the display, turning off bluetooth, etc. I sometimes use the CPU Frequency Scaling Monitor to limit the power my processor cores use. You can add it to a panel by right-clicking on a panel, selecting Add to Panel, and finding it in the list.

1
5

You can use the terminal app called powertop to find out what is making the cpu "wake up". simply install by doing sudo apt-get install powertop and then run by doing sudo powertop

2
  • I did try powertop but the moment I run "sudo powertop" My screen becomets unresponsive. Oct 28, 2010 at 10:19
  • It sounds like you might have some problems with the acpi module that the kernel controls, but i'm not sure what and why. Oct 28, 2010 at 13:42
3

Ubuntu provides simple power management under System -> Preferences -> Power Management. From there, you can configure what happens when running on battery versus on AC power, including screen brightness and sleep/hibernate modes. Tweaking these settings can give you improved battery life without having to install or configure any extra packages.

Kubuntu has similar options in System Settings -> Advanced -> Power Management.

3

To access power settings click on the battery icon in the status indicator and you can change power preferences.

There's also other tools like the gnome cpu-throttler applet if your cpu supports dynamic scaling. power-top can give you an insight into what the most power-hungry applications/services are...

i've also heard rumors, though seen no evidence myself, that the opensource graphics drivers for nvidia/ati do not support power-saving mode, which would lead to lower battery life. in this case, it might make sense (though i generally wouldn't recommend it) to use the proprietary graphics drivers for your system, as they may have better power-saving.

3

The Ubuntu Kernel team has written some notes on how to save power here: https://wiki.ubuntu.com/Kernel/PowerManagement/PowerSavingTweaks

Also, there are notes on how to identify applications and services that may be sucking power here: https://wiki.ubuntu.com/Kernel/PowerManagement/IdentifyingIssues

3

It might be a bit late, but I've just found this out myself. Just search for quiet splash in /boot/grub/grub.cfg and add pcie_aspm=force behind it. It lifted my battery life from 45 minutes to 1 and a half hour! :D

Be warned

On some systems (including my own), the pcie_aspm=force parameter kills the battery in the long run, to the point of it becoming practically useless (10 minutes on a full charge).

4
  • Be aware that pcie_aspm=force can cause some systems to lockup and become unresponsive. Not all hardware supports aspm. Ref: docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/…
    – dumbledore
    Sep 4, 2011 at 2:17
  • See the brilliant phoronix article for info on this : phoronix.com/…
    – belacqua
    Sep 4, 2011 at 4:19
  • From that file: DO NOT EDIT THIS FILE It is automatically generated by grub-mkconfig using templates from /etc/grub.d and settings from /etc/default/grub. If it is about 11.04 ;)
    – Rinzwind
    Sep 4, 2011 at 7:02
  • 1
    Or you could indeed do it in /etc/default/grub and run update-grub xD Wich indeed may be a better idea xD GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=force"
    – RobinJ
    Sep 4, 2011 at 9:01
2

If you are using an ATI graphics card change to the FLGRX driver. It runs a lot cooler with this driver and so uses a lot less power. There is a bug for this on launchpad.

2

Turn down brightness and shut of wireless , leave screen saver as blank and lower the time when display shuts off on idle.

2

You can install bumblebee if you have an Optimus technology laptop with a nVidia GPU. It will extend your battery life to very good extent. To install it go to https://wiki.ubuntu.com/Bumblebee

It extended my battery life from 2.00 hours to 4.30 hours.

0
1

You could do something like this to limit cpu-speed

sudo -i
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

The applet constantly reads stats, not much but is still uses power ;) i often do this in the summer not because I'm away from the plug, but for not overheating my computer.

1

I have 2 hard drives - an SSD which stores / and a larger spindle for storage.

I set hdparm to spin down the storage drive after 10 minutes of inactivity. In /etc/hdparm.conf put e.g.:

/dev/sdb {
    spindown_time = 60
}

This works well because I mostly keep music & movies on the storage drive so when I'm in hardcore work mode I don't access it at all.

As well as saving power, this makes the laptop noticeably cooler and often the fan will turn off completely if I'm not doing anything too strenuous, giving completely silent running!

1

Are you running through wubi? I find that this makes Ubuntu run slower, lag more, and cause faster battery drains. I solved this by keeping my screen dimmest as possible, allowing it to dim to save power, keeping wifi switched off often and closing background programs.

0

You can also use (for example from the Gnome menu-bar) the CPU widget, that offers scheduling options depending on your CPU.

0

Here is some simple tips I use to save my battery :

  1. Install TLP :

    sudo add-apt-repository ppa:linrunner/tlp
    sudo apt-get update
    sudo apt-get install tlp tlp-rdw
    sudo tlp start
    
  2. Disable Bluetooth at startup

    Using TLP

    sudo nano /etc/default/tlp
    

    Uncomment the following line :

    DEVICES_TO_DISABLE_ON_STARTUP=“bluetooth”
    

    Using Rc.local

    sudo nano /etc/rc.local
    

    Add the following before the line with exit 0 :

    rfkill block bluetooth
    
  3. Disable keyboard brightness

  4. Reduce screen brightness

  5. Disable networking when not using it (watching movie etc...)

0

For laptops with two or more graphics cards, using the integrated one can save significant amounts of power.

For NVIDIA cards, going to PRIME Profiles and switching to Intel (Power Saving Mode) in nvidia-settings cut my power consumption in half and doubled my battery life.

0

A lighter desktop environment will use less power. Take a look at Ubuntu-supported "flavors" https://ubuntu.com/download/flavours and consider using a non-GNOME DE.

-2

if you want save battery life. click on the battery icon on the task bar then press power saver. really works. if ur gonna go somewhere your not going to use your internet switch if wifi and your internet connection. lower the screen brightness. mute the volume if your not gonna use volume . lower it or just mute it. don't put your laptop on something that's like a blanket bed dirty desk, etc. because these things can heat your laptop and make the fan work more so that will reduce battery energy too. hope this works!!! :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .