Slashdot Mirror


Ubuntu's Laptop Killing Bug Fixed

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!"

38 of 271 comments (clear)

  1. Flamebait story by laddiebuck · · Score: 4, Interesting

    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.

    1. Re:Flamebait story by Anonymous Coward · · Score: 4, Funny

      Okay

  2. As per "Flamebait Story" by Creepy+Crawler · · 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..

    --
    1. Re:As per "Flamebait Story" by friedman101 · · Score: 5, Insightful

      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.

    2. Re:As per "Flamebait Story" by Creepy+Crawler · · 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?

      --
    3. Re:As per "Flamebait Story" by jadedoto · · 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.

    4. Re:As per "Flamebait Story" by Creepy+Crawler · · 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.

      --
    5. Re:As per "Flamebait Story" by Anonymous Coward · · 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.

    6. Re:As per "Flamebait Story" by dswensen · · Score: 3, Funny

      Wrong.

      I totally agree.

  3. Re:Ubuntu bug development by Ethanol-fueled · · Score: 4, Funny

    Marcus smokes all of the crack in the walls and goes on a rampage after discovering a bug in his OS causes his laptop to die.

    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 by the pool's drain.

  4. Re:It was not a bug! by CarpetShark · · Score: 4, Funny

    Those laptops were using ReiserFS.

    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.

  5. No need to enable "proposed" updates by Nicopa · · 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.

    1. Re:No need to enable "proposed" updates by plaiddragon · · 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.

      --
      * * * --they cant all be your best, that would be confusing
    2. Re:No need to enable "proposed" updates by youngerpants · · Score: 5, Funny

      Real men run as root.

      Hey, why's my mouse moving all by itself?

    3. Re:No need to enable "proposed" updates by BronsCon · · Score: 5, Informative

      sudo apt-get update && sudo apt-get install acpi-support

      That's better

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    4. Re:No need to enable "proposed" updates by Anonymous Coward · · Score: 3, Funny

      Real men don't use a GUI, you n00b.

  6. misleading by bytor4232 · · Score: 4, 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.

    --
    -- 4 8 15 16 23 42
  7. Re:Agreed by Anonymous Coward · · Score: 5, Funny

    And don't forget to queue the spelling/grammar Nazi's.

    And don't forget to cue the spelling/grammar Nazis.

    Fixed it for ya.

  8. hmm. by buddyglass · · Score: 5, Insightful

    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.

    1. Re:hmm. by Anonymous Coward · · 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.

    2. Re:hmm. by ConceptJunkie · · Score: 4, 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.

      --
      You are in a maze of twisty little passages, all alike.
  9. Re:Only Ubuntu? by msuarezalvarez · · Score: 4, Informative

    Fedora 9 and 10 click pretty much as much...

  10. Re:More Linux Zealotry by je+ne+sais+quoi · · Score: 3, Informative

    Trolling again on slashdot are we Mr. Gates? If you had been paying attention, you would have known about it, since it was all over the internet when it happened.

    --
    Gentlemen! You can't fight in here, this is the war room!
  11. Re:More Linux Zealotry by Anonymous Coward · · Score: 4, Insightful

    For something that was all over the internet, it took an awfully long time to fix.

  12. Re:Only for who think the world has to be perfect by im_thatoneguy · · 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.

  13. Re:Ubuntu bug development by hack++slash · · Score: 4, Funny

    "transanally disemboweled"

    Eww! Eww! Eww!

    Eeeeewwwww!!





    Ewwww!

    --
    To do something right, you often have to roll up your sleeves and get busy.
  14. Re:Only for who think the world has to be perfect by laddiebuck · · Score: 5, Insightful

    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.

  15. Actually it is M$ fault by CustomDesigned · · Score: 4, 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).

  16. Re:Only Ubuntu? by Erpo · · Score: 3, 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.

  17. Re:Only for who think the world has to be perfect by zullnero · · Score: 4, Insightful

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

  18. Re:Only Ubuntu? by markdavis · · 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 better, too.

    The practice of generally substituting the word "Ubuntu" for "Linux" in postings, comments, stories, etc, is not only annoying, it is insulting to the many thousands of people who have contributed to Linux (GNU/Linux) and all the non-Ubuntu distributions.

  19. laptop != hard drive by Gothmolly · · Score: 3, Informative

    Oh wait, it's kdawson.

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

    --
    I want to delete my account but Slashdot doesn't allow it.
  20. Re:Only for who think the world has to be perfect by blazerw · · 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".

  21. Re:Only for who think the world has to be perfect by AigariusDebian · · 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.

  22. This was not very good, Ubuntu by spitzak · · Score: 4, 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.

    1. Re:This was not very good, Ubuntu by spitzak · · Score: 5, Informative

      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.

  23. Re:Agreed by aynoknman · · Score: 3, Funny

    And don't forget to queue the spelling/grammar Nazi's.

    And don't forget to cue the spelling/grammar Nazis.

    Fixed it for ya.

    Fixed it for you.

    There, I fixed it for you.

    --
    We need a "+1 -- nice sig" moderation.
  24. Re:Only for who think the world has to be perfect by cjb658 · · Score: 3, 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.