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."
Good News (Score:2)
Nice to hear this. Now to look for the ubuntu update.
Re: (Score:1)
Re: (Score:2, Insightful)
Re:Good News (Score:5, Funny)
The didn't copy it, they "mimicked" it!
Re:Good News (Score:5, Insightful)
It's funny they had to fix it by copying the method from Windows though.
Nothing funny here, if your hardware is optimized by the hardware manufacturer for windows, getting better performance from that hardware by mimicking windows behavior seems logical, if not controversial.
Re:Good News (Score:5, Insightful)
Re:Good News (Score:5, Insightful)
Re:Good News (Score:5, Informative)
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...
Re: (Score:3)
Re: (Score:1)
you just said that the patch add the heuristics that Windows uses to detect ASPM
He did, and he is wrong. What Matthew Garrett did was go through the Windows drivers as provided by the manufacturer, to see whether they {dis,en}abled ASPM.
Re: (Score:2, Informative)
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 e
Re: (Score:1)
The hardware only work on way. I don't see how any of this is Microsoft's fault. They just had bigger paid staff to look into every single board out there, or to tell the manufacturers look, do it this way and we will support your products. Who is going to say NO to 80% market share?
Comment removed (Score:5, Interesting)
Re: (Score:2)
Re: (Score:3)
Re: (Score:2)
What's the controversy? The [defective] hardware only works one way. It's just doing it the only one way that it works. You can't fault someone for going down the only path available.
I suspect Microsoft will do exactly that: Fault them with Lawyers, especially since they pretty much admitted they copied what Microsoft did.
Re: (Score:1, Flamebait)
I am thankful it was not 'copied' from Apple. Apple would've sued the whole linux/Linux/GNU/FOSS in South Korea, Germany, Japan and of course the US and would have asked to ban the import of, er, things.
Re:Good News (Score:4, Informative)
Re:Good News (Score:5, Insightful)
Yes, because contributing a few open source project gives you the right to employ VERY proprietary methods and approaches to the vast majority of what you do. Filling baseless patent suits is perfectly acceptable so long as you have at least one open source project.
Re: (Score:2)
Yes, they contribute, but not as much as you seem to imply. Apple is a company based in a very proprietary model, and that's hard to dispute.
Re: (Score:2)
WebKit is made up of KHTML code (which is now very little) and the parts that Apple added. Under the GPL, Apple is not required to release code that is not a derivative of the original code. But they open sourced everything they did. They were under no obligations to do this.
As for CUPS, they could have not done anything at all. Instead they bought it and kept it going. They were under no obligations to do either.
Yes, they contribute, but not as much as you seem to imply. Apple is a company based in a very proprietary model, and that's hard to dispute.
I would consider adding the majority of WebKit code as a lot. The problem is in your logi
Re: (Score:2)
As I understand it, WebKit is a derivative of KHTML, there is no way to gradually change the license. Now in WebKit there might be little from the original KHTML code, but of course the present KHTML is also very different from the one that Apple forked. Note that WebKit is now an open source project that receives contributions from many companies that are direct Apple rivals. If Apple was the starter of the WebKit name, was because they clearly failed to join an already stablished community of developers.
Re: (Score:2)
As I understand it, WebKit is a derivative of KHTML, there is no way to gradually change the license. Now in WebKit there might be little from the original KHTML code, but of course the present KHTML is also very different from the one that Apple forked.
Part of WebKit is derived from KHTML. Parts of WebKit have no origin from KHTML and were developed by Apple namely everything except JavaScriptCore and WebCore. The GPL and the LGPL does not specify that you must code all unrelated to the original under the GPL. Apple released all other parts under BSD which is not copyleft but more permissive.
Note that WebKit is now an open source project that receives contributions from many companies that are direct Apple rivals. If Apple was the starter of the WebKit name, was because they clearly failed to join an already stablished community of developers. It's not like is difficult to gain an account to access the KDE repositories (I have one, and just contributed very minor things) or the mailing lists.
Huh? Apple forked WebKit from KHTML and massively developed it to the point that other companies contribute to it. And you cite Apple for contributing too much t
Re: (Score:2)
Huh? Apple forked WebKit from KHTML and massively developed it to the point that other companies contribute to it. And you cite Apple for contributing too much to their own project? Do you also blame Mozilla for doing too much for FireFox?
What? Sorry, I don't understand what you mean, or what relation has with what you quoted.
And again my point is they are under no obligation to do any of this. They could have open sourced everything they have done and stopped development. A point you have never addressed.
I didn't address that because I never denied nor confirmed this. From the beggining I was only writing about the size of the contributions.
Again, you are replying to things I wasn't writing about. My point is mainly this: Apple contributed to WebKit, of course, but many people mistakenly see it as a project created solely by Apple, and developed only by Apple.
Re: (Score:2)
Re: (Score:2)
Your first point is rather disingenuous as Apple doesn't have to contribute to open source at all.
Wrong. If they release a product based on LGPL code, they have to release said LGPL code.
Apple is one of many individuals and 30 companies that contribute, but they contribute the bulk of work.
And wrong again [ofilabs.com].
Re: (Score:2)
Apple also only contributes to projects under licenses that bless proprietary forks. While there is nothing wrong with this, there is something wrong if such contributions amount to an attack on established copyleft projects. For example, webkit vs Gecko. LLVM vs GCC. Google does this too, intentionally wielding Apache license projects to weaken GPL projects. Worth meditating on the probability that "don't be evil" really means "unless it suits us". However. There is still a huge amount of value in contribu
Re: (Score:1)
Re:Good News (Score:4, Insightful)
Garrett was also in large part responsible for fixing a running problem [lwn.net] with booting on UEFI systems, particularly notebooks. (That wasn't the only patch that needed to be written, but it did provide the foundation. It's also one of the funniest developer commentaries for a patch I've ever seen.) I've seen his name attached to Linux development for a while, but it's only recently that I've come to understand just how much of the deep internal architecture he understands and has helped to fix.
Re:Good News (Score:5, Insightful)
I don't find it funny, just common sense. It sounds like ASPM is very poorly documented, so if Windows is doing a decent job of implementing the functionality, then reverse-engineering, or at least guessing at how Windows does it, seems like a valid approach.
Re:Good News (Score:5, Insightful)
I think it's more a case of the manufacturers supporting windows than the other way around. Of course Linux doesn't get that level of support because of the lower user base. Apple solves the problem by making their own hardware.
Re: (Score:1)
Re: (Score:2)
Really? When did Apple start making graphics cards, expansions cards, motherboards, etc.? As far as I'm aware they don't make any of the affected components, nor do they design or make the logic responsible for negotiating power.
Re: (Score:2)
Apple doesn't design the motherboards in their computers?
Re: (Score:2)
How much you want to bet that Apple gets ALL the specs for that hardware? They don't get the bullshit that linux developers have to tolerate. They've got the money to spend and the hardware vendors kiss their ass and build it to their (Apple's) specs not the other way around. Sure they don't actually manufacture it but you can bet they ain't buying it off the shelf.
Re:Good News (Score:5, Informative)
Re: (Score:2)
That's fascinating. It would be cooler if the protocols were rigorously followed, but things being as they are, that's still kind of neat. All kinds of fancy algorithms and 30+ years of moore's law, and fundamental aspects of modern computing technology still depend on simple lookup tables.
Re: (Score:2)
Fancy algorithms and moore's law mean nothing to Chinese factory workers and the cut-rate designers that keep them busy.
Re: (Score:2)
Re:Good News (Score:5, Informative)
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: (Score:3)
Don't confuse the issue by using facts.
Re: (Score:2)
If the firmware has given us control of PCIe capabilities then it's valid for an operating system to configure ASPM more aggressively than the firmware did. A small number of devices object to this and exhibit various failure modes. Windows provides a mechanism to disable ASPM in the driver, indicated by the Needs=PciASPMOptOut statement in the .inf
file. Trawling through Windows drivers has indicated the following set
of hardware that disables ASPM in Windows but doesn't currently disable
it in Linux. It makes sense for us to mimic Windows in this situation.
(V2: send the version that actually builds)
Matthew Garrett [lkml.org], these patches did get noticed by Phoronix [phoronix.com].
Re: (Score:2)
Yeah... hence the two links to phoronix in TFS...!
Re: (Score:1)
Re:Good News (Score:5, Informative)
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: (Score:2)
It's funny they had to fix it by copying the method from Windows though.
A number of motherboard manufacturers decided not to "advertise" that they supported ASPM and somehow MS knows of this before anyone else. I agree with the approach linux took: mimic Windows behavior to help locate the bug.
Re: (Score:2)
It's funny they had to fix it by copying the method from Windows though.
The issue is that essential documentation is kept secret from the public, shared by vendors only with Microsoft, most probably due to licensing/pricing pressure from Microsoft. Smells like yet another antitrust time bomb to me.
Re:Good News (Score:5, Informative)
Canonical is regularly doing kernel upgrades without upgrading the whole distro, this one is a major issue for a lot of people.
Re:MICROSOFT was behind this! (Score:5, Interesting)
Something like this perhaps?
http://groklaw.net/pdf/iowa/www.iowaconsumercase.org/011607/3000/PX03020.pdf [groklaw.net]
From: Bill Gates
Sent: Sunday, January 24, 1999 8:41 AM
To: Jeff Westorinon; Ben Fathi
Cc: Carl Stork; Nathan Myhrvold; Eric Rudder
Subject: ACPI extensions
One thing I find myself wondering about is whether we shouldn't try and make the "ACPI" extensions somehow Windows specific.
It seems unfortunate if we do this work and get our partners to do the work and the result is that Linux works great without having to do the work.
Maybe there is no way to avoid this problem but it does bother me.
Maybe we could define the APIs so that they work well with NT and not the others even if they are open.
Or maybe we could patent something related to this.
Re: (Score:2)
Re: (Score:1)
Per your request, I am here to report back: you can have 5-7 hours of battery time on a laptop with GNU/Linux.
You're welcome.
Re: (Score:2)
Per your request, I am here to report back: you can have 5-7 hours of battery time on a laptop with GNU/Linux.
You're welcome.
Somehow I doubt your sincerity.
Re: (Score:2)
Hey! This was just posted to slashdot, check it out:
Linux Kernel Power Bug Is Fixed http://linux.slashdot.org/story/11/11/11/2036245/linux-kernel-power-bug-is-fixed [slashdot.org]
It JUST so happens the bug has been fixed, in case you didn't know ;)
Re: (Score:2)
My Acer Aspire One [wikipedia.org] lasts that long running Ubuntu, with the 6 cell battery; rated life is 7 hours. I would like to have a fair comparison against a similar netbook design from Apple, but they don't have one.
Re: (Score:1)
I get 6 hours of battery life from a Lenovo T500 with the high capacity battery under Arch Linux.
overblown (Score:2, Insightful)
this "issue" seemed to be mostly a traffic-getting vehicle for phoronix.
Re:overblown (Score:5, Informative)
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.
Re: (Score:2)
Whether it's this or something else, I got much worse battery life with Linux on my laptop than with Windows.
Re: (Score:1)
What's wrong with Phoronix?
Re: (Score:2)
STEAM'S COMING TO LINUX!!!!!111 IT'S CONFIRMED!!!!!!!111!1
Modding AC down was a disservice. This happened and they went all Fox News over it. Though it was sort of a reasonable thing to expect given the evidence they gathered (a reference to Linux in a beta client, if I recall correctly), this shows why it's a good idea not to be overly aggressive in your guesswork when you're dealing with news.
Re:overblown (Score:4, Interesting)
yes.. My 8 hours of battery life in windows and 5 hours in Linux running PowerTop to disable as much as possible is just sensationalism..
Re:overblown (Score:5, Interesting)
Yes. It sickes me that Slashdot has followed Phoronix's lead in calling this a Linux bug. It isn't. The bug is in hardware not reporting that it is ASPM (Active State Power Management) capable.
As I understand it, the history of this thing is like:
1. Linux implements ASPM
2. This causes some hardware to fail, because it isn't ASPM capable
3. Linux is fixed to detect if the hardware reports ASPM capability, and doesn't use ASPM if the hardware says it doesn't support that
4. Michael Larabel of Phoronix notices that Linux power consumption has risen on some hardware, calls it a bug in Linux
5. Folks investigate, figure out that some hardware reports no ASPM capability, even though it is ASPM capable, and implement a kernel parameter to force Linux to use ASPM, even if the hardware says it doesn't support it
6. Michael Larabel keeps talking about the Linux power regression writes post after post about how it still hasn't been fixed
7. Someone figures out how Windows detects ASPM support on hardware that doesn't report it, and implements the same heuristic in Linux
8. Now, Slashdot claims the Linux bug has been fixed, even though it wasn't a bug in Linux, and Linux has had a workaround for almost as long as we've known about the issue
Seriously, guys. Bad reporting. This is _not_ what I come to Slashdot for. There are hundreds of sites that will give me half truths, common misconceptions, and the occasional nugget of truth. Strive to be better than those.
Re: (Score:1)
please mod parent up.
I utterly regrets have spent all of mine.
Re: (Score:1)
As I understand it, the history of this thing is like:
Let me reword that how users understand it:
1. Windows laptop's battery lasts 3 hours.
2. Install Linux, laptop's battery lasts 2 hours.
Users do not care who is at fault, nor are they even interested.
Re: (Score:3)
As I understand it, the history of this thing is like:
Let me reword that how users understand it:
1. Windows laptop's battery lasts 3 hours.
2. Install Linux, laptop's battery lasts 2 hours.
Users do not care who is at fault, nor are they even interested.
True, but /. is not where the users go. So the headline should be corrected, and the summary changed to explain that a kernel patch will emulate Window's handling of a BIOS bug to improve power usage on laptops.
Re: (Score:2)
Re: (Score:1)
About fucking time... (Score:3, Funny)
Be careful with ASPM... (Score:5, Informative)
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.
Re: (Score:1)
report it to the kernel developers (Score:2)
There is a blacklist for individual devices, including some Intel NICs. If yours isn't on the list, maybe it should be.
Re: (Score:1)
It probably is. He is likely to be using something very old and unpatched, Intel has blacklisted L0's on their buggy chips for a while, and even the fix for L1's is not that new and is available on the latest stable kernels.
Re:Be careful with ASPM... (Score:4, Informative)
Re: (Score:2)
For that matter (and obviously I'm being too lazy to look this up right now), is there not a way to turn it off on a per-device level rather than system wide?
Don't feed the troll (Score:5, Informative)
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: (Score:2)
Re:Don't feed the troll (Score:5, Insightful)
No. Battery life goes from 8hrs to 5hrs because Linux is actually "following the spec".
Hacks and reverse engineering should not be necessary.
The fact that this kind of nonsense still goes on in 2011 is not a black eye for Linux really. Although that's certainly what Microsoft intends. The clueless will certainly oblige them.
Re: (Score:3, Insightful)
Be that as it may, things appear to work fine on Windows. On Linux they don't. Hence the problem is Linux's problem. It's unfortunate that we have to work around boneheaded hardware and Microsoft's insistence on not documenting anything publicly. However that's the way things are. We can complain all we want about hardware manufacturers doing things wrong, but unless we can convince them to fix it (and 1% of their users whining about something that works just fine in Windows is not likely to get anywher
Re: (Score:2)
Just out of curiosity, have you tried any of the boot loaders intended for Mac OS X on your version of Fedora? Boot loaders like Chameleon load custom DSDT tables into memory and transparently present them to the OS.
Re: (Score:2)
> Be that as it may, things appear to work fine on Windows. On Linux they don't.
The reverse is also true.
The fact that Microsoft is an industry strangling monopoly on the PC platform really doesn't alter this. Anyone that claims otherwise is an idiot or a liar.
Broke due to actively monopoly sabotage is a bit different than merely broken. This aspect of the situation should be front and center whenever it's the case. It should not be quietly swept under the rug.
Re: (Score:3)
In an ideal world, yes.
However, there are several truths. First, most developers are crap. Yes, even you. This goes for hardware developers as well.
You'll find all sorts of hacks in Windows just to work around developer problems. For proof - see Vista - Microsoft basically redid a bunch of stuff to be cleaner and removed the hacks, and things broke horribly. All Window
solving the wrong problem (Score:1)
caused high power usage for many Intel Linux systems
it really is a simple fix. ;)
Sandy Bridge Still Brutal (Score:3, Informative)
Re: (Score:2)
That is due to i915_enable_rc6 defaulting to off. In 3.2 they should be changing it to default to on again as they've fixed the lockup bugs that it was causing. See the developers blog for more; http://dodonov.net/blog/ [dodonov.net]
Which Kernel Version? (Score:2)
Re: (Score:1)
None yet. It's not in Linus' tree yet.
Hopeful anticipation (Score:2)
The usual fix/workaround doesn't work on my Thinkpad T60. Even though I execute "pcie_aspm=force", I get this:
[ 0.000000] PCIe ASPM is forcedly enabled
but then...
[ 0.164778] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it ...
[ 1.269089] e1000e 0000:02:00.0: Disabling ASPM L0s L1
So I'm left to wonder, does the system actually support PCIe ASPM and the kernel just doesn't know it's there or is there entirely something else at fault?
Great (Score:2, Funny)
by mimicking Microsoft Windows' power behavior in the Linux kernel
Microsoft's lawyers probably love that description.
Fuck Phoronix (Score:2)
I see the sensationalist and wrong headline; the blurb is folded in.
I click expand and, lo behold, it's an anonymous submission that links to Phoronix. Yet. Again.
I guess none of the mods will read this anyway, but why can't we let this cesspool die by ignoring it into oblivion?
mimicking? (Score:1)
You mean copy / paste? M$ will be looking for you...
MS (Score:1)
Red Hat has devised a solution for the ASPM Linux power problem by mimicking Microsoft Windows' power behavior in the Linux kernel.
I'm sure Microsoft will ignore this.
Re: (Score:1, Insightful)
Surely it's not the manufactures fault for ignoring the standards they claim to support. It must be up to the OS developers to figure out what parts of the hardware are broken. /sarcasm
This isn't a Linux bug fix. It's a workaround in Linux for hardware bugs. It's just as broken on Windows it's just that Windows doesn't use it.
Bad Windows + Bad hardware = Linux's fault? Clearly everyone should emulate the defective behavior and employ reverse engineering to figure out just what that defective behavio
Re: (Score:2)
You can think of "better" when you will have "just as good". Besides, here, hardware manufacturers are to blame as they implement ASPM the way windows understands it, not the way standart sees it.
As for striving to imitate — they are fixing things so that they can work, nobody broke anything, just a workaround for the hardware that is "out there" and will be for quite some time.
Re: (Score:2)
Re: (Score:2)
...that the highest goal most projects strive for, is to imitate something mediorce or lame (like Windows)?
If X does something better than Y, its stupid and self-defeating to ignore it beacuse you dislike X.
The goal is functionality, and it seems that in this case X was doing it better, so it was well worth investigating why.
Re: (Score:2)
Re: (Score:2)