Nailing the Cause of Recent Linux Power Issues
An anonymous reader writes "For the Linux kernel power regressions that were found a few months ago, and hit in Ubuntu 11.04, Phoronix has found the regression that's still present in the Linux 3.0 kernel. The power regression is caused by a change in ASPM, the Active-State Power Management, for PCI Express support."
Interesting headline. I was trying to figure out how old-school manual construction work would be responsible for tricky power supply problems on Linux machines only.
I am a geek attorney, but not your geek attorney unless you've already retained me. This is not legal advice.
It's due to some buggy BIOSes not properly advertising power-saving features of PCIE cards. Older kernels didn't honor those BIOS hints, and disabled power to unused PCIE cards anyways (causing hangs in rare cases), whereas new kernels do the right thing (causing power wastage in lots of cases). The workaround is to specify pcie_aspm=force on the boot (Grub) command line, to tell the kernel to forge ahead, and just use power management on these cards regardless of the BIOS advice.
As bad as some of the Phoronix articles can be, they have contributed a lot to the community. After all, they played a pivotal role in setting up openbenchmarking.org, and are pretty much the only source of Linux hardware reviews.
The article is full of sensationalism like "serious bug", "major regression" to promote Phoronix and its "wonderful test suite". If you read it closely, you'll see they have seen a 10% increase in power consumption on just one of their test laptops that depends on BIOS settings. That particular laptop has a bug in its BIOS where it claims it wants to manage configuration of a particular piece of hardware, and new kernels obey that request. You can even tell the kernel to disregard BIOS and force power settings anyway.
For me, improving power efficiency everywhere but that particular laptop is a major win. If you feel nice, you can even detect this particular buggy BIOS and ignore its request. But then, even after throrough fiddling, Phoronix guys weren't able to improve power usage by more than 15% even on this laptop, so it's not a big issue anyway.
The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
Add pcie_aspm=force to your boot options.
/etc/default/grub and editing the GRUB_CMDLINE_LINUX_DEFAULT variable. Then call sudo update-grub.
Test it by editing grub (which is a temporary edit that will be lost next boot) first and test out suspend, hibernate, etc.
If that works, edit your grub configuration files. For ubuntu users this means editing
That is an accurate summation of the article; but calling things "right" and "wrong" is a little nieve. Windows treats this information very differently to Linux, and BIOS manufacturers are caught between the two. Simply advertising ASPM sounds good, unless it causes Windows to treat card without ASPM support as if they have it just because the bios advertised that the system supported it. Now current versions of Windows might act rationally in this regard, but XP and older are still highly prevalent particularly amongst corporate clients and governments.
So I guess my point is - it isn't a simple right or wrong/black or white scenario. It is a messy, ugly, undocumented hack, that ultimately leaves nobody happy. Linux will likely wind up having to implement a hack too to fix this, which makes them no better or no worse than the bios manufacturers who did exactly the same thing.
The article points out that there is also a power regression in the scheduler. Which is the next thing that the writer will look at.
Hard to say without the exact specs of the machine, and probably a bunch of test-probes clipped in awkward places inside the laptop; but the overall trend in hardware does seem to have been toward ever higher theoretical maximum-if-we-felt-like-burning-that-much power draw(remember back when a ~50-80 watt CPU was considered a howling-mad-danger-to-self-and-others overclock/overvolt insanity demandng nerves of steel and custom cooling? Now boring retail CPUs have TDPs in the ~130 watt range); but a corresponding increase in the ability of hardware to throttle various clocks(CPU, GPU, high sped busses), sometimes cut Vcore as well, and turn off(or very nearly so) unused peripherals.
Exactly where the delta exists vs. Windows seems to be a matter of some confusion; but unless Linux is just plain burning more CPU time for housekeeping purposes(which, one assumes, is the sort of things that the Big Serious Corporate users of 1000+ node commodity server/compute setups would have noticed by now), it likely rests largely in the hands of a (no doubt alarmingly large and ever changing) set of hardware-specific power throttling stuff whose responsibilities were designed to be divided between the buggy BIOS and the vendor's Windows drivers. If it were Just One Mistake, it'd likely have been quashed by now...
That is an accurate summation of the article; but calling things "right" and "wrong" is a little nieve. Windows treats this information very differently to Linux, and BIOS manufacturers are caught between the two.
In other cases this has been because microsoft wrote the tools and designed them to be hostile to Linux, e.g. ACPI. is there any of that here?
"You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
I'm using a Vaio S that gets 7+hr battery life in Windows, and under 2hr battery life in Fedora. The big problem that I see with this laptop is that Fedora is not utilizing the "hybrid" graphics system, and it is constantly running off of the graphics card instead of the integrated graphics (in windows, this brings the battery life to under 2 hours, as well). It would be nice to be able to switch that permanently to integrated to get the battery life.
Linux does thing the way they should be done according to standard. Windows does things they way they actually are done in the real world. The reason is simple: BIOS vendors noticed Windows doesn't follow the standard well, and made the reasonable assumption that the vast majority of users would run windows. Thus they deviated from the standard in order to better support it.
Yes. 30 years of Microsoft sabotaging competitors great and small does make it hard for anyone else to get a toe hold.
As always, this situation depends on how demanding your expectations are and whether or not you can put up with crap you're forced to put up with.
Microsoft thinks it needs dirty tricks and that it's product can't survive on it's own merit.
A Pirate and a Puritan look the same on a balance sheet.
ACPI implementors (what is an ACPI vendor? can I buy it by the pound, or is it sold by the unit?) favored Windows, because Microsoft built a tool for creating ACPI tables that intentionally craps on all other operating systems, INTENTIONALLY building an invalid table for use with non-Windows operating systems. Linux now claims to be Windows in order to get a table that works. Bill Gates proposed this "feature" personally.
The dominant platform is the one supported by fraud and deceit, which helps to ensure its continuing dominance, and the proper use of apostrophes. No wait, that was me.
"You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
Did you read the linked PDF at all? Here's what the rest of it said:
In summary, Bill Gates explicitly wanted to break ACPI on Linux.
Dewey, what part of this looks like authorities should be involved?