Stories
Slash Boxes
Comments
typodupeerror delete not in

Comments: 271 +-   Ubuntu's Laptop Killing Bug Fixed on Saturday January 17 2009, @07:38PM

Posted by kdawson on Saturday January 17 2009, @07:38PM
from the safe-power-saving dept.
bug
software
linux
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!"
story

Related Stories

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
More
Loading... please wait.
  • Flamebait story (Score:4, Interesting)

    by laddiebuck (868690) on Saturday January 17 2009, @07:39PM (#26501799)
    Considering this was a fault of the manufacturers, this story is pure and total flamebait. Just don't bother feeding the trolls; don't reply.
    • by Anonymous Coward on Saturday January 17 2009, @07:46PM (#26501841)

      Okay

    • Que the stories of laptop hard drives failing before their time and rebuttals and blame shifting from about 200 people, mingled with "in soviet Russia, hard drive crashes you!" jokes and ordered lists that feature question marks and profit.

      Oh, and probably a hot grits joke or two.
      • 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.

      • by laddiebuck (868690) on Saturday January 17 2009, @09:07PM (#26502397)
        Obviously. But the story's still flamebait. Want a non-flamebait title? "Ubuntu Workaround for Laptop-Killing BIOS Bug Released". See the difference? Subtle but important.
        • 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".

      • by zullnero (833754) on Saturday January 17 2009, @09:42PM (#26502575) Homepage
        How can this be modded "insightful"? When systems break down that run other OS's, the hardware or drivers are typically blamed. That's fair territory. But when it's Linux, the double standard kicks in and it's the OS's fault? If the hardware manufacturers aren't supplying proper workarounds or fixes, or aren't even providing the source for their BIOS/Drivers/whatever to the folks who are apparently now expected to fix it, then how the hell are they supposed to make it all work? Magic wands? Insightful my ass. I'd mod this "ignorant".
        • 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.

          • 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

  • by Creepy Crawler (680178) on Saturday January 17 2009, @07:52PM (#26501887)

    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..

    • by friedman101 (618627) on Saturday January 17 2009, @08:07PM (#26502017)
      I never begrudged Ubuntu (or Linux in general) for having a bug related to a problem that was largely the fault of the hardware manufacturer. What did piss me off, however, was the fact that a bug that affected most new laptops and threatened to shorten their lifetimes dramatically wasn't plastered all over ubuntu.com in huge red font. We'd have never given Microsoft this much leeway.
      • by Creepy Crawler (680178) on Saturday January 17 2009, @08:34PM (#26502199)

        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?

        • by Anonymous Coward on Sunday January 18 2009, @12:01AM (#26503419)

          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.

    • Re: (Score:3, Informative)

      Yea, my ASUS g1sn has a BIOS bug that ASUS won't be fixing in the forseeable future, where it maps memory addresses wrong so if I get all 4GB of RAM in here, I can't install my nVidia drivers in Linux (it works in Windows, but Linux trusts the computer more).

      Really makes you wish hardware manufacturers would step it up.
        • by Creepy Crawler (680178) on Saturday January 17 2009, @09:08PM (#26502401)

          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.

    • 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

  • by Nicopa (87617) <nick@r e l oco.com.ar> on Saturday January 17 2009, @08:11PM (#26502055)

    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.

  • misleading (Score:5, Insightful)

    by bytor4232 (304582) on Saturday January 17 2009, @08:15PM (#26502089) Homepage Journal

    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)

      Hard drives are cheap

      While that may be true, my time isn't. Getting the lappy set up and restored from backup > 0.

  • hmm. (Score:5, Insightful)

    by buddyglass (925859) on Saturday January 17 2009, @08:20PM (#26502117)
    Does it bother anyone that Ubuntu, the community's duly annointed challenger to Microsoft hegemony, had an outstanding bug for fourteen months whose effect was to damage hardware? That's pretty terrible.
    • Re:hmm. (Score:5, Funny)

      by Anonymous Coward on Saturday January 17 2009, @08:42PM (#26502243)

      yeah, that's pretty bad. You have to give points to M$ here because they typically don't let things like this happen.

    • Re:hmm. (Score:5, Insightful)

      by ConceptJunkie (24823) on Saturday January 17 2009, @08:49PM (#26502291) Homepage Journal

      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.

  • laptop != hard drive (Score:4, Informative)

    by Gothmolly (148874) on Saturday January 17 2009, @10:03PM (#26502719)

    Oh wait, it's kdawson.

    It shortens the life of your HD, not the laptop itself, you chimp.

  • by spitzak (4019) on Sunday January 18 2009, @12:37AM (#26503613) Homepage

    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.

    • by spitzak (4019) on Sunday January 18 2009, @01:55AM (#26503955) Homepage
      FIX UBUNTU HARD DISK CYCLING HOW-TO:

      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 /etc/laptop-mode/laptop-mode.conf, where you can individually set it on/off for battery, ac, and when the lid is closed. Change them all to zero there if you are worried. It works fine on my machine, however, and the battery lasts far longer now.

      1. Edit /etc/laptop-mode/laptop-mode.conf and change correct line to read: CONTROL_HD_POWERMGMT=1 (this makes laptop_mode call hdparm)

      2. Edit /etc/default/acpi-support and change correct line to read: ENABLE_LAPTOP_MODE=true (this makes power.sh run)

      3. Edit /etc/acpi/power.sh
      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 /etc/pm/power.d/laptop-tools and make it read "exit 0" and then "chmod +x" it. (this stops suspend/resume from messing with hdparm settings)

      5. Create /etc/pm/sleep.d/10laptop_mode_restart and make it contain the following:

      #!/bin/bash
      case $1 in
          hibernate)
              /etc/init.d/laptop-mode stop
              ;;
          suspend)
              /etc/init.d/laptop-mode stop
              ;;
          thaw)
              /etc/init.d/laptop-mode start
              ;;
          resume)
              /etc/init.d/laptop-mode start
              ;;
          *)
              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 /dev/sda | grep "Adv"

      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 /dev/sda | grep Load_Cycle_Count

      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.
    • 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)

      by msuarezalvarez (667058) on Saturday January 17 2009, @08:26PM (#26502153)
      Fedora 9 and 10 click pretty much as much...
    • That's GNU/Linux. Or did you mean some other Linux?
    • Re:Only Ubuntu? (Score:4, Insightful)

      by Erpo (237853) on Saturday January 17 2009, @09:32PM (#26502515)

      (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.

      • 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

    • by je ne sais quoi (987177) on Saturday January 17 2009, @08:37PM (#26502221)
      Trolling again on slashdot are we Mr. Gates? If you had been paying attention, you would have known about it, since it was all [digg.com] over [wordpress.com] the internet [ubuntuforums.org] when it happened.
    • 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...

    • by CustomDesigned (250089) on Saturday January 17 2009, @09:09PM (#26502405) Homepage Journal

      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).

        • 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

COBOL is for morons. -- E.W. Dijkstra