An interesting Ubuntu-related post on our new low-power design blog, written by Chris Edwards – Linux power: what does changing a register do if the BIOS tells you it isn’t there?
The Phoronix blog, which identified problems with Ubuntu’s power consumption in recent versions on mobile devices, has claimed to have found the cause of the problem. And it underlines the importance of low-level interfaces communicating clearly what they can do and are doing when it comes to software-enabled power management.
The main culprit seems to be the Active-State Power Management (ASPM) protocol supported by PCI Express and a change that was meant to stop the Linux kernel from accessing hardware registers that might not be there.
The code change in the kernel that triggered the problem was accompanied by this comment:
“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.”