Tuesday, 30 October 2007

Ubuntu, Dell laptop and hard disk power management

There has been some talk those days on laptop hard disk lifespan. See, for example, what Pascal says about it.

So, after some investigation, I saw that on my laptop (Dell Latitude D420) the BIOS doesn't handle an APM value of 255. By default the startup scripts execute hdparm -B 255 /dev/sda (or other devices) and that actually sets the APM value to 128 (as given by hdparm -I /dev/sda | grep Advanced). (I'm using Ubuntu 7.10 -- the script I'm talking about is /etc/acpi/power.sh.)

On the other hand, using -B 254 seems to disable APM. So here's a way to do it, by default, on every boot:

  • Add those lines to /etc/hdparm.conf:
    /dev/sda {
    apm = 254
    }

  • Make /etc/init.d/hdparm run at startup:
    ln -s /etc/init.d/hdparm /etc/rcS.d/S07hdparm

And now the load cycle count reported by SMART remains stable. Which means that hopefully my hard disk will live longer.

Addendum: if you don't use SMART, you should. Install the smartmontools package, enable SMART on your disks with smartctl -s on, and read the smartctl(8) manpage. Optionally, enable the smartd monitoring daemon (via /etc/default/smartmontools).

37 comments:

Neil Wilson said...

The startup scripts *do not* alter any settings on your hard drives. 'power.sh' does nothing because LAPTOP_MODE is disabled. What you get is the default your BIOS provides and unfortunately that isn't good enough for Linux.

Rafael said...

That's right -- I wanted to summarize, and I ended up writing innacuracies... The fact is I began to enable the laptop mode, and when seeing that the -B 255 didn't seem to be taken into account, with further investigation I found out that the BIOS wasn't understanding this value (and that -B 254 was needed to disable APM).

So, I disabled the laptop mode. But, for people who want to use the laptop mode, it's needed also to change the 255 by a 254 in /etc/acpi/power.sh.

rduht said...

We are sell wow gold and wow power leveling wow gold

aram said...

Great posting. Thanks of shairing this post is useful and important.

Regard
http://www.higrade.com

Alumine said...

buy viagra

generic viagra

viagra online

javieth said...

The motherboard as the laptop for me must to be efficient, quality and of course with a reasonable price. This is similar when i usually see to costa rica homes for sale i think is the best option in the market if you want to know a beautiful country and to a get a house quality.

Sara757 said...

I am also working in Ubuntu this post is really help for me. As now a days our whole data is stored in computer only we must know about how to get back data with the help of data recovery.

sarah said...

Very informative and helpful. I was searching for this information but there are very limited resources. Thank you for providing this information

Essays On Dell Computer Corp

james pham said...

I've received 2 orders from them in a timely manner at very fair prices in good packaging. Thank you for the quality service i will order Buy Cymbalta onli again.

james pham said...

The TransAlta and Alstom Develping CCS Facility in Alberta is somee thing that makes so much good thing in mind because it can makes so much better for Alberta, I think this kind of thing does needs to get happen because of good of it.Buy albuterol online

james pham said...

Hi there, I found your blog via Google while searching for first aid for a heart attack and your post looks very interesting for me.Buy atenolol online

james pham said...

I really admire this, I mean it really looks interesting! Very nice write up. Anyways, its a Great post. Buy diovan online

james pham said...

Explore your options for healthy aging. Find research and information on the health benefits of resveratrol, the miracle polyphenol found in red wine and its miraculous antiaging benefits. Resveratrol research suggests it has antiaging, anti-inflammatory, anti-cancer, anti-oxidant, and cardiovascular benefits.Buy synthroid online

Karen Symonds said...

Excellent Toprol online pharmacy. Great pricing and secure delivery. Will place future orders. Highly recommend.

Karen Symonds said...

Thank you for excellent services items received carefully packed and sealed We will continue to take advantage of your excellent services and prices keep up the good work.For More Information About Valsartan .

Karen Symonds said...

This has been my second time ordering through Metformin, and both times I have had no problems in receiving my order on time. I have never been happier about an online drug store. I have tried many, and Metformin is by far the most affordable, and the best online drug store I have ever found. I will be buying my Type 2 Diabetes from Metformin from now on.

Karen Symonds said...

This was my first time ordering from Atorvastatin and everything went like clock work. I got my medication in less time than I thought I would. The prices for medications was also reasonable. I will be ordering my medications from Atorvastatin for now on.

Karen Symonds said...

Thank you so much. It did take the full 20 business days that I was informed it might take which seemed a bit long but in the end I am very happy with this service. I received my Zocor medication registered mail and everything was in perfect condition. Thank you for helping save my life.

james pham said...

Shopping from buy lasix online it about 6 month still want to say that service is excellent cheap prices very fast delivery and good quality generics.

james pham said...

I am very happy to have found lasix 40mg- a genuine seller who can be trusted. I purchased lasix 40mg a generic product which has had excellent results. I will

be back for more. Thanks.

james pham said...

I want to share my experience with buy ultracet online. The company is honest and correct. Recently I did not receive one of my orders and they sent me again by their own cost. The pills are as original or as other generic.

Karen Symonds said...

Your concepts were simple to understand that I wondered why I in no way looked at it prior to. Glad to know that there's a blogger out there that certainly understands what he's discussing. Great job!!!

the first years wave stroller said...

Thanks for the informative post, i haven't been using "smart" on my hard disks at all. Good to know. Thanks.

Maria Sherperr
Dublin University
The First Years Wave Stroller

Forex Trading Software said...

I enjoyed reading your post quite useful and informative.
Accurate Forex Indicators

the first years wave stroller said...

The start-up scripts don't alter any settings on your hard drives.

Maria Sherperr
Dublin University
The First Years Wave Stroller

meriska shah said...

This was my first time ordering from and everything went like clock work. I got my medication in less time than I thought I would. The prices for medications was also reasonable. I will be ordering my medications from for now on.

Forex Trading Software said...

Its really quite useful and easy to understand.
FX Trading Strategies

Easterndrugs said...

Hey You have done great job, really it's an very interesting blog found here.... Buy Clomid I enjoyed your post. keep posting. Thanks very much for sharing it.

chefanna said...

Posh limo services in memphis tn takes great pride in servicing our clients. Best limousine
company in Memphis.Posh limo services in Memphis tn has never had any complaint's since we
opened in 2000. We are very proud of this.

Den said...

I was interested know about it.
sex bondage videos

Generic Drugstore said...

Wow.. that was really neat way of putting Excellent!! My compliments. Always wondered as to how this would really be. Buy Clomid Online. have really put across the point so well that you have made number of things quite clear. Of course will have to go through it properly a couple of times to actually gauge, but as of now I totally agree with your sentiment.

savsuns said...

Before reading this I was totally unaware of the topic. Thanks for Explaining in such a nice way. As per my knowledge there some buy lasix which are effective and good. I always prefer them only.

savsuns said...

Before reading this I was totally unaware of the topic. Thanks for Explaining in such a nice way. As per my knowledge there some buy lasix which are effective and good. I always prefer them only.

4downdb said...

The first part of unlock iphone starting any new site is picking the niche you want it to be in hotel marrakech. My biggest criteria for this case study was finding a niche that should be fairly easy to get some traction in rapidleech servers, so I went for something pretty obscure pnr status. I don’t know how much money is here, so I’m taking a chance there scrapebox. But all techniques stay the same adwords coupon.

Robert Jack said...
This comment has been removed by the author.
Karen Symonds said...

This was an amazing Blog that I had never seen it before. Thanks a lot for the information because Buy Prozac 60mg Online had liked it very much!

Brandon Hudson said...

I like your style of writing. You break it down nicely. Very informative post. Keep up the good work.

Apple® - MacBook® Pro with Retina Display - 15.4" Display - 8GB Memory - 512GB Flash Storage (MC976LL/A)

Apple® - MacBook® Pro - 15.4" Display - 8GB Memory - 750GB Hard Drive