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

15 of 271 comments (clear)

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

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

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

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

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

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

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