Quick disclaimer, Linux tends to use more power then windows because it does "more stuff" and uses the hardware different. You may not be able to get the same amount of time in Linux as you did in windows, or you may get more.
These are listed in the order of importance to me. That is the easiest to do with the most gain first.
CPU Frequency
The largest impact on my battery is CPU frequency. When I am plugged in I want full speed, but when I unplug I want as much battery as I can muster. This is mostly automatic, these days, however to give it a bit of a hand, and to let me see it, I installed jupiter. This auto does stuff when on battery and when on power. It also gives me some direct control over some power management features.
Display Brightness
Just turn it down as far as you can. This made a large difference to me. If you want to do this via a script then echo -n 100 > /proc/acpi/video/VGA/LCD/brightness
should would with a little adjustment. The path will likely be different depending on build/kernel/hardware.
Keyboard backlight
On My Mac Book Pro, this has only a little gain, but turning off the keyboard backlight is super easy.
Idle Time and Screen Blanking
Turn them way down. From "Power" in unity, set suspend when inactive to 5 minutes, and when the lid is closed suspend. There is a link in the Tip at the bottom of the window. Click it and make sure that Dim Screen to save power is checked. Turn screen off after 2 Minutes.
Turn Off Bluetooth
Again an easy one that doesn't save a lot. From Jupiter indicator, disable Bluetooth when on battery.
noatime
Edit /etc/fstab and add noatime to all local partitions and mount points. This "should" prevent your drive from spinning up as frequently. Read up on it first. This doesn't give the benefit it once did, but it keeps my drive from spooling.
Do less stuff
This one is kinda tricky, but can give you a ton of savings. Basically Linux does a ton of stuff in the background. This is one of the best things about it. However it can also lead to higher then needed power usage. The easiest thing to do here is disable cron on battery but turn it back on when on power. This can be dangerous if you don't know what you doing. Basically it shouldn't hurt anything if you miss a few cron jobs, but leaving it off all the time will cause problems.
Also take a look at/keep an eye on htop. Reconsider the apps that are using a large amount of CPU.
Nvidia
I have no idea if this actually does anything so I put it last. Turn nvidia's (if you have it) powersaving on high. nvidia-settings -a [gpu:0]/GPUPowerMizerMode=0
should accomplish that. Side rant, compiz keeps my card from going below the max an awful lot. They need to fix that.
Closing
These should help you get a reasonable level of battery performance from your ubuntu laptop.
I have almost the same machine (730U3E-S02PL, some slight differences in spec), so I can share my experiences with you. Hopefully it will help you to fix the problems with energy drain.
The main reason for the unnaturally high power consumption is that your discrete graphic card (Radeon) is constantly on. To switch it off, you will have to install the official AMD drivers from:
http://support.amd.com/en-us/download/desktop?os=Linux+x86#amd-catalyst-packages
You can try using beta drivers, but I have found them unstable, so I do not recommend them. Unpack the downloaded file and run amd-driver-installer-XXXXXX.run
(with root privileges).
After having installed the drivers, reboot your machine. Run the Catalyst Control Center:
sudo amdcccle
and under the "Graphics switching" or whatever (I've got it in Polish...), choose your Intel card. You will have to reboot your computer again. If you see a window informing you that your computer is running in low graphics mode, do not worry. Click cancel
and reboot it again. If unity does not start - power your computer off (by pressing and holding the power button for a few secs) and then on again.
Performing these steps alone improved my battery life from like 2 hours to 4+. It also helps with the fan spinning constantly at high speed.
Next thing you can do is to enable intel_pstate (a new power scaling driver used for modern Intel CPUs):
gksu gedit /etc/default/grub
change the line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_pstate=enable"
Save the file, and run these commands:
sudo update-grub
sudo reboot
Install TLP (tool for setting and managing your power-saving options):
sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp tlp-rdw
Install thermald (a tool developed by Intel's Open Source Technology Center which monitors and controls the CPU temperature, preventing it from overheating):
sudo apt-get install thermald
To be able to switch the CPU scaling driver easily, you can use the cpufreq indicator. Install it by using this command:
sudo apt-get install indicator-cpufreq
You can find more details here:
- http://www.webupd8.org/2014/04/prevent-your-laptop-from-overheating.html
- http://linrunner.de/en/tlp/docs/tlp-configuration.html
Best Answer
A lot of effort was put into the Precise 12.04 LTS release to address a lot of the major power sucking issues that we had identified, such as the Intel i915 rc6 GPU power saving, PCIe ASPM, processes that caused too many wakeup events and also to reduce disk I/O (for example daemons writing to the disk too frequently).
There is a Wiki page devoted to this work: https://wiki.ubuntu.com/Kernel/PowerManagement
The newer Quantal 12.10 release will be using the newer 3.5 (or even possibly 3.6) kernel will mean we pick up a lot of upstream power management savings, for example in the recent ACPI driver.
Unfortunately, trying to make Ubuntu as efficient as closed proprietary hardware is difficult without full disclosure of how the hardware works and is configured. For example, powering down some devices may require special knowledge of the underlying physical components.
Power saving is a non-trivial issue, and sometimes bugs in the firmware (BIOS) can lead to sub-optimal configurations, or maybe drivers are based on binary blobs which we have little or no control over.
As for on-going work, there is a project page where bugs can be filed against mis-behaving applications that allow us to focus on fixing power sucking issues:
https://bugs.launchpad.net/ubuntu-power-consumption
I also have some blog articles on this work:
http://smackerelofopinion.blogspot.co.uk/search/label/power
Hope this helps.