How can I optimize Ubuntu for minimal energy usage? I use my laptop for development, but also for writing. I have a 9 hour flight coming up and a 6 hour battery life when already using
- limited screen brightness
- no usb devices
- no networking
- bumblebee installed and the nvidia card switched off
- TLP set on powersave
How can I now increase my battery life knowing that I only want to write (using LibreOffice)? I essentially want a very minimal system for a sort of 'writing mode.'
- Should I limit my quadcore to one core?
Should I disable some services? Here is the list of
service --status-all
[ + ] acpid [ + ] anacron [ + ] apache2 [ - ] apparmor [ ? ] apport [ + ] atd [ + ] avahi-daemon [ ? ] binfmt-support [ + ] bluetooth [ - ] brltty [ + ] bumblebeed [ + ] console-font [ + ] console-setup [ + ] cron [ + ] cups [ + ] cups-browsed [ - ] dbus [ ? ] dns-clean [ - ] elasticsearch [ - ] fancontrol [ + ] friendly-recovery [ - ] grub-common [ ? ] irqbalance [ - ] kerneloops [ ? ] killprocs [ + ] kmod [ ? ] lightdm [ - ] lighttpd [ - ] lm-sensors [ ? ] mysql [ ? ] networking [ + ] nmbd [ ? ] ondemand [ - ] openvpn [ + ] postgresql [ ? ] pppd-dns [ + ] prey-trigger [ - ] procps [ - ] pulseaudio [ ? ] rc.local [ + ] resolvconf [ + ] rfkill-restore [ + ] rfkill-store [ - ] rsync [ + ] rsyslog [ + ] samba [ + ] saned [ - ] selfcontrol [ ? ] sendsigs [ + ] setvtrgb [ - ] smartmontools [ + ] smbd [ ? ] speech-dispatcher [ - ] sudo [ - ] timidity [ ? ] tlp [ - ] udev [ ? ] umountfs [ ? ] umountnfs.sh [ ? ] umountroot [ - ] unattended-upgrades [ - ] urandom [ + ] winbind [ - ] x11-common
- Should install a more lightweight desktop environment? Can I do this in a nice and clean way (after all I have my laptop nicely set up and do not want to have to reinstall before 14.04).
- Should I do something else?
One last thing: I would like to activate or deactivate all these options with one script (which I will run only when working on battery). Please be as kind as to include suggestions on how to do what you suggest.
PS: the info in some of the possible duplicates is dated for 13.10.
you can use a tool named as
pm-powersave
. It will turn your Ubuntu into low power mode.usage:
pm-powersave true
will start power save mode.pm-powersave false
will stop the power save mode.Fore more information
manpage for the
http://manpages.ubuntu.com/manpages/saucy/man8/pm-powersave.8.html
commandOne of the biggest uses of power is the hard drive. If you're just using the computer for it's word processing capabilities, you might be able to go for significant periods of time without reading or writing to the hard disk.
You can set the cpu governor of all your cpu cores to "powersave". That's the lowest cpu clock, and uses the least power.
To see which governor is currently active type:
Default value is "ondemand".
EDIT:
When you boot you can set the number of max cpus in the grub entry by pressing e to edit the entry and add:
After changing the entry press F10 to boot.
BUT, you can limit your cpu cores, but that does not mean that you use less power consumption, than before. Note, that when the system is able to efficiently use multiple cpus, it needs for the same task less time and produces less heat, so you have to test it for your purposes. For more info cf. the kernel parameters.
powertop
provides a (not particularly accurate) estimate of the power usage of individual pieces of hardware and running processes.Shutting down some unneeded services relating to eg, networking/bluetooth, or useless user-space processes (eg Dropbox/Ubuntu One when you have no network connection) might make a small difference. Anything running a timed loop will cause the processor to wake up from sleep and use a little extra power.
How about 0 GUI's. Pure text-based environment, no Xserver running in background etc...
I would disable/stop apache, samba, ntp, pulse,
insert your network/audio related service here
services.Do you need them? -> yes
No.
Do you need them? -> no
Yes.
Thousands! You can run off a USB/SSD and forget about the HDD spinning out of control. Put the CPU's in powersave mode. Disable all radio interfaces. Use powertop and set to true all power_saving mechanisms. Get an extra battery. Ad absurdium.
Related of the same author:
The screen is by far the biggest user of power, just push the brightness down to 0 and turn off bluetooth and wireless lan if you have a cable connection; that makes THE biggest difference and I'm not sure disabling services and tweaking caching will improve much over that