1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Memory
  5. Motherboards
  6. Processors
  7. Software
  8. Storage
  9. Operating Systems


Facebook RSS Twitter Twitter Google Plus


Phoronix Test Suite

OpenBenchmarking.org

The Leading Cause Of The Recent Linux Kernel Power Problems

Michael Larabel

Published on 26 June 2011
Written by Michael Larabel
Page 2 of 3 - 144 Comments

Without further ado, the biggest cause of the 2.6.38 power issue (according to my testing software and the hardware I've been running) is due to a change in behavior regarding ASPM. ASPM is the Active-State Power Management for PCI Express. Namely, to blame is commit 2f671e2dbff6eb5ef4e2600adbec550c13b8fe72 that is titled "PCI: Disable ASPM if BIOS asks us to."

"We currently refuse to touch the ASPM registers if the BIOS tells us that ASPM isn't supported. This can cause problems if the BIOS has (for any reason) enabled ASPM on some devices anyway. Change the code such that we explicitly clear ASPM if the FADT indicates that ASPM is not supported, and make sure we tidy up appropriately on device removal in order to deal with the hot-plug case. If ASPM is disabled because the BIOS doesn't hand over control then we won't touch the registers."

This change is what was made during the Linux 2.6.38 merge window, pushed mainline in early January, and is causing increased power usage on a plethora of systems. Active-State Power Management is a feature that is supposed to save system power by setting a lower power state for unused PCI Express links. The downside to ASPM is that it can increase device latency due to the time required in switching PCI-E link power modes, but on the positive side it's capable of saving a fair amount of power, which can make it worthwhile for mobile systems. ASPM can work on desktops too, but it is not as common there due to the possible increase in latency when switching states. With the 2.6.38 commit that is noted, if the BIOS indicates it does not support ASPM, the behavior is changed.

Evidently, some BIOSes have their ASPM support misconfigured and thus problems can arise if the PCI-E link power mode is dropped on an unsupported device. There are a few mentions of hangs and other issues under Linux associated with this power management feature. It's not really a surprise though that the BIOSes would be misconfigured given all of the other BIOS-related problems under Linux and the once very poor suspend-and-resume support due to all of the workarounds and hacks that BIOS/hardware vendors have done to cater towards Microsoft Windows power management. In this case, it seems a large number of mobile systems are supporting ASPM but not properly advertising the support via the standard BIOS ACPI FADT (Fixed ACPI Description Table). Some Linux drivers even forcibly disable ASPM on Linux (e.g. this kernel patch).

With this being a PCI Express power management bug, the number of systems potentially affected is massive and doesn't isolate the problem to those just using a select driver or obscure configuration. PCI-E ASPM is mostly used on mobile systems, but on at least some desktop systems I have seen the power consumption affected by this issue.

Given the thousands of users having this 2.6.38 power regression by this change, there is a big ASPM problem at hand. Fortunately, as PCI-E ASPM problems are not new, a few boot options can be used. Namely, most people affected by this issue will want to add "pcie_aspm=force" to their boot command line. Simply adding this will force Active-State Power Management to be enabled. This is supported before the Linux 2.6.38 kernel (looks to be going back to circa 2.6.27) and it is still supported today in the latest upstream Git. Just adding that to 2.6.38+ kernels on the systems I have tested will workaround this problem-causing commit and lead to noticeable power savings.

Latest Linux Hardware Reviews
  1. Rosewill RS-MI-01: An Ultra Low-Cost Mini-ITX Chassis
  2. D-Link DCS-2330L HD Wireless Network Camera
  3. Gigabyte AM1M-S2H
  4. AMD's New Athlon/Semprons Give Old Phenom CPUs A Big Run For The Money
Latest Linux Articles
  1. Red Hat Enterprise Linux 7.0 RC Benchmarks
  2. AMD Catalyst 14.4 Brings Few Linux Performance Improvements
  3. The Performance Of Fedora 20 Updated
  4. Clang Fights GCC On AMD's Athlon AM1 APU With Jaguar Cores
Latest Linux News
  1. NGINX 1.6 Brings SPDY 3.1 & Other New Features
  2. Linux Foundation Announces A Core Infrastructure Initiative
  3. More Steam Linux Tests/Benchmarks Might Be Coming
  4. NVIDIA's Amazing Single-Board ARM Computer Might Be Delayed
  5. Fedora 21 To Get A Playground, New Features
  6. PC-BSD Is Developing Its Own Desktop Environment
  7. Valve Is Bringing VOGL To Windows & Working On Regression Tests
  8. Canonical Is Taking Over Linux 3.13 Kernel Maintenance
  9. Google Web Designer Is Now Natively Available On Linux
  10. Ubuntu 14.10 Is Codenamed The Utopic Unicorn
  11. Audacious 3.5 Lightweight Audio Player Released
  12. Steam Updated For Ubuntu 14.04 LTS, SteamOS
Latest Forum Discussions
  1. What Else Would You Like To See On Phoronix This Spring?
  2. HTPC-upgrade advice: AMD Richland A8-7600 or Kaveri A10-6700T ???
  3. Linux Kernel Developers Fed Up With Ridiculous Bugs In Systemd
  4. The GNOME Foundation Is Running Short On Money
  5. The Most Amazing OpenGL Tech Demo In 64kb
  6. Announcing radeontop, a tool for viewing the GPU usage
  7. New card. Open source drivers only.
  8. Script for Fan Speed Control