Ubuntu Demon\’s blog

October 30, 2007

Ubuntu is NOT causing aggressive power management

Filed under: english — ubuntudemon @ 10:16 am

Ubuntu is NOT causing aggressive power management settings!

The following things might instead cause aggressive power management settings :

  • your (laptop) harddrive firmware might have aggressive power management defaults (operating system independent)
  • your (laptop) BIOS might set your harddrive to use aggressive power management (operating system independent)
  • you might have enabled laptop-mode in /etc/default/acpi-support (disabled by default) which will set your harddrive to use aggressive power management

Read here what Matthew Garret an experienced and well known Ubuntu Developer has said about this problem.

I’m afraid that quite some people are getting a high Load_Cycle_Count because their laptop (BIOS or harddrive firmware) uses too aggressive powermanagement. That’s why I think “wishlist” status for this bug is too low. IMHO Ubuntu should correct mistakes made by BIOS or harddrive firmware.

These aggressive power management settings are set by your BIOS or harddrive firmware. Windows and/or Mac OS X might be overriding these settings which might make Ubuntu look bad if Ubuntu doesn’t override these settings. I won’t blog again about this problem until new information arises. I’m a big fan of Ubuntu. I don’t want to see Ubuntu hurt because it’s not Ubuntu who is setting these aggressive power management defaults.

People with laptops who haven’t enabled laptop-mode and think they are suffering from this problem might consider adding the following information to the bug report :

  • the output of $sudo smartctl -a /dev/sda
  • the age of your disk
  • an estimate of the total hours your disk has been running since you started using it (to compare to Power_on_Hours because that value might be off)
  • an estimate of the average increase of Load_Cycle_Count during one hour on AC (before applying any “ugly” fixes)

I blogged earlier about this problem :

91 Comments »

  1. yes,I have to admit you are working in hard,I just paste yours blog in my post five minutes ago,you have post the new one again

    But thank you again ,let’s closer the truth a future step

    Comment by helai — October 30, 2007 @ 12:11 pm

  2. The question is not if ubuntu changes the power management settings or not.

    The question is: Why does Ubuntu not allow the disk’s heads to be parked for more than about 3 seconds. *Thats* the problem – and that is an ubuntu problem, because on e.g. Windows the heads can be parked for hours…

    Comment by LittleBoy — October 30, 2007 @ 1:17 pm

  3. to LittleBoy :

    You might be right. Without aggressive power management too much disk access won’t affect your harddisk health. That’s why I left it out in this blog post. I already blogged about it in earlier blog posts :

    from https://ubuntudemon.wordpress.com/2007/10/28/laptop-hardrive-killer-bug-how-to-discover-whether-you-are-affected/ :

    There’s another part of this problem (one of the following might be true) :

    * something wakes up the harddrive right after spinning down.
    * something unparks the head right after your harddisk head is parked.

    from https://ubuntudemon.wordpress.com/2007/10/26/laptop-hardrive-killer-bug/ :

    * harddrive firmware should use sane defaults for power management (contact your harddrive manufacturer if you don’t use laptop-mode and suffer from this problem)
    * the BIOS shouldn’t set the amount of power management of your harddrive (contact your BIOS manufacturer if your harddrive manufacturer isn’t the one to blame)
    * harddrives shouldn’t die within one year even if you have enabled aggressive power management settings
    * aggressive power management settings (if set by your harddrive’s firmware or your BIOS) should be detected and handled
    * laptop-mode should be less aggressive about power management in the meantime you shouldn’t enable it
    * if the hdparm service is enabled then hdparm should load the settings from /etc/hdparm.conf after resuming frome suspend-to-ram and hibernate-to-disk
    * the top causes for hard drive wake up should be found
    * smartmontools should be installed on default. smartd should run on default with sane settings hooking into a notifier to notify users

    Comment by ubuntudemon — October 30, 2007 @ 2:24 pm

  4. HINT: If you want to use smartctl you’ve to install the smartmontools package.

    Comment by emonkey — October 30, 2007 @ 2:42 pm

  5. to emonkey :

    Yeah you are right.

    This blog post continues on earlier blog posts and assumes people have read them.

    Comment by ubuntudemon — October 30, 2007 @ 3:09 pm

  6. If your harddrive spins down and spins up again your Load_Cycle_Count increases by one. If your harddrive head parks and unparks again your Load_Cycle_Count increases by one.

    You don’t want your Load_Cycle_Count to increase too fast.

    Harddrive manufacturers seem to claim most harddrives can handle at least 600.000 Load_Cycles but this is probably an average under ideal circumstances. My harddrive started to die slowly when at a Load_Cycle_Count of 200.000.

    Comment by ubuntudemon — October 30, 2007 @ 3:13 pm

  7. Just replace Ubuntu with Windows and let’s see if our comments would be so “fair”.

    The truth is that Ubuntu didn’t change and should’ve done this.

    In order to become a mainstream operating system, this kind of sharp edges MUST be polished.

    Comment by HangLoose — October 30, 2007 @ 4:25 pm

  8. to HangLoose :

    Ubuntu does not set these aggressive power management settings (unless you have enabled laptop-mode which is disabled by default).

    The reasoning is that the manufacturers should be able to set appropriate power management defaults.

    Read what Matthew Garret an experienced and well known Ubuntu Developer has said about this problem here :
    http://www.advogato.org/person/mjg59/diary/82.html

    Windows and/or Mac OS X might be overriding these power management settings which might make Ubuntu look bad if Ubuntu doesn’t override these settings.

    Comment by ubuntudemon — October 30, 2007 @ 5:46 pm

  9. Uh-oh, the wisdom on /. have picked up on this.

    Comment by matt — October 30, 2007 @ 6:53 pm

  10. to matt :

    Thanks for notifying us.

    I replied on slashdot :
    http://hardware.slashdot.org/comments.pl?sid=344745&cid=21175701

    Comment by ubuntudemon — October 30, 2007 @ 8:02 pm

  11. Look, the simple fact is that Ubuntu is condoning this. If a harddrive has some silly default settings that no one listens to except Ubuntu and then it starts to die, it’s the distributor’s fault. “One who condones evils is just as guilty as the one who perpetrates it”

    Comment by walrus24 — October 30, 2007 @ 9:44 pm

  12. […] you might want to take some actions now to try to prevent the damage.” But Roald Hopman, the Ubuntu Demon, writes that the problem could be caused by three possible […]

    Pingback by Is Ubuntu killing hard drives? « I’m Just an Avatar — October 30, 2007 @ 9:51 pm

  13. I stumbled upon this on planet and because I am such a newbie sometimes, I didn’t really know about these things. I was wondering about the power settings of Ubuntu but never bothered to check before. Now that your series of posts, at a glance, makes sense so I’d check within the day and stuff. You have given me a lot to read today so I could see what I should do about it in case I might actually be experiencing something similar.

    Comment by Clair — October 30, 2007 @ 11:34 pm

  14. Hey, you might want to reflect on your constant claim of expressing this opinion of yours ever so humbly (FOUR times in a row). You’re actually pushing this issue harder than anything else I’ve seen on planet (no pun intended), and it’s getting kind of irritating. It also probably influenced the /. sensation.

    Comment by anonymous — October 31, 2007 @ 2:15 am

  15. Hi I am logged in on Launchpad but it won’t note that I am logged in on the bugs screen for some reason.

    I don’t know if this helps but I ran my laptop for about an hour on AC and read off the Load Cycle before and after.

    The change was: 124.

    I tried running the hdparm -b 180 command and tested to 10 and to 20 minutes and the result was a movement of zero over the full 20 minutes.

    The laptop was new in April of this year and gets used about 1.5 hours per day.

    It is a compaq presario v6000, i have no idea how to find out about the HDD.

    Comment by Leslie — October 31, 2007 @ 8:13 am

  16. Sorry, forgot to say it is 7.04 Fiesty Fawn.

    Comment by Leslie — October 31, 2007 @ 8:15 am

  17. I’m using Gusty Final with 2.6.22-14 genetic kernel
    the i solve the problem with the
    $ hdparm -B 254 /dev/sd*

    and another one is the shutdown issue

    when i shut down it has a sound like
    “tick” or “click” or “park”

    not just shutdown, when i goto suspend and herbinate i cause the sound, this sound like it like a hard shut down , means power off b4 it was completely shutdown the HDD is still spinning and power off suddenly this is killing me now
    any idea

    plz kidly e mail me
    gohkeatliang@hotmail.com
    or
    keatliang2005@gmail.com

    btw i poor in English how that u guys understand.

    THANKS IN ADVANCE

    Comment by KeatLiang — October 31, 2007 @ 9:50 am

  18. […] Ubuntu is NOT causing aggressive power management the ugly fixThis is what Matthew Garret says about this bug : […]

    Pingback by Laptop Hardrive Killer Bug « Ubuntu Demon’s blog — October 31, 2007 @ 10:13 am

  19. I’m a big fan of Ubuntu. I don’t want to see Ubuntu hurt because it’s not Ubuntu who is setting these aggressive power management defaults.

    Some background of the problem :

    If your harddrive spins down and spins up again your Load_Cycle_Count increases by one. If your harddrive head parks and unparks again your Load_Cycle_Count increases by one.

    You don’t want your Load_Cycle_Count to increase too fast.

    Harddrive manufacturers seem to claim most harddrives can handle at least 600.000 Load_Cycles but this is probably an average under ideal circumstances. My harddrive started to die slowly when at a Load_Cycle_Count of 200.000.

    Ubuntu is NOT causing aggressive power management.

    The following things might instead cause aggressive power management settings :

    * your (laptop) harddrive firmware might have aggressive power management defaults (operating system independent)
    * your (laptop) BIOS might set your harddrive to use aggressive power management (operating system independent)
    * you might have enabled laptop-mode in /etc/default/acpi-support (disabled by default) which will set your harddrive to use aggressive power management

    These aggressive power management settings are set by your BIOS or harddrive firmware. Windows and/or Mac OS X might be overriding these settings which might make Ubuntu look bad if Ubuntu doesn’t override these settings.

    Read here what Matthew Garret an experienced and well known Ubuntu Developer has said about this problem :
    http://www.advogato.org/person/mjg59/diary/82.html

    for more information see :
    https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/59695

    Ubuntu is NOT causing aggressive power management


    If you think you might be suffering from this problem here’s an ugly fix :
    the ugly fix

    Comment by ubuntudemon — October 31, 2007 @ 10:17 am

  20. to KeatLiang :

    If your Load_Cycle_Count goes up it means that your harddrive has made one spin-down/spin-up cycle or one park-head/unpark-head cycle. Your harddrive is specified for a limited number of these cycles.

    Harddrive manufacturers seem to claim most harddrives can handle at least 600.000 Load_Cycles but this is probably an average under ideal circumstances. My harddrive started to die slowly when at a Load_Cycle_Count of 200.000.

    First check whether you are suffering from this problem. You might need to apply the ugly fix if your Load_Cycle_Count is increasing too fast. Read more here :

    Laptop Hardrive Killer Bug

    Comment by ubuntudemon — October 31, 2007 @ 10:33 am

  21. i solve the spins down and spins up problem

    just the shutdown problem

    it wont shutdown completely b4 the power goes off, it is not shutdown completely the HDD is still spinning and turn off the power, this will killing my hard driver this bug is different now…..

    thx for the previous fix

    Comment by keatliang — October 31, 2007 @ 10:40 am

  22. […] A colleague just pointed me to another post on the issue. […]

    Pingback by Load cycle count « Azitech — October 31, 2007 @ 10:44 am

  23. to keatliang :

    You are welcome.

    I can’t help you with your other problem. You might want to start a new thread in the hardware&laptops subforum of ubuntuforums here :
    http://ubuntuforums.org/forumdisplay.php?f=135

    good luck!

    Comment by ubuntudemon — October 31, 2007 @ 10:52 am

  24. I’m a big fan of Ubuntu. I don’t want to see Ubuntu hurt because it’s not Ubuntu who is setting these aggressive power management defaults.

    You might consider digging this article :
    http://digg.com/linux_unix/Ubuntu_is_NOT_causing_aggressive_power_management

    You might consider digging my comment on this article :
    http://digg.com/linux_unix/Ubuntu_is_NOT_causing_aggressive_power_management?t=10237593#c10237593

    Comment by ubuntudemon — October 31, 2007 @ 11:15 am

  25. this wiki page tries to summarize the issue :

    https://wiki.ubuntu.com/DanielHahler/Bug59695

    Comment by ubuntudemon — October 31, 2007 @ 11:36 am

  26. Some todo’s / trying to dissect the bug. from https://ubuntudemon.wordpress.com/2007/10/26/laptop-hardrive-killer-bug :

    * harddrive firmware should use sane defaults for power management (contact your harddrive manufacturer if you don’t use laptop-mode and suffer from this problem)
    * the BIOS shouldn’t set the amount of power management of your harddrive (contact your BIOS manufacturer if your harddrive manufacturer isn’t the one to blame)
    * harddrives shouldn’t die within one year even if you have enabled aggressive power management settings
    * aggressive power management settings (if set by your harddrive’s firmware or your BIOS) should be detected and handled
    * laptop-mode should be less aggressive about power management in the meantime you shouldn’t enable it
    * if the hdparm service is enabled then hdparm should load the settings from /etc/hdparm.conf after resuming frome suspend-to-ram and hibernate-to-disk
    * the top causes for hard drive wake up/spin up should be found
    * the top causes for hard drive unparking should be found
    * maybe (laptop) harddrives should be mounted with noatime by default
    * smartmontools should be installed on default. smartd should run on default with sane settings hooking into a notifier to notify users
    (if the Load_Cycle_Count is increased with more than 90 cycles within 24 hours)
    (if smartctl thinks your harddrive assess your harddrive as not healthy)
    (if more than X errors where found during the last self-test)

    Comment by ubuntudemon — October 31, 2007 @ 11:38 am

  27. […] The last post I made regarding the harddrive problem is : Ubuntu is NOT causing aggressive power management […]

    Pingback by I’m very sorry! « Ubuntu Demon’s blog — October 31, 2007 @ 11:53 am

  28. To track Load_Cycle_Count trends you could put this into root’s crontab ($sudo crontab -uroot -e):

    echo `sudo smartctl -a /dev/sda | grep Load_Cycle_Count` ” | ” `date` >> /home/username/load_count

    replace username with your username

    I didn’t came up with this. This contribution is combined from :

    Laptop Hardrive Killer Bug – should get critical status


    http://hardware.slashdot.org/comments.pl?sid=344745&cid=21174571

    Comment by ubuntudemon — October 31, 2007 @ 12:12 pm

  29. The discussion about this bug on launchpad has temporary stopped because slashdot and reddit both have articles linking directly to the launchpad page instead of to the wiki page which tries to summarize the issue : https://wiki.ubuntu.com/DanielHahler/Bug59695

    Comment by ubuntudemon — October 31, 2007 @ 12:28 pm

  30. […] Ubuntu is NOT causing aggressive power management […]

    Pingback by The Linux Index » Ubuntu Demon(Roald Hopman): Laptop Hardrive Killer Bug — October 31, 2007 @ 12:41 pm

  31. The smartctl values aren’t always easy to interpret. If the Load_Cycle_Counter value behaves as a counter and is below impossible to reach values it’s probably the right number.

    You can also look at “WORST” and “THRESHOLD” (|more instead of |grep to easily see which value is “WORST” and which value is “THRESHOLD”) :
    $ sudo smartctl -a /dev/sda | more

    If WORST is lowering (too fast) than you might be suffering from this problem. You can roughly calculate how long it will take for WORST to reach THRESHOLD if you keep watching those values daily/weekly. The closer WORST (starts at 100 or 200 from what I have seen) is to THRESHOLD the likelier it is for your drive to die from a high Load_Cycle_Count.

    From https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/17216/comments/40 :
    [quote=Brian Visel]

    Something to bear in mind as well:

    smartmon does not always report SMART values as you might think. Different values are stored in different ways by different manufacturers.

    Namely, if you do the smartctl check, wait for the click, and do it again immediately after, you may find that the amount has increased by more than one. In this case, it’s a pretty safe bet that the number you’re seeing isn’t accurate.

    Also, it’s a pretty safe bet (though not guaranteed) that you can get the real value by dividing by the amount it increments by. So, if the value you see first is 477,296, and then it clicks once, and the value is 477,312 (difference of 16), it’s a pretty safe bet that the number you’re really dealing with is more along the lines of 29,831 to 29,832, in which case you have no worries.

    [/quote]

    If you think you might be suffering from this problem you might want to apply the ugly fix :

    Laptop Hardrive Killer Bug

    If you think your harddrive might start dying soon you should make backups of all your data and run the diagnostic tool of your harddrive manufacturer.

    Comment by ubuntudemon — October 31, 2007 @ 12:51 pm

  32. Bug #59695 is now marked as a duplicate of this bug :
    https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/17216

    Which is a bit strange because according to the activity log that bug (#17216) was fixed on 31 Aug 07.

    Comment by ubuntudemon — October 31, 2007 @ 1:16 pm

  33. I have an as-delivered Dell Latitude D520 with Kubuntu 7.10 installed. I have been checking Load_Cycle_Count for the past few days since I read about this and mine is increasing at about 5 an hour. If the disk fails at 200,000 that would mean it should last 40,000 hours, or about 13 YEARS at my usage (8hrs / day). Somehow I don’t think the mtbf of the disk is likely to be better than that. Upshot is I don’t think it’s anything Ubuntu is doing as a default which causes this problem.

    Comment by Smotsie (UK) — October 31, 2007 @ 1:22 pm

  34. to Smotsie :

    Load_Cycle_Count probably won’t be the factor killing your harddrive.

    You are right. It’s not Ubuntu who is setting aggressive power management values.

    The following things might instead cause aggressive power management settings :

    * your (laptop) harddrive firmware might have aggressive power management defaults (operating system independent)
    * your (laptop) BIOS might set your harddrive to use aggressive power management (operating system independent)
    * you might have enabled laptop-mode in /etc/default/acpi-support (disabled by default) which will set your harddrive to use aggressive power management

    These aggressive power management settings are set by your BIOS or harddrive firmware. Windows and/or Mac OS X might be overriding these settings which might make Ubuntu look bad if Ubuntu doesn’t override these settings.

    It would be nice if Ubuntu would override aggressive powermanagement settings set by BIOS or harddrive firmware.

    I’m a big fan of Ubuntu. I don’t want to see Ubuntu hurt because it’s not Ubuntu who is setting these aggressive power management defaults.

    Comment by ubuntudemon — October 31, 2007 @ 1:33 pm

  35. Sorry, however the problem IS with Ubuntu. If they expect to get any sort of market penetration for mobile users, this stuff needs to be fixed at the OS level, or at least give the users a really easy way to enable power management settings to something more appropriate. Also, stop quoting yourself. Ubuntu should be hurt by this because the out of the box experience for portable users is a *BAD* experience, and people should be made aware of it.

    Comment by Brian — October 31, 2007 @ 4:35 pm

  36. In my very humble opinion we can attack/dissect the bug in the following way.

    hardware/manufacturers part :
    * harddrive firmware should use sane defaults for power management
    * the BIOS shouldn’t set the amount of power management of your harddrive
    * harddrives shouldn’t die within one year even if you have enabled aggressive power management settings

    software part :
    * aggressive power management settings (if set by your harddrive’s firmware or your BIOS) should be detected and overridden by Ubuntu
    * laptop-mode should be less aggressive about power management (in the meantime you shouldn’t enable it)
    * if the hdparm service is enabled then hdparm should load the settings from /etc/hdparm.conf after resuming frome suspend-to-ram and hibernate-to-disk and after attaching ac (instead of users having to add small scripts to /etc/acpi/resume.d and such places)
    * the top causes for hard drive wake up/spin up should be found
    * the top causes for hard drive unparking should be found
    * maybe (laptop) harddrives should be mounted with noatime by default
    * smartmontools should be installed on default. smartd should run on default with sane settings hooking into a notifier to notify users
    (if the Load_Cycle_Count is increased with more than 90 cycles within 24 hours)
    (if smartctl thinks your harddrive assess your harddrive as not healthy)
    (if more than X errors where found during the last self-test)

    Regarding smartd hooking into a notifier I found the following wiki pages with similar ideas :
    https://wiki.ubuntu.com/UbuntuDownUnder/BOFs/SMARTMonitoring
    https://wiki.ubuntu.com/DiskMonitoring

    Also posted on : https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/17216/comments/19

    Comment by ubuntudemon — October 31, 2007 @ 4:40 pm

  37. to Brian :

    Ubuntu is not causing aggressive power management. I agree that this might hurt Ubuntu that’s why I am spending time blogging about this.

    I agree there are things Ubuntu can do. See :
    https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/17216/comments/19

    Comment by ubuntudemon — October 31, 2007 @ 4:44 pm

  38. It is; however, causing my Canon Pixus MP500 Printer, Scanner, Copier to be worthless. It’s a shame that I have to boot Windows whenever I want to print (particularly photos). I’m now a Gutsy Gibbon, but I hope gutsy isn’t describing my decision to consider Ubuntu.

    Comment by びっくり — October 31, 2007 @ 6:20 pm

  39. Hello, longtime windows user, recreational *nix user here.

    I see Ubuntu as being the beginner’s playground in the world of free opensource OSs. It’s meant to be as user-friendly as possible, which includes minimizing the amount of configuration the user has to do in order to have a satisfactory experience.

    Pointing the finger at BIOS settings I’ve never come across on a multitude of systems (I work in independent PC repair) seems just silly. It’s great that you’re offering solutions and truthfully they’re not that hard to carry out; I’ve already set them on my U7.10 box at home.

    But the failing still rests upon the shoulders of the OS. It’s a tool, one that is supposed to manage the computer for the user. I’ve already said what the goals of Ubuntu are as an OS, and in this regard, with respect to excess hard drive wear and above-average power consumption (probably related), it falls short of its goal.

    I honestly can’t recommend Ubuntu to my customers as an easy to use alternative to the 2 major commercial options if it requires terminal configuration to fix an issue which will otherwise leave their hard drive dead in several years. I would love to, because I’ve gotten friends and family members to adopt it with great success. But for the un-savvy user who it caters to, this is a glaring and often undetectable flaw.

    Comment by anonymous — October 31, 2007 @ 6:22 pm

  40. FWIW I picked up one of the Dell Inspiron 1505N machines in July and the load count is over 170,000 now. I leave it on just about all of the time. I tried one of the ACPI settings, let’s see what happens.

    Comment by Mark — October 31, 2007 @ 6:44 pm

  41. […] bug, caused by the laptop BIOS or other settings, rather than Ubuntu’s "fault". See: Ubuntu is NOT causing aggressive power management Ubuntu Demon’s blog posted by : Jon Cooper, 31 October 2007" __________________ "Though all men live in […]

    Pingback by Ubuntu eats your laptop's hard-drive - AOA — October 31, 2007 @ 6:55 pm

  42. […] | UbuntuDemon, entre […]

    Pingback by Ubuntu NO está acortando los discos duros de los portátiles — October 31, 2007 @ 7:04 pm

  43. […] | UbuntuDemon, entre […]

    Pingback by Tecnologia » Blog Archiv » Ubuntu NO está acortando los discos duros de los portátiles — October 31, 2007 @ 7:07 pm

  44. I think we can all agree that by not fixing it through a better default or user selectable option, they are just hurting themselves. So while Ubuntu may not be causing the problem, they are not exactly fixing it either. And it is not just Ubuntu, in my experience wth major distros, notebook power function support has been pretty horid. I will say I think the community is taking this in the right direction. Windows Power Management is by no means perfect, so I think there is a great oppurtunity here for Linux to do some real good.

    Comment by Brian — October 31, 2007 @ 8:29 pm

  45. sure. ubuntu is not causing the problem but it doesnt stop it either and the OS is supposed to do all the low level housekeeping. its the job of the operating system. Mac and windows handles the problem so why not Ubuntu?
    ergo, Ubuntu needs to fix it.

    Comment by kerb — October 31, 2007 @ 8:53 pm

  46. to kerb and Brian :

    These aggressive power management settings are set by your BIOS or harddrive firmware. Windows and/or Mac OS X might be overriding these settings which might make Ubuntu look bad if Ubuntu doesn’t override these settings.

    Don’t forget the “might”. I’m not sure whether Windows and/or Mac OS X are overriding these settings.

    In my humble opinion it is good that there is some attention for this problem which will hopefully mean that Ubuntu eventually will override power management settings if they are too aggressive.

    Comment by ubuntudemon — October 31, 2007 @ 9:30 pm

  47. I too have a Load_Cycle_Count of 332184.
    (And 7514 Power_On_Hours)

    I looked up the specs for my drive (Hitachi HTS726060M9AT00).

    Apparently it has three idle modes:
    1. Performance Idle. The drive is actively reading/writing.
    2. Active Idle. The head is moved to the “middle”. Saves 45-55% power (compared to #1).
    3. Low power Idle. The head is parked (and that increases the Load_Cycle_Count). Saves 55-65% power (again compared to #1).

    The spec also states that the APM Levels (what you set with hdparm -B) are as follows:
    o 1-127 standby is lowest possible mode
    o 128-191 low power idle is lowest possible mode
    o 192 – 254 active idle is lowest possible mode

    I set mine to 192 and now the Load_Cycle_Count does not change anymore (during normal operation).

    Hope this helps.

    Comment by Lars — October 31, 2007 @ 9:40 pm

  48. […] Traducido de:Ubuntudemon […]

    Pingback by Moddingblog » Ubuntu no es quien daña discos duros de Laptops — October 31, 2007 @ 11:12 pm

  49. Lap top hard drive failure is often more of a problem then desktops due to a lot of factors, including movement and heat. Hopefully this will get resolved soon, cause these drives really don’t need any unneeded strain.

    Comment by Scottsdale Web Design — November 1, 2007 @ 12:04 am

  50. Thanks for the post. It helped me a ton!!! Sorry I can’t contribute, but thank you!

    Comment by George — November 1, 2007 @ 2:03 am

  51. Ubuntu
    I used it for my fujitsu laptop and didn’t work.
    So I more preferred redhat for my linux
    I have UMPC vaio U50, is Ubuntu can work on it?

    Comment by bedahinfo — November 1, 2007 @ 2:44 am

  52. lucky me, cause i don’t have laptop

    Comment by ayahshiva — November 1, 2007 @ 4:45 am

  53. Hi

    Someone gave me an old copy of Ubuntu 5.04. I’m considering loading it on my old 500 mHz G3 Apple iBook which has 192 MB of RAM.

    Will Ubuntu run smoothly or is it a power-vampire like Windoze XP?

    Comment by ru55el — November 1, 2007 @ 4:49 am

  54. As a user, it’s more important that the OS protects me from stupidity, either from myself, or from the hardware manufacturer, or from other poorly written software.

    When it comes down to choosing the software I use, it’s not so much about how “pure” or “true it is to the hardware”, but what value it brings to the table. Sure it makes the software more complicated, but sometimes it has to go that way to be useful software.

    Ubuntu already excels at this. It’s humane in the sense that it recognizes most people are not technical. “Do no harm”. Sudo instead of root by default. It would be within the ethos of Ubuntu to override hardware settings to protect the user’s machine.

    Comment by Chui — November 1, 2007 @ 5:30 am

  55. to bedahinfo :

    I have no idea. You should google a bit or just try it. Good luck 🙂

    Your question isn’t relevant to the aggressive power management issue. So if you have additional questions please start a new thread in the hardware&laptops subforum on the ubuntuforums : http://ubuntuforums.org/forumdisplay.php?f=135

    Good luck 🙂

    Comment by ubuntudemon — November 1, 2007 @ 10:16 am

  56. to ru55el:

    Don’t run 5.04 because it’s not supported anymore. If you want to run Ubuntu you should run 6.10 LTS Dapper, 7.04 Feisty or 7.10 Gutsy.

    For ppc you might want to consider running Debian Stable because it supports ppc. For Ubuntu ppc is community supported so you might have to report some bugs and wait until someone fixes them until everything works.

    Your question isn’t relevant to the aggressive power management issue. So if you have additional questions please start a new thread in the Absolute Beginners subforum on the ubuntuforums : http://ubuntuforums.org/forumdisplay.php?f=73

    Good luck 🙂

    Comment by ubuntudemon — November 1, 2007 @ 10:23 am

  57. to Chui:

    I agree that Ubuntu / Linux should override these aggressive power management settings set by BIOS or harddrive firmware. I hope they release a patch soon. I think it’s very important for 8.04 Hardy to have this.

    Comment by ubuntudemon — November 1, 2007 @ 10:26 am

  58. The smartctl values aren’t always easy to interpret. If the Load_Cycle_Counter value behaves as a counter and is below impossible to reach values it’s probably the right number.

    You can also look at “WORST” and “TRESHOLD” (|more instead of |grep to easily see which value is “WORST” and which value is “TRESHOLD”) :
    $ sudo smartctl -a /dev/sda | more

    If WORST is lowering (too fast) than you might be suffering from this problem. You can roughly calculate how long it will take for WORST to reach TRESHOLD if you keep watching those values daily/weekly. The closer WORST (starts at 100 or 200 from what I have seen) is to THRESHOLD the likelier it is for your drive to die from a high Load_Cycle_Count.

    From https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/17216/comments/40 :
    [quote=Brian Visel]

    Something to bear in mind as well:

    smartmon does not always report SMART values as you might think. Different values are stored in different ways by different manufacturers.

    Namely, if you do the smartctl check, wait for the click, and do it again immediately after, you may find that the amount has increased by more than one. In this case, it’s a pretty safe bet that the number you’re seeing isn’t accurate.

    Also, it’s a pretty safe bet (though not guaranteed) that you can get the real value by dividing by the amount it increments by. So, if the value you see first is 477,296, and then it clicks once, and the value is 477,312 (difference of 16), it’s a pretty safe bet that the number you’re really dealing with is more along the lines of 29,831 to 29,832, in which case you have no worries.

    [/quote]

    If you think you might be suffering from this problem you might want to apply the ugly fix :

    Laptop Hardrive Killer Bug

    If you think your harddrive might start dying soon you should make backups of all your data and run the diagnostic tool of your harddrive manufacturer.

    Comment by ubuntudemon — November 1, 2007 @ 10:36 am

  59. I would add this to https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/59695
    but they’ve replaced it with a static page because of the slashdotting.

    I did some investigation last night and it turns out that the root cause is this bug:

    https://bugs.launchpad.net/ubuntu/+source/acpid/+bug/31512

    ACPID outputs fairly verbose log entries on every ACPI event. On my laptop, this includes battery events every 15 seconds, so ACPID is doing a write every 15 seconds.

    I think the default settings for laptop hard drives are set with the assumption that hard drives will be used burstily, so the worst-case scenario for a laptop hard drive would be a single write, roughly once every 15 seconds.

    Disabling ACPID logging (add “-l /dev/null” to its command line is the easiest way) makes the problem go away.

    Comment by Mark Thomas — November 1, 2007 @ 10:42 am

  60. to Mark Thomas :

    Thanks for sharing this. Cool find!

    Bug #59695 is now marked as a duplicate of this bug :
    https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/17216

    Which is a bit strange because according to the activity log that bug (#17216) was fixed on 31 Aug 07.

    But you should provide any potentially important information to bug #17216

    IMHO there are two root causes :
    * acpid logs too much information for some people. maybe there are other things which also cause too much disk activity.
    * BIOS or harddrive firmware set too aggressive power management which should be overridden

    Comment by ubuntudemon — November 1, 2007 @ 10:50 am

  61. Thanks, I’ve added comments there.

    I don’t think a 10-second park is all that aggressive for the expected use case. Absent 15 second interval loggers, I think if you haven’t used the hard disk for 10 seconds then it’s statistically likely that you won’t use it for the next minute or so. Parking laptop hard drives is fairly important, of course, as it protects them from knocks.

    Comment by Mark Thomas — November 1, 2007 @ 11:14 am

  62. to anonymous:

    Ubuntu is NOT causing aggressive power management. These settings are set by BIOS or harddrive firmware.

    Desktop users aren’t affected. Laptop harddrives have a shorter lifetime than desktop harddrives anyway.

    I agree that Ubuntu / Linux should override these aggressive power management settings set by BIOS or harddrive firmware. I hope they release a patch soon. I think it’s very important for 8.04 Hardy to have this.

    Comment by ubuntudemon — November 1, 2007 @ 12:58 pm

  63. I have combined all active threads about the “laptop harddrive Load_Cycle_Count issue” on the ubuntuforums.

    People who have support questions can ask them here :
    http://ubuntuforums.org/showthread.php?t=591503

    Comment by ubuntudemon — November 1, 2007 @ 1:17 pm

  64. To people who are experiencing a lot of wake ups :

    If you would like to know what kind of things you see accessing your disk when you do the things you do normally you can run this (but answer N to all of these questions in order to not change anything) :
    $sudo lm-profiler

    I have 2 GB of ram and 0 swap use. My result :

    Profiling run started.
    Write accesses at 7/600 in lm-profiler run: thunderbird-bin
    Write accesses at 8/600 in lm-profiler run: thunderbird-bin
    Write accesses at 25/600 in lm-profiler run: liferea-bin
    Write accesses at 90/600 in lm-profiler run: liferea-bin
    Write accesses at 118/600 in lm-profiler run: thunderbird-bin
    Write accesses at 154/600 in lm-profiler run: liferea-bin
    Write accesses at 173/600 in lm-profiler run: thunderbird-bin
    Write accesses at 219/600 in lm-profiler run: liferea-bin
    Write accesses at 230/600 in lm-profiler run: thunderbird-bin
    Write accesses at 282/600 in lm-profiler run: liferea-bin
    Write accesses at 283/600 in lm-profiler run: thunderbird-bin
    Write accesses at 339/600 in lm-profiler run: thunderbird-bin
    Write accesses at 346/600 in lm-profiler run: liferea-bin
    Write accesses at 392/600 in lm-profiler run: thunderbird-bin
    Write accesses at 410/600 in lm-profiler run: liferea-bin
    Write accesses at 448/600 in lm-profiler run: thunderbird-bin
    Write accesses at 475/600 in lm-profiler run: liferea-bin
    Write accesses at 503/600 in lm-profiler run: thunderbird-bin
    Write accesses at 540/600 in lm-profiler run: liferea-bin
    Profiling run completed.

    Comment by ubuntudemon — November 1, 2007 @ 7:08 pm

  65. If you have a Samsung drive

    try this setting:
    hdparm -B 254 /dev/sda

    255 doesn’t seem to help, but with 254 the ~15 second load/unload cycle for my HM250JI immediately stopped (after 138470 in roughly 4 weeks).

    You have at least to edit /etc/acpi/power.sh. Additionally I added the following section to /etc/hdparm.conf

    # To fix the load cycle problem
    /dev/sda {
    apm = 254
    # spindown_time = 0
    }

    Comment by Michael Neuffer — November 1, 2007 @ 8:42 pm

  66. To Michael Neuffer :

    255 works for some drives. 254 for others. That information is included in the ugly fix :

    Laptop Hardrive Killer Bug

    Is your harddrive four weeks old ? In that case please share the whole output of
    $ sudo smartctl -a /dev/sda | grep Load_Cycle_Count

    If your harddrive is four weeks old and your Load_Cycle_Count was fastly increasing by increments of 1 then you should consider replying to the bugreport and giving them this information :
    http://ubuntuforums.org/showpost.php?p=3684011&postcount=278

    You should consider supplying all that information to this bug report :
    https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/17216

    Thanks,

    Regards,

    ubuntu_demon

    Comment by ubuntudemon — November 1, 2007 @ 9:02 pm

  67. Below is a cron script you might find of use in determining some statistics regarding the load cycle count.

    #!/bin/sh
    # Outputs load cycle count to a log file
    # Place in /etc/cron.hourly for automatic logging.
    # Will output data regarding $DEV to a the file $LOG as deifined below in the format:
    # time power_on_hours apm_level load_cycle_count
    DEV=/dev/sda
    LOG=/var/log/lcc

    # generate the SMART report
    REPORT=`smartctl -a /dev/sda`

    #get the current Unix time
    NOW=`date +%s`
    #get the number of power on hours from the report
    POH=`echo “””$REPORT””” | awk ‘$1 == 9 {print $10}’`
    #get the load cycle count from the report
    LCC=`echo “””$REPORT””” | awk ‘$1 == 193 {print $10}’`
    #get the current apm level
    APML=`hdparm -I $DEV | sed -n ‘/Advanced power management level:/ s/.* \([0-9]*\) .*/\1/gp’`

    echo $NOW $POH $APML $LCC >> $LOG

    Comment by Kevin Mitchell — November 2, 2007 @ 1:36 am

  68. when is set to 255 the hard disk temperature are extra ordinary high

    normally is 30~ 35 C

    now is about 40 ~48C

    any similar case here ???

    Comment by keatliang — November 2, 2007 @ 7:25 am

  69. to Kevin Michell :

    Thanks for your contribution.

    You might want to contribute your script to this bug report :
    https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/17216

    You can also track Load_Cycle_Count trends in this way :

    Ubuntu is NOT causing aggressive power management

    Comment by ubuntudemon — November 2, 2007 @ 9:33 am

  70. to keatliang:

    That might be a trade off to make. You should only apply the ugly fixes if you are seriously affected and your laptop harddrive manufacturer is not setting sane defaults.

    When to consider applying ugly fixes :
    * if you estimate that your “WORST” will approach your “THRESHOLD” within three years of use
    * if you hear a lot of ticks while your laptop is running
    * if your Load_Cycle_Counts rises very fast (in increments of one otherwise you have to divide your Load_Cycle_Count by the size of the increment). roughly faster than 180 per day if you aim for less than 200.000 Load_Cycle_Counts within three years. Harddrive manufacturers seem to claim most harddrives can handle at least 600.000 Load_Cycles but this is probably an average under ideal circumstances.

    In case of the ugly fix you probably want to set the power management value (-B) to somewhere between 128 and 254. If you are worried about power usage or heat you should try 128. You can experiment with values between 128 (low power usage) and 254 (best performance) although values below 254 still can do much head parks (depending on the harddrive) so you should keep watching your Load_Cycle_Count.

    I set my power management to 128 somewhere between 16:20 and 16:40. Between 16:40 and 17:00 I see 42 Load_Cycles within 20 minutes. That’s 2 Load_Cycles per minute :
    193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always – 903 | Fri Nov 2
    16:20:01 CET 2007
    193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always – 920 | Fri Nov 2
    16:40:02 CET 2007
    193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always – 962 | Fri Nov 2
    17:00:01 CET 2007

    In general we can see more if people give more information :
    * how old their disk is
    * how much time their laptop runs daily on average : Power_On_Hours (retrieve in same way as Load_Cycle_Count and please say whether you think this number is valid)
    * full Load_Cycle_Count information of a couple of days

    Please go to this thread for further support :
    http://ubuntuforums.org/showthread.php?t=591503

    Comment by ubuntudemon — November 2, 2007 @ 9:42 am

  71. […] it’s the laptop makers who are after aggressive power management that are causing the problems. One blogger writes that the issues are OS independent. "These aggressive power management settings are set […]

    Pingback by Ubuntu Causing Laptop HDD Failure? - Computer Forums — November 2, 2007 @ 12:10 pm

  72. tferero received an email from Bruce Allen. For the whole story read :
    http://www.linuxquestions.org/questions/showthread.php?p=2945630#post2945630

    [quote=Bruce Allen]
    I think that the -B value of 255 is incorrect. You should use 254 for
    maximum performance. 255 IS DOCUMENTED AS ‘RESERVED’ IN THE ATA/SATA
    SPECS. THE BEHAVIOR OF -B 255 THUS IS NOT PREDICTABLE AND IT MAY HAVE NO
    EFFECT. Also according to the ATA/SATA specs any value greater than or
    equal to 128 will ‘not permit the device to spin down to save power’. So
    128 will reduce power use as much as possible but not permit spin-down.
    [/quote]

    Bruce Allen is :
    * author of “Monitoring Hard Disks with SMART”, Linux Journal, 2004) :
    http://www.linuxjournal.com/article/6983
    * maintainer of the website http://smartmontools.sourceforge.net/

    blackhole54 notified us here about this here :
    http://ubuntuforums.org/showpost.php?p=3690862&postcount=15

    In case of the ugly fix you probably want to set the power management value (-B) to somewhere between 128 and 254. If you are worried about power usage or heat you should try 128. You can experiment with values between 128 (low power usage) and 254 (best performance) although values below 254 still can do much head parks (depending on the harddrive) so you should keep watching your Load_Cycle_Count.

    I set my power management to 128 somewhere between 16:20 and 16:40. Between 16:40 and 17:00 I see 42 Load_Cycles within 20 minutes. That’s 2 Load_Cycles per minute :
    193 Load_Cycle_Count 0×0032 200 200 000 Old_age Always – 903 | Fri Nov 2
    16:20:01 CET 2007
    193 Load_Cycle_Count 0×0032 200 200 000 Old_age Always – 920 | Fri Nov 2
    16:40:02 CET 2007
    193 Load_Cycle_Count 0×0032 200 200 000 Old_age Always – 962 | Fri Nov 2
    17:00:01 CET 2007

    Comment by ubuntudemon — November 2, 2007 @ 3:37 pm

  73. Ok I have same bug in Suse

    Sorry for the cross post, but here is a post I let on a suse forum.

    Hey guys, many thanks for your work !!
    http://www.suseforums.net/index.php?showtopic=41458

    Comment by mathias — November 3, 2007 @ 12:34 am

  74. to matthias :

    Thanks for this information. All operating systems which don’t override aggressive power management settings set by laptop BIOS or harddrive firmware are affected. I’m not saying that all harddrive firmwares and all laptop BIOSes are affected.

    I posted your link to the relevant bugreport :
    https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/17216
    https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/17216/comments/67

    Comment by ubuntudemon — November 3, 2007 @ 11:26 am

  75. Also don’t forget that having your harddisk head park protects your harddrive if you experience any bumps (which is especially nice if you are on the road and therefot probably working on battery).

    Comment by ubuntudemon — November 3, 2007 @ 11:57 am

  76. […] reduzindo a vida útil dos discos rígidos (HDs). Como noticiado em diversos sites da internet [1,2], isto não é um bug do Ubuntu. Na verdade, o Ubuntu apenas segue as recomendações equivocadas […]

    Pingback by Alex’s Weblog » Blog Archive » Aumentando a vida útil dos HDs — November 3, 2007 @ 5:28 pm

  77. Yes, many thanks !

    I am currently testing a lower value (eg 200)

    I thinks because we are IT guys does not justify thinking exclusively in a 0-1 fashion (you know : ON/OFF) 🙂

    Comment by mathias — November 3, 2007 @ 5:38 pm

  78. Hi again,

    just to let you know that there are tools for setting the APM value directly in the hard drive setting.

    I used it rather than the ugly fix (see my post on Suse Forum).

    I think it makes more sense, since it means a reinstall will not require the ugly fix again, and since it really is a hardware issue – not an OS one.

    Cheers.

    Comment by mathias — November 4, 2007 @ 5:52 pm

  79. to matthias :

    The BIOS can override the default setting set by the harddrive.

    As far as I know you have to use the right tool for the right drive (you can for example use the Ultimate Boot cd-rom or download the tool from the manufacturer of your harddrive). In my humble opinion it’s easier to explain one solution which works for everyone.

    Please continue to share any relevant information you find. Thanks!

    Comment by ubuntudemon — November 4, 2007 @ 10:41 pm

  80. There have been so many duplicates, deleted posts and other actions in Launchpad that I don’t know anymore how to check how this is being resolved after all I got in my mailbox. Which is the number bug I should subscribe to?

    Any hints about when this will be released as an update and not an “ugly fix”? I am very interested in seeing this fixed. Until then I’ll stay in Windows, although I don’t like it.

    Thanks in advance.

    Comment by Fernán — November 12, 2007 @ 7:15 pm

  81. to Fernán :

    Not all harddrives are affected and not all harddrives that are affected are affected equally.

    If you are heavily affected and if you understand the ugly fix and if understand how to revert it then it can’t hurt to apply it when running on AC.

    Your Load_Cycle_Count might also increase too fast in windows although it will probably increase a bit faster under Linux because ext3 is a journalling filesystem which commits each 5 seconds if there is anything to commit.

    Currently this issue is being tracked here :
    https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/59695

    The support thread for this issue is here :
    http://ubuntuforums.org/showthread.php?t=591503

    Comment by ubuntudemon — November 12, 2007 @ 7:38 pm

  82. […] see Ubuntu hurt because it’s not Ubuntu who is setting these aggressive power management defaults.read more | digg […]

    Pingback by Ubuntu is NOT causing aggressive power management | Little Ubuntu — November 17, 2007 @ 2:03 am

  83. this is a very frustrating bug.

    I’ve written about Ubuntu a lot on my blog — I prefer Ubuntu to XP and do not want to go back to windows.

    but I’m new to linux – and did not really understand if the comments on this blog :
    http://www.advogato.org/person/mjg59/diary/82.html
    were actually ideas for fixes, or explanations.

    Can I / should I try changing the /etc/acpi/power.sh file?

    I’m even confused about whether the desirable setting is to have laptop_mode_ENABLED or DISABLED.

    ???????

    Comment by hobbylobby — November 24, 2007 @ 3:49 am

  84. […] Ubuntu Demon is saying that the load cycle count is NOT the fault of Ubuntu. […]

    Pingback by Ubuntu Demon says the Load Cycle Count NOT Ubuntu’s fault « Hobby Lobby — November 24, 2007 @ 4:01 am

  85. laptop-mode is disabled by default.

    Only people who are heavily affected should use the ugly unofficial fix.

    Please read :
    http://ubuntuforums.org/showpost.php?p=3733762&postcount=1

    For questions please use the support thread :
    http://ubuntuforums.org/showthread.php?t=591503

    Comment by ubuntudemon — November 26, 2007 @ 3:09 pm

  86. I just installed Fedora 8 on a Toshiba U300 laptop (Toshiba MK1637GSX) and it DOES exhibit a (not-too) high increase of Load_Cycle_Count (1 every 2 minutes or worse in AC mode, default install). However the question is NOT only what the correct settings for hdparm or laptop_mode are, but WHY does the HDD wake up?? The Count increases ESPECIALLY when I do nothing with it!!!!
    Does ANYBODY have any idea why the sleeping disk is waked? Can this be checked somehow?

    Comment by dlymper — December 8, 2007 @ 4:47 pm

  87. […] a vida útil dos discos rígidos (HDs). Como noticiado em diversos sites da internet [1,2], isto não é um bug do Ubuntu. Na verdade, o Ubuntu apenas segue as […]

    Pingback by Ubuntu e um probleminha com o HD — February 12, 2008 @ 2:55 am

  88. Ubuntu is a nice system, but when i tried it, a LOT of thing didnt work on my laptop…

    And the flash9 crashing problem isn’t solved… must use flash7 if you dont want to force quit firefox every 2 youtube video.

    Ubuntu need to grow up a lot, the kernel too, wich is very bad on suporting the newest machines.

    Resummin: If you wanna use ubuntu, get an ancient lapttop, or a pretty old desktop, wich is sopported well.

    Ubuntu is becoming good, in some years maybe could be useable.

    no offense, just my opinion.

    Ubuntu is good, but not as an commercially supported and selled system.

    Comment by Windoze Guy — March 7, 2008 @ 11:32 am

  89. […] lo achacaban a Linux. Otros culpaban a los fabricantes de discos, como puede leerse aquí. Otra buena explicación se puede leer en […]

    Pingback by La muerte del disco en Vista — July 20, 2008 @ 6:10 pm

  90. i like ubuntu …

    Comment by technology — July 21, 2008 @ 2:29 am


RSS feed for comments on this post. TrackBack URI

Leave a comment

Create a free website or blog at WordPress.com.