You are not logged in.

#1 2011-02-05 06:03:40

Aesir
Member
Registered: 2011-02-03
Posts: 22

Laptop Configurations (laptop mode tools)

Hello,

I am in the process of configuring my laptop and have some simple questions that I would like to verify with people. I am running arch on a Sony Vaio laptop with a Toshiba ATA hard drive.

1) I have heard quite a bit about being careful with APM to avoid shortening life of hard drive.  I have set the following settings in my laptop-mode.conf file:

#    LM_something=value      Value of "something" when laptop mode is active
#    NOLM_something=value    Value of "something" when laptop mode is NOT
#                            active
#    AC_something=value      Value of "something" when the computer is running
#                            on AC power
#    BATT_something=value    Value of "something when the computer is running
#                            on battery power
#
# Power management for HD (hdparm -B values)
#
BATT_HD_POWERMGMT=128
LM_AC_HD_POWERMGMT=254
NOLM_AC_HD_POWERMGMT=254

As I understood the arch wiki, these settings should be good for most laptops.  I don't move the laptop much when it's plugged in (I think the latter two are plugged in) and can have a higher hdparm value.  128 should be good if I am on battery, when I may move the laptop around more (so lower to avoid HD damage).  Could anyone confirm that I understood this correctly so that I don't damage anything.

2) I am using s2disk to hibernate the computer.  Is there any way using laptop-mode-tools or another method to make it so that the computer automatically hibernates if lid is closed

3) I am a not certain whether this should be turned on or off (I am leaning towards off since I don't have SATA, but it was by default on)

#
# If this is enabled, laptop mode tools will assume that SCSI drives are
# really SATA drives that only _look_ like SCSI drives, and will use hdparm
# to control them. Set this to 0 if you have /dev/sd devices and you want
# laptop mode tools to use the "sdparm" command to control them. 
#
ASSUME_SCSI_IS_SATA=1

Thank you very much!

Last edited by Aesir (2011-02-05 06:44:17)

Offline

#2 2011-02-05 07:29:48

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: Laptop Configurations (laptop mode tools)

Yes, the 254 setting will prevent the head load count from going through the roof.  The 128 when on battery will result in head load cycling, but how much time do you spend on battery anyway?

You might look at a monitoring tool like smartctl

ewaller@odin:~[1] 1021 %sudo smartctl -a /dev/sda | grep Cycle
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       692
193 Load_Cycle_Count        0x0032   158   158   000    Old_age   Always       -       127742
ewaller@odin:~ 1022 %

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2011-02-06 03:28:55

Aesir
Member
Registered: 2011-02-03
Posts: 22

Re: Laptop Configurations (laptop mode tools)

I have installed smartctl and my load cycle is at ~80,000 (goes up pretty quickly, about 1-2/min it seems like. But so it is safe to leave 254 for LM_AC-HD and NOLM_AC_HD, and then 128 BATT_HD without risking damaging hard drive (by moving)?  I am not very much on battery (usually plugged in my room or library), but I am not always able to secure a power source when in a class room.

Another thing, I have been trying and trying to get suspend/hibernate to work to no avail.  Is it a huge issue if I just shutdown and start computer more often (e.g. when going to/from class) without wearing down on laptop too much?  The boot is very quick (~15 seconds) so I really would have no problem doing this.

Offline

#4 2011-02-11 19:37:18

flan_suse
Member
Registered: 2010-10-28
Posts: 120

Re: Laptop Configurations (laptop mode tools)

I may not have the "numbers" but I can share personal experience. Setting APM to 128 while on battery does not yield any noticeable improvement in battery uage, especially if you're using the laptop. (If you're not using the laptop or not downloading anything, you might as well suspend it.) What is noticeable is the constant load cycling for the hard disk's heads. (You can hear a distinct sound.) So what I've gathered is this only strains the drive, with no meaningful additional benefits. It also causes applications (which are not in cache) to take longer to load, since there's a moment of waiting for the drive to be ready, if the head is currently parked.

I would keep APM at 254 at all times, and AAM at 254, as well. You're better off saving battery life by changing the display's brightness and turning off wireless when it's not in use.

Last edited by flan_suse (2011-02-11 19:38:04)

Offline

#5 2011-02-12 02:57:01

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: Laptop Configurations (laptop mode tools)

I have not responded sooner because I did not have an opinion, but I tend to agree with flan_suse.

For what they are, laptops are amazing things.  The processing power packed into the things is staggering.  More so is the storage.
When I was in school, hard drives were measured in terms of 10s of megabytes, drives had masses on the order of 20kg, and head crashes were common and disastrous.  That we can walk around with 2kg laptops that have 10,000 times the storage available in rack mount systems 25 years ago is amazing. 

But, by nature, laptops encounter some brutal handling.  If the heads are flying when the machine takes a shock, it will likely crash the heads.  Letting them park after a timeout really won't diminish this risk.   Many laptops now have accelerometers to detect a drop and can unload the heads while the machine is falling.  It is a good idea, but I've no idea how well implemented that is.  There is support for this in Linux, but I really have not test it.

That you want to protect your investment is noted.  Never-the-less, laptops operate in a rough environment.  Data is highly valuable. Drives are cheap (I know you are a student, but they really are cheap).  Get an external drive and keep your internal drive backed up.  Set the APM to 254 to save load cycles.  Watch your SMART info and watch for signs of impeding failure.  When the drive starts to show signs of wear out or failure, save yourself headaches and just replace it.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#6 2011-02-12 12:38:32

pogeymanz
Member
Registered: 2008-03-11
Posts: 1,020

Re: Laptop Configurations (laptop mode tools)

I keep APM at 254 when on battery and 255 when on AC. 255 means it's off, so it wont ever park the heads.

I could not tell a difference between 254 and 128 in terms of powertop's reported power usage.

Offline

Board footer

Powered by FluxBB