HOWTO: Enable and configure 'laptop-mode'

Discussions about Linux installation and configuration on Samsung laptops
User avatar
voRia
Administrator
Administrator
Posts: 1378
Joined: 12/02/2009, 18:08
Location: Italy
Contact:

HOWTO: Enable and configure 'laptop-mode'

Postby voRia » 26/02/2009, 12:40

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.
Last edited by voRia on 17/04/2009, 12:00, edited 1 time in total.
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!

ossas81
Newbie
Newbie
Posts: 19
Joined: 07/04/2009, 3:51

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

Postby ossas81 » 21/07/2009, 5:22

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?
Last edited by ossas81 on 21/07/2009, 5:23, edited 1 time in total.

infoseeker
Newbie
Newbie
Posts: 3
Joined: 17/05/2010, 22:12

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

Postby infoseeker » 17/05/2010, 22:33

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 ??? ???

User avatar
voRia
Administrator
Administrator
Posts: 1378
Joined: 12/02/2009, 18:08
Location: Italy
Contact:

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

Postby voRia » 20/05/2010, 11:10

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
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!

infoseeker
Newbie
Newbie
Posts: 3
Joined: 17/05/2010, 22:12

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

Postby infoseeker » 20/05/2010, 18:10

Great, that worked. :P

Thanks.

User avatar
Woulouf
Supporter
Supporter
Posts: 51
Joined: 05/03/2011, 12:32
Location: France

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

Postby Woulouf » 12/03/2011, 12:36

Can this be applied to others netbook rather than nc-10 ?

Thanks :)
Samsung N150 powered by Voyager 12.04 (Xubuntu)
Brightness control issue with 12.04 LTS : look at this topic viewtopic.php?p=5753#p5753


Return to “Linux On My Samsung”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest