Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Increasing battery life in linux (pranavk.github.com)
50 points by pranavk on Nov 12, 2012 | hide | past | favorite | 34 comments


Within Ubuntu and other Debian derivatives you should do

    sudo aptitude install laptop-mode-tools
This basically does a lot of minor tweaks, like disabling finger print readers etc.


Slight correction for the lazy who just copy/paste commands.

    sudo apt-get install laptop-mode-tools

Thanks for the tip.


The original command, as written, works fine. Aptitude does have an interactive mode, but when run with arguments like that, will behave approximately the same as apt-get would. Aptitude acts as a frontend to several of the slightly-lower-level apt tools.


Aptitude is no longer pre-installed in current versions of Ubuntu (and Debian). Also, aptitude used to be recommended over apt-get because its handling of dependencies was superior and because it made it easier to find "orphan" packages. As I understand it, apt-get has since caught up with aptitude and is nowadays the preferred command-line tool.


More importantly, aptitude is known to be broken. Aptitude's resolver never caught up with Ubuntu's multiarch transition, and will erroneously conclude that many things are uninstallable (or attempt to "fix" things by uninstalling half the system)



I know Ubuntu has strongly preferred apt-get for a while. However, I thought Debian still recommended both tools and had aptitude installed by default.


It didn't work for this lazy copy/paste user. :) Ubuntu 11.10. Just posted what worked for me. No harm intended.


Recent versions of Ubuntu don't have aptitude installed out of the box, not sure if 12.10 brought it back


the title should be "Increasing battery life in linux with a nvidia GPU"

I got a Ivy Bridge Zenbook and i can get up to 7 hours battery life thie is even better like windows.

i use powertop to reach this.


This. Another misleading "generic title" for a case that just happens to be his laptop/setup.

i've a similar experience with my ivy bridge laptop. I also check with powertop whenever something looks odd, but by default, all the things were rather fine (i run Arch)


I agree, I must change the title soon.


Wouldn't using bumblebee do exactly what this article describes, but automatically and with the advantage of using the nvidia GPU for specific applications?

At least that's what I've been using for over a year now.


I used that but it failed for me for some reason or other. So i tried it, its also nice piece of code that worked nicely for me. Doubled the battery by more than 100%


Intel's PowerTOP helps track down power usage more generally: https://01.org/powertop/


Btw., does anyone knows if there is some similar tool for iOS? (Doesn't matter if I need root access...)


Isn't this only for laptops with dual GPU (optimus setup). In which case, I guess the only "other OS" is windows that is (was) the only one able to switch on the fly which graphics chip is to be used.


yup, right.


I'm running on a Fedora install with very customized front end here (basically ditched everything and built from scratch) which is very easy on the resources (about 330Mb of RAM usage after boot) and I'm getting between 2 and 3 hours of battery life. I've done nothing power management related though.

Windows on the other hand sucks the whole battery up in 2 hours tops. Still, I'd be very much interested in increasing my battery life. This is the only thing holding me back from doing serious coding outside.


This is the one thing which depends very much on the hardware you're running, but as the post notes, turning of the GPU can very helpful, and you won't notice the difference in most usage (which may even be everything you do).

I was able to do this in the BIOS, which is actually the easiest way to do it (if your computer supports it).

The other thing is scaling the fan down[1] - as long as you don't go overboard with it, it's perfectly safe, and a huge impact on battery life.

Finally, turn off your wireless card and/or Bluetooth if you're not using them. Many computers enable Bluetooth by default, but since most people don't use them, it's a needless battery suck.

[1] The other thing is scaling the fan down - this


Copy and pasted wrong - this is the link: https://wiki.archlinux.org/index.php/Fan_Speed_Control


I have a transformer infinity I unlocked, have an ssh client on, and have the keyboard dock. It even has a USB port I could plug in a more ergonomic keyboard if I wanted.

I get around ~12 hours battery life on it just doing networking / terminal stuff, and I can just work on files on my desktop and compile / test there.


I wonder why tablets like the Transformer has such a good battery life. Are x86 processors such power hogs?


Tegra 3 has a TDP between 5 and 20 watts depending on load. For comparison, a mobile Trinity APU has a TDP between 15 and 25 watts. So not really.

It is a more complicated set of issues. Battery size, motherboard buses that require power, a physical spinning disk vs flash memory (the latter takes much less juice) the physical screen size requiring refresh, the amount of memory (each channel is another voltage sink).

Mostly I'd say its because tablets use massive batteries for longeivty, and laptops forfeit battery size for other features.

Also, a benchmarked Tegra 3 gets soundly beat by that Trinity APU in intensive CPU tests. The clock speed on a Tegra 3 in my tablet is 1.7 ghz but that APU can run at 2, and has a more complex pipeline to boot.

Mostly it is because a desktop OS wastes a ton of resources. Windowing, composting, and just desktop apps in general are made wasteful because clocks and memory were not necessarily plentiful in laptop form factors, but weren't as precious as in tablets, so the modern web browser or media player needs to "un-learn" 5 years of bloat to work well on a tablet.


may i ask what ssh client application you are using?



There was a more general stackexchange question dealing with this. Actually, there are probably a few - but this is recent enough to warrant reading.

http://unix.stackexchange.com/questions/17858/how-can-i-impr...



There is no /proc/acpi/battery/ in my system. I do have acpi installed.


/proc/acpi is deprecated in favor of /sys. See here: http://cateee.net/lkddb/web-lkddb/ACPI_PROCFS_POWER.html


Do you have an NVIDIA GPU?


Yes, I have an Intel HD 3000 and Nvidia NVS 4200. I use bumblebee and bbswitch to handle dedicated GPU.


I guess that explains why the fan is permanently on in Linux on my XPS L502x.


Doesn't this absolutely freak out X11?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: