How do I enable laptop mode to improve Linux laptop battery life?

Posted on in Categories , , , , , last updated December 23, 2007

Q. I’m using Redhat enterprise Linux desktop / workstation operating system with HP laptop. Several Linux distributions have a / script to enable to disable Laptop mode but Redhat misses the script. How do I enable or disable laptop mode on fly?

A. Modern Linux kernel includes very good support for Laptop mode. It is use to control the IO subsystem. When laptop mode is enabled, the Linux will try to be smart about when to do disk I/O. It gives as much time as possible to be in a low power state. If mode is disabled if value is set to zero (0). To enable mode use non zero value such as 5.

Display or print current Laptop mode

Type the following command:
$ cat /proc/sys/vm/laptop_mode
Output:

0

Turn on or enable Laptop mode

Type the following command as the root user:
$ sudo echo 5 > /proc/sys/vm/laptop_mode
OR
# echo 5 > /proc/sys/vm/laptop_mode

A note about Ubuntu Linux

According to this page:

Ubuntu has a laptop-mode-tools package, which is installed by default on laptops. However, laptop mode is disabled by default in Ubuntu Edgy (6.10), because some people have been experiencing hangups with it on certain laptops (mostly Thinkpads). Until now, nobody has any clue what is happening here. To reenable laptop mode, edit /etc/default/acpi-support and set ENABLE_LAPTOP_MODE=true.

If you want to use the latest version of laptop mode tools, you can use the Debian packages, they are compatible enough to work out-of-the-box on Ubuntu.

A note about Suse Linux

=> Suse Linux comes with powersaved tool, so please ignore above commands for power saving.

Updated for accuracy.

How to install firefox-2.0.tar.gz in Linux

Posted on in Categories , , , , last updated June 17, 2008

Q. I have downloaded firefox file from mozilla web site to my Linux desktop system. The name of file is firefox-2.0.tar.gz. How do I install firefox-2.0.tar.gz in Fedora Core Linux? Please provide me step by step instructions for the same. What about my old bookmarks and add-ons. I am going to lose them?

A. Update: FireFox version 3.0 has been released and it is recommended that you install Firefox 3.0 under any Linux distribution.

Mozilla Firefox is a free, open source, cross-platform graphical web browser developed by the Mozilla Corporation and hundreds of volunteers. Installing Firefox 2 will overwrite your existing installation of Firefox. You won’t lose any of your bookmarks or browsing history, but some of your extensions and other add-ons might not work until updates for them are made available.

Installing firefox on Linux

Just use following instructions to download and install Firefox.

Download firefox to your Linux desktop

=> Visit this site to download firefox

Firefox 2.0 installation – Just untar file and install it

Let us say you would like to install firefox in your own home directory called /home/tom/firefox
$ mkdir /home/tom/firefox

Change directory:
$ cd /home/tom/firefox

Copy your files to /home/tom/firefox and untar it:

$ cp /home/tom/Desktop/firefox-2.0.0.11.tar.gz .
$ tar -zxvf firefox-2.0.0.11.tar.gz

And you are done. Start firefox:
$ /home/tom/firefox/firefox &

How do I install firefox for everyone?

Install Firefox in /opt directory. Login as root user:
# cd /opt
# mkdir firefox
# cd firefox
# cp /home/tom/Desktop/firefox-2.0.0.11.tar.gz .
# tar -zxvf firefox-2.0.0.11.tar.gz

To start firefox:
$ /opt/firefox/firefox &

You can also create a shortcut from your own desktop :)

What about my bookmarks and browsing history – Am I going to lose them?

You won’t lose any of your bookmarks or browsing history, but some of your extensions and other add-ons might not work until updates for them are made available.