Slashdot Mirror


Ubuntu May Be Killing Your Laptop's Hard Drive

wwrmn writes "There's a debate going on over at bugs.launchpad.net on whether it's the Ubuntu, BIOS, hard-drive manufacturer, or pick-any-player's fault, but Ubuntu (and perhaps any OS) may be dramatically shortening the life of your laptop's hard drive due to an aggressive power-saving feature / acpi bug / OS configuration. Regardless of where the fault lies or how it's fixed, you might want to take some actions now to try to prevent the damage."

37 of 419 comments (clear)

  1. Ubuntu by Anonymous Coward · · Score: 4, Funny

    but Ubuntu [...] may be dramatically shortening the life of your laptop's hard drive due to an aggressive power-saving feature I always thought that Gibbon was just a bit too gutsy!
  2. no problem, really! by loafula · · Score: 5, Funny

    I'll just buy another 4 hard drives with the money I saved not buying Vista!

    --
    FOXTROT UNIFORM CHARLIE KILO
    1. Re:no problem, really! by blazerw11 · · Score: 4, Informative

      I'll just buy another 4 hard drives with the money I saved not buying Vista!

      You may not have to. My Toshiba Satellite M45 has been running Ubuntu since Edgy, 6.10 and has a "Load_Cycle_Count" of 5,416. Maybe the default install does not have this issue? Maybe you have to install some other package to create the problem? It's not "laptop-mode-tools" because I have that installed. Do you have to be on battery power?

      It's still 5,416.

      193 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 5416
      --
      A great many people think they are thinking when they are merely rearranging their prejudices. -- William James
  3. Prevent damage?? by kusanagi374 · · Score: 4, Funny

    Yeah, sure. Whatever it is, it can't be compared to the damage done to Ubuntu's launchpad after it was slashdotted.

    Once they control the fire and get the backup server online, maybe I'll be able to RTFA. :(

  4. AHA! :D by Killjoy_NL · · Score: 4, Funny

    That's why I use windows. So I don't have to wonder who the culprit is ;)

    ^_^

    --
    This is the sig that says NI (again)
    1. Re:AHA! :D by ajs · · Score: 4, Insightful

      That's why I use windows. So I don't have to wonder who the culprit is Oh? Then you've never been caught in the "it's the graphics driver, no it's the motherboard, no it's the OS, no it's the graphics driver," loop.
    2. Re:AHA! :D by Schraegstrichpunkt · · Score: 4, Funny

      You're a Windows sysadmin ...

      Doesn't sound like you're a very good sysadmin.

      Gasp!

  5. Ubuntu? by keithjr · · Score: 5, Insightful

    If perhaps it could be "any OS" then why headline this as "Ubuntu" killing laptops? I can't find much in TFA that makes a compelling case that it isn't APCI. I'd read more but that page hurts my eyes.

  6. Isn't this what is supposed to happen? by zappepcs · · Score: 5, Insightful
    I mean, the OSS community at large finds a problem, and sets about to fix it... from the link:

    Ralf Nieuwenhuijsen wrote on 2007-10-25: (permalink)

    May i just warn ya all to NOT play the blame-game?

    It does sound like it's the fault of the BIOS (and somebody should contact them).

    To rescue a hard-drive in distress sounds like something that should have a high-priority (critical?).
    Not because it's ubuntu's fault or the bios fault. But because Ubuntu can solve this issue _now_. Doesn't sound like it is NOT being dealt with, it just isn't listed everywhere as critical and in the news all over the intarweb tubes.
  7. Old news??? by BUL2294 · · Score: 5, Informative
    From the now very overloaded page...

    Bug #59695, first reported on 2006-09-09.
    Apparently there has been no rush to fix it. Now that /. has picked it up and the site is being bombarded, how long till it gets fixed???
    --
    Windows 3.1x calc: 3.11 - 3.10 = 0.00
  8. Re:Thanks for slashdotting launchpad, guys. by FudRucker · · Score: 5, Funny

    here is a good workaround: http://www.debian.org/

    --
    Politics is Treachery, Religion is Brainwashing
  9. Selected Excerpts by asphaltjesus · · Score: 5, Informative

    From Google's cache:

    When switching to battery power, /etc/acpi/power.sh issues the command hdparm -B 1 to all block devices. This leads to extremely frequent load cycles. For example, my new thinkpad has already done well over 7000 load cycles -- in only 100 hours. That's at least one unloading per minute. Googling for "load unload cycles notebook OR laptop" shows that most laptop drives handle up to 600,000 such cycles. As these values clearly show, this issue is of high importance and should be fixed sooner rather than later.

    The command hdparm -b 255 turn off completely APM.

    Here is how I permanently fixed it:

    1) make a file named "99-hdd-spin-fix.sh". The important thing is starting with "99".
    2) make sure the file contains the following 2 lines (fix it if you have PATA HDD):
    #!/bin/sh
    hdparm -B 255 /dev/sda
    3) copy this file to 3 locations: /etc/acpi/suspend.d/ /etc/acpi/resume.d/ /etc/acpi/start.d/

    Voila! After that the HDD never spins down on power (looks like it actually spins down on battery at modest rate).
    Sorry if the instruction is too detailed, no offense.

    An alternative to the "99-hdd-spin-fix.sh" fix is to install and enable the package laptop-mode-tools,
    then customize /etc/laptop-mode/laptop-mode.conf, setting

    --
    Got Trader Joe's? friendwich.com RSS feeds work now!
    1. Re:Selected Excerpts by tchuladdiass · · Score: 4, Interesting

      The main problem is a combination of the short spindown time, and something wanting to write out to the drive every 30 seconds or so. The main culprit could be the fact that by default, a files last access time (atime) gets updated on every read, even if that read comes from cache. So when the drive is spun down, it gets spun up even on cached reads (to write out the atime).
      Add "-o noatime" to the filesystems in /etc/fstab, and that should clear up the issue.

  10. Not Entirely Accurate by marcantonio · · Score: 5, Insightful

    It's important to note that this only occurs if ENABLE_LAPTOP_MODE is enabled. By default it is NOT set. From /etc/default/acpi-support:

    # Switch to laptop-mode on battery power - off by default as it causes odd
    # hangs on some machines
    ENABLE_LAPTOP_MODE=false

  11. Re:The Ubuntu by TypoNAM · · Score: 5, Informative

    According to gentoo-wiki.com/MAN_hdparm -B is:
    Set Advanced Power Management feature, if the drive supports it. A low value means aggressive power management and a high value means better performance. A value of 255 will disable apm on the drive.

    I would say blame the hard drive vendor.

    --
    This space is not for rent.
  12. Re:Thanks for slashdotting launchpad, guys. by squiggleslash · · Score: 5, Informative

    Workaround #1. Edit /etc/hdparm.conf, add the following to the end (or modify the existing /dev/sda area, etc. This assumes your primary disk is your only disk and you're using SATA):

    /dev/sda {
    apm = 255
    spindown_time = 0
    }

    Then enter "sudo update-rc.d hdparm defaults" to ensure the changes take effect.

    Workaround #2, edit /etc/apm/event.d/20hdparm, find the line "APMD_SPINDOWN=18" and add a zero to it (APMD_SPINDOWN=180). Again enter "sudo update-rc.d hdparm defaults".

    The first of the options disables the whole spinning down thing. The second changes it so it spins down less (every 15 minutes rather than every minute and a half.)

    At least, that's what the Launchpad contributors claim.

    --
    You are not alone. This is not normal. None of this is normal.
  13. Read some of the Ubuntu forums by bluefrogcs · · Score: 5, Informative
  14. Re:The Ubuntu by timster · · Score: 5, Informative

    Actually, if you R(TRO)TFA, you'll find that Ubuntu is not issuing that command at all. Rather, this is a default set by the drive manufacturer.

    --
    I have seen the future, and it is inconvenient.
  15. Re:The Ubuntu by kebes · · Score: 5, Informative

    First off, putting a launchpad link on the frontpage of Slashdot is bad form. Launchpad is for discussing and resolving bugs, and we're not helping by swamping that page. It might be better if people read the wiki that has been set up to summarize the issue.

    In answer to your question about how this isn't Ubuntu's fault, apparently the problem is that the manufacturer sets certain default values for "aggressive power management" and enables this aggressive power management by default. Ubuntu's policy is to not change the manufacturer defaults, and simply uses them. Unfortunately these defaults are "too aggressive" and cause the hard drive to park/unpark too frequently.

    But Ubuntu is not blameless. First of all, if Ubuntu can push out a patch that resets the manufacturer defaults to sane values (and this will save some people from hard drive failures), then it definitely should. Also, there is some discussion that perhaps an Ubuntu daemon is probing the hard disk too frequently, so that the hard-drive can't sit in the parked state for long enough to actually make it a useful feature.

    Regardless of who is to blame, it would appear that the Ubuntu devs should push out a patch that forces systems to ignore the manufacturer values, and use settings that will protect the drive lifetime.

  16. Cheap test.. by delire · · Score: 4, Informative

    Ive tested on 3 Ubuntu laptops here and found no problem. Here's a little script to test yourselves (can't remember where i found the greppable bit - perhaps a Planet Ubuntu author).

    Run this every hour and compare differences in the load count (the last value in the output written to the file 'load_count' in the current directory).. Replace /dev/sda with your own drive. Not sure which? sudo fdisk -l. You'll need smartmontools (sudo apt-get install smartmontools).

    echo `sudo smartctl -a /dev/sda | grep Load_Cycle_Count` " | " `date` >> load_count

    If the difference in this count is more than 90 from one hour to the next you may be in trouble if there is anything to this wear and tear fear.

  17. Re:The Ubuntu by Anonymous Coward · · Score: 5, Informative

    I have an Dell Inspiron 6400 running Gentoo. I had this problem too. I fixed it by adding

            # -B 255 doesn't work for me
            sda_args="-B 254 -S 60"

    to /etc/conf.d/hdparm. This would fix the issue on boot, but after resuming, this would be moot. For that, I added

            # redo hdparm settings on resume /etc/init.d/hdparm restart

    after running /etc/acpi/suspend.sh in /etc/acpi/default.sh, though I suppose I could have put that line somwhere in suspend.sh.

    The key thing here is to run hdparm on boot *and* on resume

  18. Saving Power Has a Cost by Prototerm · · Score: 4, Interesting

    The aggressive power saving settings here are perhaps a little too aggressive, but did anyone really think you could do that totally without cost? This isn't magic, you know. It's a trade-off. If you tell your computer (usually in a laptop) to spin down the hard drives to save power, you're going to cause greater wear-and-tear on the things because each time they spin down, they have to spin back up before you can use them again. If you want to save energy without the wear, turn the bloody thing off when you're not using it.

    What, you're in too much of a hurry to view the latest pr0n? Chill, dude, before you go blind!

    If you run a desktop, it's doubtful you'll have a problem with this, as most desktop users turn power saving features off entirely (and yeah, I also drive a big honkin' SUV. Bite me), but be careful on a laptop. If your hard drive supports SMART, you can do a quick check of the numbers (I think the one you want is # 193, IIRC), and see if you're at risk. But not all drives support SMART (I have a laptop drive that doesn't), so as usual, YMMV.

    --
    "My country, right or wrong; if right, to be kept right; and if wrong, to be set right." --Senator Carl Schurz (1872)
  19. Re:The Ubuntu by Kjella · · Score: 5, Interesting

    I actually disagree. Sure, if the manufacturer issues a recommendation or something to change it, then by all means. Otherwise Ubuntu should just keep their hands off and let the HDD manufacturer deal with it. Does Windows automagically disable this behavior?

    --
    Live today, because you never know what tomorrow brings
  20. From the horses mouth by orangesunglasses · · Score: 5, Informative

    http://mjg59.livejournal.com/77672.html
    Matthew garret, who runs the laptop testing team. Read this, instead of just spreading FUD.

  21. Re:The Ubuntu by kebes · · Score: 4, Insightful

    Does Windows automagically disable this behavior? Good question. The comments in the bug report speculate that Windows either completely ignores this feature, or ignores the manufacturer values and uses its own values. (In either case, what's the point in having BIOS set defaults?)

    A conspiracy theorist might suggest that the hardware manufacturers are intentionally adding a feature that causes the drives to fail eventually (but statistically outside of the manufacturer's warranty period), so that people have to buy more hardware. The more likely explanation is that the manufacturer set the defaults, but didn't notice that the values were unsafe because Windows ignores them.

    Getting Ubuntu to override the defaults should be viewed as a short-term solution. Ultimately the hardware manufacturers should be setting default values that will not damage the hardware. Ideally they would design safeties into the hardware, which do sanity checks and reject ridiculous values.
  22. Re:The Ubuntu by eln · · Score: 5, Funny

    It's only been about 10 minutes, but so far my Load_Cycle is sticking at 1 where it started. You have to pull the knob out to get it to start the other cycles. It won't start the Spin_Cycle until you close the lid, though.
  23. Re:Ubuntu by Hal_Porter · · Score: 4, Funny

    but Ubuntu [...] may be dramatically shortening the life of your laptop's hard drive due to an aggressive power-saving feature I always thought that Gibbon was just a bit too gutsy! You should have waited for Apathetic Ape. I hear that doesn't bother at all with power management.
    --
    echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
  24. Re:Effects on Dell/Ubuntu OEM? by internetcommie · · Score: 5, Funny

    Considering the HD failure rate on Dell laptops, I doubt anybody will notice a difference.

  25. Re:The Ubuntu by morgan_greywolf · · Score: 5, Informative

    Exactly. See this article on thinkwiki about the problem. This is obviously HDD or HDD-controller specific, and is therefore a hardware vendor problem, not an Ubuntu problem. The article is FUD.

  26. It is NOT Ubuntu by chill · · Score: 4, Informative

    My company just issued me a Lenovo T60 laptop *yesterday*. I installed Kubuntu 7.10 *last night*. Prior to that it has had Windows XP on it since it was purchased via a corporate sale from Lenovo. It is about 15 months old and the value in question looks like this:

    193 Load_Cycle_Count 0x0032 001 001 000 Old_age Always - 2144751

    That is 2,144,751 in case the lack of commas throws you. This is just a tad more than the 600,000 that was mentioned in the original bug report, so I don't know out of who's hat that number was pulled.

    For completeness, here is the drive info.

    Model Family: Seagate Momentus 7200.1 series
    Device Model: ST96023AS
    Serial Number: 3MG06BZ3
    Firmware Version: 4.06

    --
    Learning HOW to think is more important than learning WHAT to think.
  27. Re:The Ubuntu by PhilipMckrack · · Score: 5, Insightful

    I think the answer is they should both fix the problem. Drive manufacturers should issue a sane value and operating systems should check that the value is sane before using it. Same rule as accepting any data from an outside source, you tell them what they are supposed to do, but then you double check it to make sure they did. Pointing fingers at each other while customers hardware fries doesn't help anyone.

  28. This is not an Ubuntu problem. Read the references by Wapiti-eater · · Score: 4, Informative

    It's already been posted, but apparently no one's reading it

    =====================
    Linux-hero wrote about how Ubuntu kills your hard drive. The situation is somewhat less clear than you might think from the article, but the basic takeaway message is that Ubuntu doesn't touch your hard drive power management settings by default. In almost all cases, it's more likely to be your BIOS or the firmware on your hard drive.

    The script that's executed when you plug or unplug your laptop is /etc/acpi/power.sh. The relevant sections are:

    function laptop_mode_enable { ...
            $HDPARM -S $SPINDOWN_TIME /dev/$drive 2>/dev/null
            $HDPARM -B 1 /dev/$drive 2>/dev/null
    }

    That is, when the laptop_mode_enable function is called, we set the drive power parameters. Now, by default laptop_mode_enable isn't called:

    if [ x$ENABLE_LAPTOP_MODE = xtrue ]; then
            (sleep 5 && laptop_mode_enable)&
    fi

    because ENABLE_LAPTOP_MODE is false in the default install (check /etc/default/acpi-support). This means that, by default, we do not alter the hard drive power settings. In other words, the APM settings that your drive is using in Ubuntu are the ones that your BIOS programmed into it when the computer started. This is supported by the fact that people see this issue after resuming from suspend. We don't touch the hard drive settings at that point, so the only way it can occur is if your BIOS or drive default to this behaviour.

    If you enable laptop mode, then we will enable aggressive power management on the drive and that may lead to some reduction in hard drive lifespan. That's a fairly inevitable consequence of laptop mode, since it only makes sense if the laptop enages in aggressive power management. But, as I said, that's not the default behaviour of Ubuntu.

    There's certainly an argument that we should work around BIOSes, but in general our assumption has been that your hardware manufacturer has a better idea what your computer is capable of than we do. If a laptop manufacturer configures your drive to save power at the cost of life expectancy, then that's probably something you should ask your laptop manufacturer about.
    =====================

    Don't fall prey to 'Digg-ish' sensationalism. You all are supposed to know better over here.

    --
    Senior NCO in the fight against entropy. I've seen things, man. Things no one should have to see.....
  29. Ubuntu FOUND the problem by darkonc · · Score: 4, Interesting
    One of the comments notes that at least one drive had the same problem with Windows -- The difference is that, lacking ubiquitous SMART tools, Windows users would be much less likely to get to the source of the problem.

    So, it comes down to: Ubuntu users were able to diagnose the problem, and have the tools to implement a workaround. Nix to either for Windows users -- they just need to remember to replace their drive once a year.

    --
    Sometimes boldness is in fashion. Sometimes only the brave will be bold.
  30. Don't use -B 255, use -B 254 instead by fifirebel · · Score: 5, Informative
    Since this story hit the front-page I've been monitoring hard drives on three laptops that I can remotely access from work (hi boss).
    • Disk 1:
      • Seagate ST96023A (Seagate Momentus 7200.1 series)
      • Power_On_Hours 1438
      • Load_Cycle_Count 187925
      • 130 load/unload per hour (roughly 2 per minute)
    • Disk 2:
      • Hitachi HTS721010G9SA00
      • Power_On_Hours 818
      • Load_Cycle_Count 90539
      • 110 load/unload per hour (roughly 2 per minute)
    • Disk 3:
      • TOSHIBA MK6006GAH
      • Power_On_Hours 2896
      • Load_Cycle_Count 199757
      • 68 load/unload per hour (roughly 1 per minute)
    Then I've been monitoring the hard drive with this one-liner.

    lcc() { smartctl -a /dev/hda | grep 'Load_Cycle_Count' | awk '{print $10}'; }; n=$(lcc); while :; do nn=$(lcc); echo "$(date) $((nn-n))"; n=$nn; sleep 60; done
    Before you ask, it is only one line, as you only press enter once :-). And that's a short one-liner for me.

    This shows on all three laptops that the load counts increases by 1 to 4 every minute.

    Now I issued:

    hdparm -B 255 /dev/hda
    This has stopped load cycles on two drives.
    The third one (the TOSHIBA MK6006GAH) still continues loading and unloading like hdparm did not help at all.

    However, setting the power-management level to "lowest power savings mode" with:

    hdparm -B 254 /dev/hda
    did prevent any more load/unload cycles from happening.

    So in summary:

    1. Use hdparm -B 254 at boot.
    2. Re-issue it after every suspend/wake-up cycle as this setting seems to be lost on suspends.
  31. Re:Ubuntu? Slashdot! by geminidomino · · Score: 4, Funny

    Doesn't compare to what Video did... the scene at the Radio Star's apartment was BRUTAL.

  32. Re:The Ubuntu by kiddygrinder · · Score: 4, Funny

    No, i think it's fair to call this an Ubuntu problem, i mean 80% of the stories about linux these days are simply titled "Ubuntu" when they would apply to any distro at all. It's only a natural progression to start calling your computer and all the parts therein an Ubuntu :)

    --
    This is a joke. I am joking. Joke joke joke.
  33. Re:The Ubuntu by Rogerborg · · Score: 4, Funny

    God I hate incompetent comments.

    Then you must be a real masochist to keep hanging around here.

    --
    If you were blocking sigs, you wouldn't have to read this.