Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Bug Power Red Hat Software Linux

Linux Kernel Power Bug Is Fixed 145

An anonymous reader writes "The Linux kernel power bug that caused high power usage for many Intel Linux systems has finally been addressed. Matthew Garrett of Red Hat has devised a solution for the ASPM Linux power problem by mimicking Microsoft Windows' power behavior in the Linux kernel. A patch is on LKML for this solution to finally restore the battery life under Linux."
This discussion has been archived. No new comments can be posted.

Linux Kernel Power Bug Is Fixed

Comments Filter:
  • Re:Good News (Score:5, Informative)

    by Teun ( 17872 ) on Friday November 11, 2011 @05:36PM (#38029500)
    Why?

    Canonical is regularly doing kernel upgrades without upgrading the whole distro, this one is a major issue for a lot of people.

  • Re:Good News (Score:4, Informative)

    by UnknowingFool ( 672806 ) on Friday November 11, 2011 @05:43PM (#38029582)
    Yes it's not like Apple contributes to open source code [wikipedia.org] at [wikipedia.org] all [wikipedia.org].
  • Re:Good News (Score:5, Informative)

    by greg1104 ( 461138 ) <gsmith@gregsmith.com> on Friday November 11, 2011 @05:51PM (#38029676) Homepage

    That's a wrong impression given by a poorly written article summary. If you read the patch submission, the only involvement of Windows here was using a presentation about their OS as a way to clarify the minimal documentation about this area. Nothing was copied from Windows.

  • Re:overblown (Score:5, Informative)

    by greg1104 ( 461138 ) <gsmith@gregsmith.com> on Friday November 11, 2011 @05:55PM (#38029730) Homepage

    Reporting was a bit sensationalist, but the problem was both real and significant. I don't doubt the 14 to 36% regression they're reporting on exists, and is about that large.

  • by WaffleMonster ( 969671 ) on Friday November 11, 2011 @06:07PM (#38029862)

    The onboard intel nic on my intel motherboard randomly disappears with ASPM enabled due I think to a hardware issue.

    For me it is pcie_aspm=off or all hell breaks loose.

  • Don't feed the troll (Score:5, Informative)

    by mcover ( 1653873 ) on Friday November 11, 2011 @06:17PM (#38029946)

    This is making Linux look bad without reason. Before the whole "Linux Power Regression" coming up and being advertised as a problem by Phoronix, I did enjoy reading the occasional article (Benchmarks, etc.) by Phoronix, but after this whole thing I have lost complete respect for Phoronix.

    It's not a Linux bug but BIOS misbehaving. Linux is simply playing it safe.

    Summary: http://www.fewt.com/2011/09/about-kernel-30-power-regression-myth.html [fewt.com] (been posted before in older threads)

  • Re:Good News (Score:5, Informative)

    by fuzzyfuzzyfungus ( 1223518 ) on Friday November 11, 2011 @06:23PM (#38030036) Journal

    It's funny they had to fix it by copying the method from Windows though.

    Unfortunately (as is too often the case) the "bug" was an interaction between the linux kernel and the absolutely fucked state of the BIOS in general, and ACPI in particular.

    Because not all boards support PCIe Active State Power Management(a part of the PCIe spec that provides for powering down an unused link to save power), and bad things can happen if you try to use it on a board that doesn't, a board that does support it is supposed to advertise that fact. In practice, a large swath of boards where it works just fine were failing to declare that. The Linux Kernel obligingly didn't try to use it(unless ASPM=force was used). Since what is supposed to happen apparently usually doesn't, they've had to examine the mechanism used by Windows systems to infer whether or no ASPM is good to go, reasoning that vendors are unlikely to ship BIOSes where the Windows default behavior causes horrible things to happen.

    ACPI is a bit of a problem child...

  • Re:Good News (Score:5, Informative)

    by fuzzyfuzzyfungus ( 1223518 ) on Friday November 11, 2011 @07:26PM (#38030678) Journal
    More specifically, the power management mechanism in question(PCIe ASPM) requires, broadly speaking, two different components:

    1. You need to detect boards that are capable of it, so that you don't try to shut down idle links in a system where that could cause crashes, losing touch with peripherals, or other havoc.

    2. You need the actual logic for detecting idle PCIe links, and the appropriate driver support and so on for instructing the PCIe controller(s) to change link power states.

    Part two is the bulk of the matter, and it already worked for some time now, if your board declared ASPM support or if you used ASPM force. Part one is comparatively simple; but the approach that Linux previously used was hobbled by the fact that boards frequently don't declare ASPM support even when they have it; but enough boards don't that just defaulting to force would be risky. To deal with this, the latest patch adds the heuristics that Windows uses to detect ASPM, since the method that is supposed to work frequently doesn't, but vendors aren't going to ship gear that doesn't support Windows...
  • by steevven1 ( 1045978 ) on Friday November 11, 2011 @07:51PM (#38030872) Homepage
    Doesn't look like this will fix the much larger power issue with the Sandy Bridge processors, which is related to the graphics driver :-/ https://bugs.launchpad.net/ubuntu/+source/linux/+bug/818830 [launchpad.net]
  • by chrb ( 1083577 ) on Friday November 11, 2011 @08:10PM (#38031050)
    Possibly already fixed: "Some drivers (e.g. the e1000 network driver) have already switched off the ASPM where the PCI-E v1.1 feature is known to not work" Phoronix [phoronix.com] If not, report it and that driver will get ASPM blacklisted.
  • Re:Good News (Score:5, Informative)

    by DarwinSurvivor ( 1752106 ) on Friday November 11, 2011 @10:28PM (#38032000)
    It's not poorly documented. It is poorly implemented by most hardware manufacturers. The OS is supposed to be able to query the system and ask if it supports the power saving features, but most hardware just ignores it (making it appear as though it doesn't). From what I understand, Microsoft no longer asks if it supports it, it simply asks "what are you" and then looks it up in an internal database to see if it's compatible. It's a *VERY* ugly hack, but unfortunately it appears to be the only way to fix it because hardware manufacturers are lazy.
  • Re:Good News (Score:2, Informative)

    by Alex Belits ( 437 ) * on Saturday November 12, 2011 @12:26PM (#38035096) Homepage

    The patch imitates a nonstandard behavior -- if it sees BIOS claiming that ASPM is disabled, it leaves devices in whatever state BIOS left it instead of following what BIOS claims about device. This is certainly a bug in BIOS, and possibly a bug in Windows that happened to cancel the BIOS bug. However very likely that incompetent hardware or BIOS vendors (I am pretty sure, it's a certain company known as "the largest BIOS vendor") first produced wrong BIOS behavior, and Microsoft seized the opportunity to exploit it instead of reporting the bug, so now buggy BIOS behavior is a de-facto standard, even though actual ACPI standard says otherwise.

    Please note that this is just one more link in a very long chain of "bug for bug compatibility" implementation that ACPI support turned into. For example, Linux now identifies itself as Windows Vista (!!!) in ACPI scripts just to avoid broken tables that are given to it if it identifies itself as Linux. How the Hell any OS-dependent things ended up in the supposedly platform-independent ACPI standard in the first place, is a separate question, and very likely the answer is this: http://antitrust.slated.org/www.iowaconsumercase.org/011607/3000/PX03020.pdf [slated.org]

Math is like love -- a simple idea but it can get complicated. -- R. Drabek

Working...