How do I improve the battery life of my Inspiron 14z under Ubuntu 12.04?

This laptop gets 4-5 hours of battery life using Windows (e.g. here). I've removed Windows, installed Ubuntu 12.04 and the initial battery life was only 2 hours. With some tweaks (described below) it's still only ~2.5 hours.

For reference, the laptop is the latest model of the 14z:

  • i5-3337U processor
  • 32GB MSATA, 500GB HDD (5400rpm)
  • AMD Radeon HD7570M graphics card

I have put ext4 partitions on both the SSD and the HDD, and have mounted / to the SSD and /home to the HDD. I also put a 24gb linux swap partition at the start of the HDD, though I figure this won't be used all that much (the laptop has 8gb of RAM).

After googling around and reading Ask Ubuntu and other sites extensively, I have done the following steps, and they have improved the battery life ~30 minutes (exact improvement not clear, but battery life is still nowhere near 4-5 hours).

  1. Installed Jupiter (and set Performance to "Power Saving")
  2. Installed laptop-mode-tools
    • cat /proc/sys/vm/laptop_mode now outputs 5 (previously it output 0)
    • But it's not clear that this will help: AskUbuntu question
  3. Turned down the brightness of my screen from full to 1/3

Other things I have heard about but have not tried for fear of frying the laptop or my linux install:

  • Add "pcie_aspm=force" at the end of the line with "quiet splash" in /boot/grub/grub.cfg
  • Enable ALPM, but it may already be enabled in 12.04?
  • Enable i915 framebuffer compression
  • Use a propietary driver for the graphics card? Turn off the graphics card? (what would happen if I relied on the internal Intel bridge?)
  • Use TLP?
  • Spin down the HDD more aggressively (howto, but I think laptop-mode-tools does this already)

The only other thing I've noticed is that plastic just above the F5, F6 and F7 keys gets really hot. According to Jupiter my CPU temperature is only 69 celsius and the System Monitor shows CPU load at 7% so I don't think it's the CPU. Maybe it's the graphics card?

Also, I've set up MongoDB and LAMP on the machine as well. When I run powertop MongoDB is high in the list, but I'm not sure if that's relevant to battery life because I'm not actually doing anything with MongoDB most of the time.

Edit: Additional info requested by @gertvdijk

$ lspci -nnk | grep -iEA3 "(graphics|vga)"
00:02.0 VGA compatible controller [0300]: Intel Corporation Ivy Bridge Graphics Controller [8086:0166] (rev 09)
    Subsystem: Dell Device [1028:057f]
    Kernel driver in use: i915
    Kernel modules: i915
02:00.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI Thames [Radeon 7500M/7600M Series] [1002:6841]
    Subsystem: Dell Device [1028:057f]
    Kernel driver in use: radeon
    Kernel modules: radeon

Based on @maggotbrain's answer to the question linked to (here), and because I downloaded and ran Ubuntu 12.04.2 so I think I already have the Quantal enablement stack running. I think uname confirms this too?

$ uname --all
Linux christo-lt4 3.5.0-23-generic #35~precise1-Ubuntu SMP Fri Jan 25 17:13:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Edit: AMD drivers

I initially tried the propietary FGLRX drivers with post-release updates. There does not appear to be a bios level option to turn off the AMD graphics card.

After installing and rebooting, my display looked the same (except Unity launcher icons went back to full size), but I could not run Catalyst. Instead, it exited with the error:

No AMD graphics driver is installed, or the AMD driver is not functioning properly. Please install the AMD driver appropriate for your AMD hardware, or configure using aticonfig.

Next, I ran sudo amdconfig --status=all --initial but I could only load low-resolution graphics. This was also the case with sudo amdconfig --initial, so I manually restored my backed up xorg.conf, removed this driver using the "Additional Drivers" application and installed the "Experimental AMD binary Xorg driver and kernel module".

After rebooting my computer I see that this entry in the list has changed to be "ATI Fire GL" (my laptop has an AMD Radeon HD7570M, not an ATI card?), but it also says that the driver is activated but not currently in use. What should I do to get the propietary drivers working on my laptop?

I have also tried the "experimental behaviour" FGLRX drivers, but the low-detail error still returns. The only way I've found of fixing this is restoring the original xorg.conf

Recap of solution - battery life up from 1.5-2 hours to 3.5-4 hours or more

I can't post many links because my reputation on this stack exchange is too low, I'll use titles of questions wherever possible so people can find them using Google

Many thanks to @gertvdijk for his help with this problem and pointers to other solutions (is there some way I can mark something correct and give you reputation points to say "thank you"?). I now have my laptop battery life up to ~3.5-4 hours and there may be some further steps I can take as well. To summarise my solution to date, in rough order of impact:

  1. Installed propietary drivers using the 12.04 solution in the Ask Ubuntu question ("What is the correct way to install ATI catalyst video drivers (fglrx)"), then used Catalyst application to switch off the AMD
  2. Jupiter applet - turned brightness down from 100% to 25%, set performance to Power Saving
  3. Wrote a script to make it easy to turn on/off services that might be battery intensive - here
  4. Turned off bluetooth (I need to leave wifi on)
  5. Installed laptop-mode-tools - cat /proc/sys/vm/laptop_mode output 0 beforehand and 5 after, so this got turned on, but I don't know if it had any effect (See Ask Ubuntu question: "Is laptop-mode-tools still relevant for 12.04 and the 3.x kernels")

Potential other steps I could take, but haven't yet:

  1. Spin the hard disk drive down more aggressively (laptop-mode-tools/Ubuntu 12.04 defaults might do this automatically) (see scottl's answer to "Tips to extend battery life for laptops and notebooks")
  2. See item 3 of ishouvik.com's "5 ways to extend battery life on Ubuntu" - this is meant to happen automatically in 12.04 but isn't in my /boot/grub/grub.cfg right now so it might not be turned on
  3. Other power management tweaks - see Ubuntu wiki page on Power Saving Tweaks
    • Enable ALMP (but it may already be enabled? - see Ubuntu wiki page on Kernel power management using ALPM
    • Enable i915 framebuffer compression
  • Welcome to Ask Ubuntu! Do you have hybrid graphics? Please provide the output of lspci -nnk | grep -iEA3 "(graphics|vga)" run in a terminal. If you see two cards, do you have an option to disable the AMD discrete graphics card in your system BIOS? Include all this new information in your question by editing it. See also How do I get AMD/Intel Hybrid Graphics drivers to work?. Also consider using the Quantal hardware enablement stack as your hardware is a lot newer than 12.04 is.
    – gertvdijk
    Commented Jun 23, 2013 at 19:28
  • So this is a hybrid graphics machine. Configuring that properly will probably have significant results. See How do I get AMD/Intel Hybrid Graphics drivers to work?. (Not the best answers in there, but it's the "master" question here.) Disabling the AMD card in the BIOS will also probably help a lot.
    – gertvdijk
    Commented Jun 24, 2013 at 22:51

1 Answer 1

  1. Open the Software Sources application.
  2. Go to the Additional Drivers tab.
  3. Choose the closed source driver for your graphics card.
  4. Click the button to apply them.
  5. Reboot.

This should increase battery life.

  • This method did not work - ultimately I have been able to install the graphics drivers in a working fashion using the 12.04 instructions here. My fglrxinfo output now is (with three pipes used to indicate line breaks): $ fglrxinfo ||| display: :0 screen: 0 ||| OpenGL vendor string: Advanced Micro Devices, Inc. ||| OpenGL renderer string: AMD Radeon HD 7500M/7600M Series ||| OpenGL version string: 4.2.12217 Compatibility Profile Context 12.104
    – cfogelberg
    Commented Jun 25, 2013 at 22:15
  • Install TLP via PPA from www.linrunner.de Commented Jun 26, 2013 at 0:38

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