Slashdot Log In
Ubuntu's Laptop Killing Bug Fixed
Posted by
kdawson
on Sat Jan 17, 2009 07:38 PM
from the safe-power-saving dept.
from the safe-power-saving dept.
jeevesbond writes "Back in October of 2007 we discussed a bug that would dramatically shorten the life of laptops using Ubuntu. Ubuntu users will be glad to know that a fix has finally been released for Ubuntu versions 9.04, 8.10 and 8.04 (LTS). However, as this fix is not yet in the update repositories, anyone wishing to test it should follow these instructions for enabling the 'proposed' repository. Report your results on the original bug report. Happy testing!"
Related Stories
[+]
Hardware: Ubuntu May Be Killing Your Laptop's Hard Drive 419 comments
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."
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
Flamebait story (Score:4, Interesting)
Re:Flamebait story (Score:4, Funny)
Okay
Parent
Agreed (Score:3, Funny)
Oh, and probably a hot grits joke or two.
Re:Agreed (Score:5, Funny)
And don't forget to cue the spelling/grammar Nazis.
Fixed it for ya.
Parent
Or you could que the queue of spelling/grammar... (Score:3, Funny)
Depends on if he wants to give them a hint, or have them form a line.
Re: (Score:3, Funny)
And don't forget to cue the spelling/grammar Nazis.
Fixed it for ya.
Fixed it for you.
There, I fixed it for you.
Re: (Score:3, Funny)
Re:Only for who think the world has to be perfect (Score:5, Funny)
If you can't handle non-perfect hardware or firmware, then you don't make operating systems.
I don't know, quite a few companies in the past have made a pretty successful run of it.
Parent
Re:Only for who think the world has to be perfect (Score:5, Insightful)
Parent
Re: (Score:3, Insightful)
"Ubuntu Workaround for Laptop-Killing BIOS Bug Released"
That title's not quite right. The bug points to a workaround that has existed since the bug was initially reported. Maybe this title: "With new update, Ubuntu make Laptop-Killing BIOS bug workaround automatic".
Re:Only for who think the world has to be perfect (Score:4, Informative)
Hard drives have "recommended" power-saving values specified in their firmware that say after x minutes of idle time, power me down! Ubuntu used these values.
It turns out these default values were way too low (1-5 minutes), so drives would power off and on very frequently, which shortened their lives.
Parent
Re:Only for who think the world has to be perfect (Score:4, Insightful)
Parent
Re:Only for who think the world has to be perfect (Score:5, Informative)
The funny thing is that the actul bug is an urban myth. People claim that once your hard drive reaches 300k parks it will fail. Note that at the start they were claiming the number to be 100k and now are claiming 600k due to the simple fact that a huge number of people showed up with the number being well over million on perfectly functioning drives.
The drives parked heads when not in use, sometimes, several times a minute, some of them clicked when they did so. It is a feature that reduces power use and protects the hard drive from sudden movement and impacts. It is NOT a bug.
All the claims that it will make you hard drive fail in a year are false and are made by people that have no a slightest clue of hard drive design.
Parent
Re: (Score:3, Insightful)
Except that's bullshit.
1) Make any claim on slashdot that a program or piece of hardware doesn't work on windows.
2) Watch as apologists claim that it's not windows fault but bad drivers or bad application.
3) Watch as how people make similar claim about Linux and suddenly the blame is placed squarely on Linux.
There was a news story last week "Ubuntu made women quit online classes" or some similar title, where a women ordered an Ubuntu laptop, didn't even try it out and the news station she got in contact wit
As per "Flamebait Story" (Score:5, Insightful)
Well, one can squarely blame the HD manufacturers (look at the Seagate disaster) and say they need to fix their hardware.
However, when your stuff doesnt work, regardless who's fault it is, it's still broken. And in cases like Ubuntu vs Windows: it'll work in Windows and not work in Ubuntu. Who do you think the user will fault?
ObUserStory: I bought a T61 Thinkpad. Worked fine in Windows, and not so well in Ubuntu. What didnt work? The right side USB ports. If I was a regular user, I'd remove Ubuntu and put Windows back on. However, Im stubborn... and know that Linux shouldnt go disabling ports at seemingly random. Turns out, it was a ACPI bios bug that did so :( So a BIOS update did the trick and fixed everything.
So yes, it may be a manufacturers fault, but that's not where the blame gets placed all the time..
Re:As per "Flamebait Story" (Score:5, Insightful)
Parent
Re:As per "Flamebait Story" (Score:5, Insightful)
As per defense of Ubuntu and others, the e1000 module was blacklisted until a proper kernel patch could be applied to all versions.
Without the blacklist, the e1000 firmware could be overwritten. Intel provided no safeguards to prevent said occurrence, so destruction of hardware was imminent. Far as I can tell, the Windows driver still has this bug.
And I remember the Mandrake CD-drive killer sequence. Samne damn problem: unguarded firmware update commands. Instead, these commands are legit commands, but were re-used as a firmware update.
Now, how much of these drive killer and card killer commands are also on Windows, but we suspect them as other occurrences, like ESD, lightning, or power surges?
Parent
Re:As per "Flamebait Story" (Score:4, Informative)
You would find this out due to returns. There really are only a handful of laptop manufacturers who sell to the OEM brands you know (Dell, HP, etc). If a model has a component failing at a higher rate than normal, the OEM/ODM will begin investigating what is going wrong.
In the case of Windows, we are also able to correlate crash information to drivers and hardware, and determine problems this way.
I work for Microsoft as a technical account manager (TAM) - and work with OEM/OEM/IHV communities on issues like this. There are *many* patches to Windows which include workarounds for hardware issues - something that is both good and bad. Good because an end user is less likely to get screwed; bad because vendors who tend to make crap hardware stay in business.
Parent
Re: (Score:3, Informative)
Really makes you wish hardware manufacturers would step it up.
Re:As per "Flamebait Story" (Score:5, Insightful)
Wrong.
When using Windows as an example, the developers do not understand how Windows works. They only can understand by extensive testing in their labs. Linux, on the other hand, can identify what piece of code the offense is made, and fix it.
The collection of bugs in Windows makes it that much harder when there's a bluescreen, general hardware crash, or other really bad things. As far as we know, these bugs that exist in Ubuntu, Mandrake and others still exist as some sort of weird failure domain of certain celestial events on Windows. When they happen, there's hundreds of environmental variables set to trigger the device_killer.
Parent
Re:As per "Flamebait Story" (Score:4, Funny)
Wrong.
I totally agree.
Parent
Re: (Score:3, Insightful)
Here's another way to phrase that:
However, when you attribute blame to a faultless party, regardless of whether you have a legitimate beef, you're just an uneducated whinging windbag.
I've never understood why false blame is regarded as an inalienable force of nature. I recall from my grade three classroom the glee that ensued whenever anybody cut a ripe one at the amazing ease of hanging the blame on any arbitrary person remotely in the upwind quadrant. You just had to be first at putting forward an arbitrary name. "Hey, Marvin, you didn't!" and Marvin would have to be very quick to deflect the hot potato.
We learn the social rules surrounding this gam
No need to enable "proposed" updates (Score:5, Informative)
The fix is already included in the accepted updates:
acpi-support (0.114-0intrepid1) intrepid-proposed; urgency=low
* {ac,battery,resume,start}.d/90-hdparm.sh: don't just check whether
laptop-mode is configured to control the drives, also check whether
laptop-mode itself is *enabled*. Finally closes LP: #59695.
-- Steve Langasek Mon, 05 Jan 2009 10:50:10 +0000
Just run apt-get update && apt-get install acpi-support.
Re:No need to enable "proposed" updates (Score:5, Funny)
Just run apt-get update && apt-get install acpi-support.
What? apt-get it yourself.
sudo apt-get update && apt-get install acpi-support.
Okay.
Parent
Re:No need to enable "proposed" updates (Score:5, Funny)
Real men run as root.
Hey, why's my mouse moving all by itself?
Parent
Re: (Score:3, Funny)
Real men don't use a GUI, you n00b.
Re:No need to enable "proposed" updates (Score:5, Informative)
sudo apt-get update && sudo apt-get install acpi-support
That's better
Parent
misleading (Score:5, Insightful)
The title and article summary is misleading. It shortens the life of the hard drive, not the laptop itself. Hard drives are cheap, and on most laptops as easy to swap out as the battery with screwdriver in hand.
Its not like Ubuntu is killing the motherboard or screen, its the Hard Drive.
Re: (Score:3, Insightful)
While that may be true, my time isn't. Getting the lappy set up and restored from backup > 0.
hmm. (Score:5, Insightful)
Re:hmm. (Score:5, Funny)
yeah, that's pretty bad. You have to give points to M$ here because they typically don't let things like this happen.
Parent
Re:hmm. (Score:5, Insightful)
When Ubuntu is competing against an OS which has been a vector for millions of computers to be compromised over the last 10+ years and has caused untold billions of dollars of damage and wasted billions of hours of people's time, I think it's not a bad track record.
Parent
laptop != hard drive (Score:4, Informative)
Oh wait, it's kdawson.
It shortens the life of your HD, not the laptop itself, you chimp.
This was not very good, Ubuntu (Score:5, Informative)
I followed the instructions on Ubuntu's forums (what a pain to locate the actual instructions) (I transcribed what I did and will post them).
The actual problem was that manufactures have messed with their drives and altered the head parking timeout into a "detect if windows went to sleep" method. Basically Windows writes to the disk *all the time* until it sleeps, so the best way to minimize disk use is to park the head almost instantly after any inactivity, as that will park it asap when it sleeps. Furthermore at least 2 manufactures used the timeout control as <= 195 == "on" and >195 == "off".
Ubuntu/Linux wrote a lot less often, but plenty anyway, like every 15 seconds (doing stupid stuff like writing log files). So the head unparked every 15 seconds.
The fact that Windows "worked" led a lot of people to think Windows was doing secret messing with the drives to turn on extra modes that were not in the documentation, and that Ubuntu could not be fixed until this secret was found. However I think somebody could have figured out that it was not doing anything, there were programs (ported from Ubuntu, apparently!) for reading the disk settings under Windows.
It was also known immediatly that setting the disk timeout to 255 stopped this. Who cares if this was not the "secret Windows setting", it was certainly better than how Ubuntu was working at that time. This was known the same day the bug was first talked about! Ubuntu should have immediatly patched it, but somehow the fact that this was not "ideal" caused them to delay for 14 months! That is really bad, guys! I "fixed" mine as best I could with a program I had to run every time I opened the lid (because some stupid startup thing kept turning the timeout back on, and the only way to run my program last was to manually run it!) I eventually decided to go through the hair of actually fixing it and killing off that other thing that tried to do it.
There seemed to be a bunch of conflicting programs, all of them trying to set the disk timeout to 128 or 2. You had to get *all* of them (see next posting for what I did). This is what made it Ubuntu-specific. I sure hope this patch straightens it out so exactly ONE service, and exactly ONE file in /etc, controls the disk timeout!
Yea you can blame Windows all you want, but this was really, really, bad!
And I sure hope the update (which I just did) did not get screwed up by trying to merge with all the changes I did. Have not really checked yet. What a PITA. If they had put out a patch immediatly then they would not have to patch systems that have a hundred different solutions on them.
Re:This was not very good, Ubuntu (Score:5, Informative)
The laptop_mode command does the right thing, so most of this is to get it called everywhere it needs to be, and to remove calls that mess with the hdparm settings and thus defeat laptop_mode. There are claims that "laptop mode" causes problems, but this does *not* enable it. The program "laptop_mode" does other stuff besides the problem part. That is controlled by a line in
1. Edit
2. Edit
3. Edit
Comment out or delete the 4 for...done loops containing $HDPARM commands. (this stops power-on from messing with the disks)
And change the arguments to $LAPTOP_MODE from start/stop to "auto" in both cases.
(this makes it run the laptop_mode command correctly rather than forcing the mode on and off)
4. Create
5. Create
#!/bin/bash
case $1 in
hibernate)
suspend)
thaw)
resume)
*)
echo Something is not right.
esac
Chmod +x this file (this makes suspend/resume run the laptop tools)
HOW TO TEST:
This command will tell you how your disk is set:
sudo hdparm -I
The correct results to stop disk thrashing are 254 or 255. When laptop_mode is *really* on then the correct value is 1. If you see 128 then things are not working, this is the setting the disk resets to on suspend/sleep/power off.
This command will tell you how bad you have trashed your disk (you may need to install "smartctl"):
sudo smartctl -a
The last number is how many times your disk has parked. Over 10,000 is not good. Mine is 101187 before I finally got this fixed.
Parent
Re: (Score:3, Funny)
Anti-climactic. What happens to those pesky cracks in the walls?
Re:Ubuntu bug development (Score:5, Funny)
He shoots everybody in the house before beginning an armed standoff with the SWAT team, then kills 3 cops(one in full riot gear) before a sniper in a police helicopter shoots the gun out of his hand. Stunned but unharmed, Marcus then slips and falls off the roof into his unkempt wading pool before he is transanally disemboweled [nih.gov] by the pool's drain.
Parent
Re:Ubuntu bug development (Score:5, Funny)
Eww! Eww! Eww!
Eeeeewwwww!!
Ewwww!
Parent
Re: (Score:3, Interesting)
Oh, silly me: http://hardware.slashdot.org/comments.pl?sid=344745&cid=21176921 [slashdot.org]
It is almost deja-vu!
Re:Only Ubuntu? (Score:5, Informative)
Parent
Re: (Score:3, Funny)
Re: (Score:3, Funny)
Re:Only Ubuntu? (Score:4, Insightful)
(Yes, believe it or not, there ARE other distros; although it is hard to tell since so many stories and postings say "Ubuntu" in place of the word "Linux" or "Linux distribution")
Isn't it great? I can't wait until the days of users asking, "So I should try Linux. Which distro should I use?" and getting useless or contradictory answers are long forgotten.
Parent
Re: (Score:3, Insightful)
Yes, choice, variety, and competition are horrible things aren't they? Certainly we should have all been stuck with only SLS Linux or perhaps only Redhat Linux..... hell, why even have Linux at all; why couldn't the status quo of MS-Windows or MS-DOS sufficed?
There were distros just as good (or better in different ways) before Ubuntu existed. There are distros just as good (or better in different ways) than Ubuntu now. There will probably be other distros later- maybe of which will be just as good or bet
Re:It was not a bug! (Score:5, Funny)
Ostensibly, yes. In reality, those laptops had been making much more use of ReiserFS's best friend. I heard they even planned to run off with him.
Parent
Re:More Linux Zealotry (Score:4, Informative)
Parent
Re:More Linux Zealotry (Score:4, Insightful)
Parent
Re: (Score:3, Insightful)
Reading the posts prior to yours, it seems like most people are saying that Ubuntu really should have fixed this or worked around it, and that there's no excuse.
But it's much easier to jump straight to the conclusion, isn't it? Facts do tend to get in the way...
Actually it is M$ fault (Score:5, Insightful)
well, in a way. The problem is that the drive makers optimized their power saving algorithms for Windows disk access patterns - as you would expect them to since it is 85% of the market. And they didn't provide knobs to twist for other OSes - including new, more efficient versions of Windows.
The irony is that Linux runs afoul of the hard drive power saving tuning because it is too efficient. The gaps between disk accesses are too long, and trigger a head unload while the OS is still active.
The best fix would be to twist a knob to adjust the inactivity timer - but that isn't available. So the simplest fix is to disable power saving on the disk - fine for laptops used as portable desktops. To keep drive power saving without unloading/loading the heads constantly, you have to configure "laptop mode", which uses memory to cache reads/collect writes so as to provide something like 30 minutes between disk accesses for typical word processing/browsing activities.
I've thought about writing a background process (in python or your favorite script language) that monitors iostat - and reads a raw sector every 9 seconds to keep the disk from thinking we are inactive. At the same time, we have our own Linux oriented inactivity timer, and stop reading the raw sectors when the system is truly inactive (other than our own reads).
Parent
Re: (Score:3, Informative)
I'll rephrase. Would you expect that XP or Vista be installable on your laptop? AKA the newest versions.
You actually reaffirmed my statement on laptop support! But you continue to rebuff the my statement? Curious.
Ubuntu is != Linux. Ubuntu is simply a distro. And no they have not been around that long. Release 4.10 was the first release of it. That's stands for Oct 2004. Also they don't actually support people for free. The community does. As you said given sufficient demand that laptop in questio