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."
It seems to be killing Slashdot's hard drives also!
Insert self-referential sig here.
I'll just buy another 4 hard drives with the money I saved not buying Vista!
FOXTROT UNIFORM CHARLIE KILO
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.
I just got two Thinkpads at auction I wanted to put Ubuntu on. Launchpad is hit so hard I can't even subscribe to the bug to search for potential workarounds or better settings. :(
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)
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.
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.
Support NYCountryLawyer RIAA vs People
Windows 3.1x calc: 3.11 - 3.10 = 0.00
I wonder what is the effect of this bug on officially endorsed and supported Dell notebooks with Ubuntu on them? Wouldn't something like this be caught up by Dell's QA? Or is it exclusive to 7.10?
I mean, if it was Windows that was destroying laptop hard drives, this would have been a legendary thread, with viciously bashing comments, insightfully (40%) funny (20%) attacks against MS, Vista drama etc.
With Ubuntu as the culprit there is some sort of "respect" that kills the potential of the thread. Come on guys, it is not Linux, it is just Ubuntu. What are the SuSE/RH/etc fans waiting for?
Violence is the last refuge of the incompetent. Polar Scope Align for iOS
From Google's cache:
/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.
/dev/sda /etc/acpi/suspend.d/ /etc/acpi/resume.d/ /etc/acpi/start.d/
/etc/laptop-mode/laptop-mode.conf, setting
When switching to battery power,
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
3) copy this file to 3 locations:
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
Got Trader Joe's? friendwich.com RSS feeds work now!
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
Here's the fix http://ubuntuforums.org/showthread.php?t=596602
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).
/dev/sda with your own drive. Not sure which? sudo fdisk -l. You'll need smartmontools (sudo apt-get install smartmontools).
/dev/sda | grep Load_Cycle_Count` " | " `date` >> load_count
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
echo `sudo smartctl -a
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.
The new screens and graphics control panel is added to gnome so that you can now do this out of the box.
It shows two screens, and you can dual screen it or switch screens from the control panel. You may have to restart X for changes to take effect, however it is much better than it used to be. I had no problems selecting the right resolution for my computer (1280x1024).
AS for the hard drive throttling, that could be a serious issue, and one I am sure they will try to fix asap, especially with a Long Term Support version coming up next. They want that thing as bug free and stable as it can get, and something like this could hurt their rep. On the other hand, who's to say other OS's/distros aren't doing the same thing?
All the bitching around my work about how hard drives used to last longer. With my limited cross section, I have 2 computers at home, both ca 1998, still running original hard drives, in fact I've obsoleted 6 workstations so far at home, none of them had hard drive failures, I had one PSU, one GPU, and one NIC failure. At work (mainly a IBM shop) I've had to replace about 20% of drives within 4 years (I admin 50 workstations). I realize there is a lot of variables, smaller read heads, faster spin rates etc, but it does seem that my old dinosaur home computers last longer than the newer PC's we have at work. I'd be curious if "power saving" is putting our data at risk.
Bravo. Now we just need someone to blame this on Bush, and everything is covered.
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)
I edited my xorg configuration file, and I'm just a girl! It's so easy that only a complete moron would have a problem with it.
With Vista it's Microsoft's fault. With Ubuntu (or any open source project) technically, it's our fault. So if you're confused about the missing flames maybe you need to rethink what Open means.
Quack, quack.
You know, it's funny. A while back there was an outcry about manufacturers who decided that installing linux nullified your warrenty. This incident makes me wonder if maybe they have a point? After all... they have likely tested the hardware for long term windows reliability. They probably haven't tested their hardware for long term Linux reliability (through all the various linux types and settings.)
That said, they could probably still support their warrenty on things they know won't be affected by operating systems, like the hinge of the laptops screen.
Boojum the brown bunny
http://mjg59.livejournal.com/77672.html
Matthew garret, who runs the laptop testing team. Read this, instead of just spreading FUD.
I have been running noatime for as long as I have been running Ubuntu and still had been seeing insanely high load cycle counts until I applied the hdparm -B fix. There is something else going on.
Now let's all forget about this hard drive failure problem with a big bowl of strawberry ice cream!
strange, Hitachi Harddrive sounds like an ubuntu approved device with it's alliteration and all.
I have Slackware 11 on my laptop and I just checked the Load_Cycle_Count with:
/dev/hda
smartctl -d ata -a
Currently the count is up to 1195740! So either I have the most durable drive ever created or this thing is going to explode soon. Does anybody have any suggestions on this? I don't know much about acpi.
Wasn't it HP that refused to fix somebody's laptop hinge because they were running Linux?
Ah, here it is -- sticky keys, not broken hinge, but still. You might want to give that cute gal in Canada a call back.
Slightly disreputable, albeit gregarious
Mine hasnt died, but i did notce that it will loudly park out of the blue every so often while im using it. ( with kubuntu, so they didnt make any changes )
Time to try the fix, once the site comes back up from oblivion.
---- Booth was a patriot ----
preferences -> homepage -> uncheck crappy authors
I have Zonk unchecked. Forget why.
evil adrian
I see a similar issue with my new WD10EACS (1 TB Western Digital "Green Power") desktop drive:
/dev/sda /dev/sda:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 582
193 Load_Cycle_Count 0x0032 180 180 000 Old_age Always - 62848
I don't know the drive's rating for Load_Cycle_Count, but the scaled SMART attribute has gone down from 181 yesterday to 180 today so it does seem to be burning through its allocated cycles quite rapidly.
Interestingly, this drive does not appear to support the "hdparm -B 255" command:
mythtv:~# hdparm -B 255
setting Advanced Power Management level to disabled
HDIO_DRIVE_CMD failed: Input/output error
"hdparm -I" lists "Power Management feature set" and "Automatic Acoustic Management feature set", but not "Advanced Power Management feature set".
The system is running Debian Etch with a 2.6.23 kernel, and I'm using hdparm version 7.7. I am not using any "laptop mode" settings (at least, none that I can see).
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.
Is that a button only for subscribers or somthing ?
I can't find the Uncheck Crappy Authors option.
Wanna fight ? Bend over, stick your head up your ass, and fight for air.
It's already been posted, but apparently no one's reading it
/etc/acpi/power.sh. The relevant sections are:
... /dev/$drive 2>/dev/null /dev/$drive 2>/dev/null
/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.
=====================
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
function laptop_mode_enable {
$HDPARM -S $SPINDOWN_TIME
$HDPARM -B 1
}
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
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.....
Sorry - forgot the link!
http://mjg59.livejournal.com/77672.html
Senior NCO in the fight against entropy. I've seen things, man. Things no one should have to see.....
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.
This is a well-known performance-killer (imagine a newspool), so disks should be mount'd with the `noatime` and `nodiratime` options if at all possible. This can be done automagically by replacing 'defaults' with 'noatime,nodiratime' in
proposed new autotag for all kdawson stuff.
Engineering is the art of compromise.
- 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. Before you ask, it is only one line, as you only press enter onceThis shows on all three laptops that the load counts increases by 1 to 4 every minute.
Now I issued:
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:
did prevent any more load/unload cycles from happening.So in summary:
Doesn't compare to what Video did... the scene at the Radio Star's apartment was BRUTAL.
You are assuming that the raw numbers (142886 and 143016) are actual counts of head unparks. they may not be. It is very common for laptop drives to spit out uncalibrated numbers (e.g. my laptop claims to unpark the heads 80,000 times a second, which physically isn't possible and would wear out the disk (if the highly dubious 600,000 figure is correct) in under a minute)
far more useful in SMART are the VALUE WORST THRESH and TYPE columns. Since Load_Cycle_Count is an Old_age value, and the THRESH is 0, it means that it starts at 100 and goes down as the drive ages. When it reaches 0 it means the drive manufacturer believes that is roughly equivalent to the useful duty life of the drive.
Currently yours is on 86, so it's actually only down 14%, which gives you nearly 3 more years of likely life from it. That is about typical of modern laptops afaics.
A far more useful test here would be to run the same test on Ubuntu and Windows on the same hardware (there is a smartctl port at http://hdparm-win32.dyndns.org/hdparm/ )
Given that Ubuntu does not change the disk power management settings in your BIOS and/or hard disk firmware, the only variable here is whether or not Windows overrides those settings with more or less conservative values than the existing defaults (and of course it's possible that your OEM pre-installs with other settings than Windows would natively choose on a vanilla install).
For all of the screaming and wailing about Ubuntu killing disks I have not seen a single post anywhere where anyone has posted any kind of hard data that Ubuntu is behaving in any way differently to other operating systems. Ergo this is still very very much unproven - unless anyone can link to something that says otherwise?
Cheers,
Chris "Ng" Jones
cmsj@tenshu.net
www.tenshu.net
I did that test. Ubuntu 3 or 4 load/unload cycles per minute. Tried every hdparm setting I could think of without any visible effect.
Windows (2000 professional), normally around one load/unload cycle every 3 minutes or so. Sometimes it seems to go to sleep completly and does not load/unload for a long time until I resume use.
The Windows behavior is more or less reasonable and will extend my HDD life at least for a few more years. Ubuntu's behavior is a killer and I cannot tolerate it.
I have the feeling, but cannot confirm, that the problem with ubuntu is not excesive parking per se but that it unparks the head almost imediatly after parking like if something in the OS was accesing the HDD inmediatly after parking (my HDD was mounted -noatime so atime was not the culprit)
Please post the outputs of your testing to the bug on launchpad so the relevant developers can assess the results.
Chris "Ng" Jones
cmsj@tenshu.net
www.tenshu.net
This isn't just Ubuntu, I just fired up my 5-year-old laptop with Debian from 2 years ago installed on it (haven't used it in 2 years) and smartctl gives me 184,305 load cycles in 2179 power on hours. The hard drive clicks every 30 seconds or so when idle (I noticed it before but assumed it was something messing around with the disk). hdparm -B 254 /dev/hda stops it from going up any more.
but there is more, power mode status
and of course spindown timer So there is a middle ground, if your drive supports it, hdparm -I will also yeild some interesting information about what features the drive will support. Just turning the power management off seems like a bit of a knee jerk reaction, especially when adjusting the amount of power management applied to the drive should deliver both i.e hdparm -B 196 YMMV.I would have thought that spindown timer would be more relevant to apply, one other thing I've never found hard drives tuned to thier maximum throughput in a linux installation (I mainly use Fedora) so an investigation of the udma modes your drive will support may be a worthwhile investment in time see hdparm -X _some_number_here_ (RTFM - first) considering just about everything goes better when you do tune it right.
My ism, it's full of beliefs.