Skip to content
Ritesh Raj Sarraf edited this page Jan 21, 2016 · 13 revisions

1. Things You Might Want To Know

Mailing list

There is a laptop-mode mailing list here, on which you are free to discuss anything related to laptop mode, laptop mode tools, and power saving in general. Mailing list archives are also available.

Spinning down too many times may kill hard drives

Desktop hard drives (Magnetic Rotational Drives) are usually rated for only 40,000-50,000 spinups, and one spinup every 10 minutes will kill your 40,000-spinup HD in 277 days. So this is NOT recommended for server use, unless you increase the spinup interval dramatically, to say once every hour or two. Laptop hard drives are usually rated for around 300,000 spinups, so those will last about 2083 days or 6 years if you have them powered on 24-7.

Note: With newer SSD Drives (Flash Storage/MTD), the above mentioned problem does not apply.

If my machine crashes or runs out of power, will I lose all my work?

If you have laptop mode enabled and your machine crashes, then you will lose up to MAX_LOST_WORK_SECONDS seconds of work. If you really need to have something written to disk, issue the "sync" command. If you have laptop mode enabled and your machine runs out of power, you will not lose as much work (provided you have an ACPI laptop, as most current PC laptops are) because laptop mode is automatically disabled when the battery almost runs out.

Linux Journal article

There's an article in the Linux Journal September 2004 issue. It can be found online at http://www.linuxjournal.com/article/7539. It's not really up-to-date anymore BTW. The most important conclusion from the article is that it doesn't really pay to increase the spun-down time over a minute. I often get mails in which people tell me that they want to go up to one hour or more without disk activity. This is nice for noise reduction purposes, but not for saving power.

FOSDEM 2006 presentation

I did a talk on power saving, Laptop Mode and the Laptop Mode Tools at FOSDEM 2006. A pdf version of the presentation can be downloaded here.

2. Relationship with Other Packages

What does all this have to do with Smart Spindown?

Nothing really. You use Smart Spindown if your hard drive can't spin down by itself, or if you're irritated by repeated spindown attempts while you're actually actively using the computer and don't want spindowns at all. It's not well-integrated with Laptop Mode Tools and it isn't maintained at the moment, so I'd advise against using it. :)

What is the relationship between Laptop Mode Tools and the script in the kernel documentation?

Laptop Mode Tools is a fork of the script in the kernel documentation. The script in the kernel documentation is currently pretty much unmaintained AFAIK, so I don't recommend using it.

What is the relationship between the Ubuntu package "laptop-mode" and the Debian package "laptop-mode-tools"?

There is a big thread about this on ubuntuforums, http://ubuntuforums.org/showthread.php?t=36976. Ubuntu used to have a rather outdated package for controlling laptop mode, based on the aforementioned kernel documentation script. Laptop mode tools basically is a much more recent version of the same code. Ubuntu has switched to laptop-mode-tools somewhere in 2006.

How does Laptop Mode Tools relate to noflushd?

It doesn't. Don't install both together. Noflushd does the same thing for your disks as laptop mode tools if you don't run a journaling filesystem such as ext3, ReiserFS or XFS. If you do, Laptop Mode Tools is currently your only option.

3. Is Laptop Mode Enabled?

How do I check if laptop mode is enabled?

Execute cat /proc/sys/vm/laptop_mode. If it contains a nonzero value, then laptop mode is enabled, if it says 0, then it isn't.

What's /var/run/laptop-mode-enabled got to do with things?

Well, this file is created and destroyed by the laptop-mode init script to enable/disable laptop mode activity. If this file is not present, then laptop mode tools will not do a thing except disable itself, even when you unplug your computer from the mains.

And what about /etc/default/laptop-mode?

That's only supported for backward compatibility with the old Ubuntu laptop-mode package. It contains a setting using which you can enable or disable laptop mode entirely.

4. Configuration Questions / Issues

Can I run Laptop Mode Tools on a Desktop machine?

Yes. Laptop Mode Tools is a generic power savings tool for Linux. It picked the name Laptop Mode Tools because power savings is more obvious on laptops. But there are many users that run Laptop Mode Tools on Desktops, Headless Jukeboxes, and even Servers.

Can I force laptop mode on/off?

Yes, kind of. If you want to manually control laptop mode, you need to set all ENABLE_LAPTOP_MODE_* to 1, and then control laptop mode by manually calling the /etc/init.d/laptop-mode script with the "start" and "stop" arguments.

Note that the /usr/sbin/laptop_mode command does not support the "start" and "stop" commands anymore. These commands interfere with the low-battery detection code, and they default to "auto" for that reason. This design flaw will be corrected by the 2.x major release, which will feature a profile-based configuration system that will allow manual profile switching without interfering with the low-battery detection code.

Clone this wiki locally