How to enable Laptop mode on Ubuntu and extend your battery life?

Its a very common issue among people who use linux on their laptop. The linux kernels are supposedly resource intensive and take lot of hard disk spins which actually drains the laptop battery at a faster rate than it should take. After a little googling I found out that the linux kernel has a laptop mode that can be enabled. Laptop mode was discouraged since Edgy 6.10 due to heard reasons of hangups found in few laptops. This mode can still be enabled by installing a package called laptop-mode-tools.

How to install laptop-mode-tools?


Step 1: You should first make sure your current version of kernel is compatible with laptop-mode-tools. Any version starting from 2.6.6 will be compatible.

Step 2: Install the package laptop-mode-tools by executing the following instruction in Terminal
sudo apt-get install laptop-mode-tools

Step 3: The installation creates a configuration file at location /etc/laptop-mode/laptop-mode.conf

Step 4: Configure this file by executing
gksudo gedit /etc/laptop-mode/laptop-mode.conf

The Configuration file laptop-mode.conf is pretty much self described with lot of comments. You get to configure options such as ENABLE_LAPTOP_MODE_ON_AC, ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED etc. For more details on configuring other parameters of this file, you can refer the man pages by executing the following instruction in your terminal -
man laptop-mode.conf

Or just check out the online man page here.