Page 1 of 1

HOWTO: Enable and configure 'laptop-mode'

Posted: 26/02/2009, 12:40
by voria
One of the most important things for the energy saving on a notebook (but also for the protection of data in special cases such as a stroke due to an accidental fall to the ground) is to put "to rest" the hard disk if it is not used for a given time. However, the excessive use of this function leads to a continuous turn on/off of the hard disk, resulting in premature mechanical death. So we have to find a compromise between energy saving and safeguarding the mechanics of the disk.

The factory settings for most of the notebook HDs are very aggressive and tend to turn off the drive too early and too often for maximum energy saving, so it's usually the operating system to manage this task. Ubuntu (for various and valid reasons) does not change the default factory settings on the disk, but fortunately it's easy to solve this problem.

Open the file /etc/default/acpi-support in your favourite editor and change the line

Code: Select all

ENABLE_LAPTOP_MODE=false
to

Code: Select all

ENABLE_LAPTOP_MODE=true
Now the energy saving is managed properly.

If you want, you can change the default laptop-mode settings in /etc/laptop-mode/laptop-mode.conf.
Since the NC10 has a 6-cell battery that lasts for a very long time, I preferred to change the lines

Code: Select all

LM_AC_HD_IDLE_TIMEOUT_SECONDS=60
LM_BATT_HD_IDLE_TIMEOUT_SECONDS=60
BATT_HD_POWERMGMT=1
to

Code: Select all

LM_AC_HD_IDLE_TIMEOUT_SECONDS=300
LM_BATT_HD_IDLE_TIMEOUT_SECONDS=300
BATT_HD_POWERMGMT=192
in order to have better disk performance when working with the battery, sacrificing a little of the power saving.

The TIMEOUT options set to 300 seconds (5 minutes) the standby timeout for the disk.
The POWERMGMT option sets the disk power management, and it can have a value between 1 and 255. A low value results in a better energy saving but less disk performance, an high value results in disk performance but less energy saving.

RE: [NC10] How to solve the excessive Load Cycling problem

Posted: 21/07/2009, 5:22
by ossas81
I've been toying with these settings for months to try to figure out the optimal setting for the NC10 and my PC habits.

It should spin-down often, not only to protect the battery, but to protect data from being lost if the computer is knocked while the HD is spinning (which technically should happen more often when on battery, since it might not be on a desk connected to power).

I read somewhere that the HD should spin down an average of 15 times, as an optimal balance between HD life and data-protection/battery-life. Although I can't verify it.

It seems that BATT_HD_POWERMGMT has an effect that really teeters if switched between 192 and 191. At 191 or below, it cycles down about once per minute, no matter what you set for LM_BATT_HD_IDLE_TIMEOUT_SECONDS. However, At 192, there's really much less control over the number of times it cycles down per hour. I found that these settings give about 15 cycles/hr:

LM_BATT_HD_IDLE_TIMEOUT_SECONDS (between 60 and 100)
BATT_HD_POWERMGMT (192)

some of this also depends on the HD usage (I'm still trying to tweak the NC10 to reduce HD access).

Anyone have more input on these settings?

Re: HOWTO: Enable and configure 'laptop-mode'

Posted: 17/05/2010, 22:33
by infoseeker
First of all, thanks to all involved with this site... great work.

Ok, I have install Lucid on my N140 and all is good so far... thanks to the samsung-tools.
Now I am still trying to enable the laptop mode. I have installed the latop-mode-tools and when I check the laptop_mode cat /proc/sys/vm/laptop_mode I get 2 and if I try to change the value to 5 using echo 5 > /proc/sys/vm/laptop_mode I get permission denied (even with sudo).
If I use echo 5 | sudo tee /proc/sys/vm/laptop_mode then it works .... until I restart, then its back to 2.

Any ideas...please ??? ???

Re: HOWTO: Enable and configure 'laptop-mode'

Posted: 20/05/2010, 11:10
by voria
You cannot change that option manually, because 'laptop-mode' will reset it to the value specified in its config file.
So, you have to open the file '/etc/laptop-mode/laptop-mode.conf', and change the option:

Code: Select all

LM_SECONDS_BEFORE_SYNC=2
in:

Code: Select all

LM_SECONDS_BEFORE_SYNC=5
then, restart laptop-mode:

Code: Select all

sudo /etc/init.d/laptop-mode restart

Re: HOWTO: Enable and configure 'laptop-mode'

Posted: 20/05/2010, 18:10
by infoseeker
Great, that worked. :P

Thanks.

Re: HOWTO: Enable and configure 'laptop-mode'

Posted: 12/03/2011, 12:36
by Woulouf
Can this be applied to others netbook rather than nc-10 ?

Thanks :)