Kernel Log: What's new in 2.6.29 - Part 4: ACPI, PCI, PM – notebooks and power saving improvements
Following a one-week pause due to the LCA 2009, Linus Torvalds restarted the integration of patches into the development branch a few days ago, and has now released the third pre-release version of 2.6.29. In his release email, Torvalds points out a few changes made to improve the reliability of the system: suspend modes – changes that allow one of his notebooks to wake up reliably from power-saving mode. Our "What's new in 2.6.29" Kernel Log takes this opportunity to discuss the changes that concern ACPI, PCI, power management and the corresponding notebook drivers expected for 2.6.29.
The changes to the handling of the suspend and resume modes, mentioned by Torvalds and mainly developed by Rafael J. Wysocki, weren't integrated in one go, but found their way into the kernel (1, 2) gradually via the maintainers of the ACPI and PCI subsystems. Most of the relevant commits are comparatively small and seem rather inconspicuous at first glance (for example 1, 2, 3, 4).
These changes, which have been in preparation for a long time, are to allow the kernel to reliably re-initialise the system's PCI(e) hardware when waking up from suspend mode. According to Torvalds, suspend and resume have worked on many systems, but haven't always been reliable due to interrupt timings, especially with shared interrupts ("We have historically been in a situation where suspend/resume often works, but may not be reliable due to interrupt timings, especially if there are any shared interrupts going on between drivers."). As these difficulties now seem resolved, Torvalds has called on users to report drivers that cause problems with suspend/resume. In addition, testers are to evaluate whether systems, whose system sleep states co-operate with previous kernels, work at least as well with the pre-release versions of 2.6.29 as they did before ("...we'll really need user feedback on any drivers that now don't suspend/resume cleanly. So please, people - especially if you use suspend/resume, we want to hear about regressions,...").
Manual throttling disabled
In their blogs and elsewhere, the kernel developers Matthew Garrett and Dave Jones have repeatedly described that the throttling of modern CPUs prevents overheating, but doesn't, as many people assume, lower the clock speed or reduce power consumption. They say that on the contrary, the overall power consumption for a calculation even increases, because the CPU can't switch to power saving mode, and because the system, with all its components that continuously consuming power, will take longer to compute the result.
To illustrate this to users, the two developers have removed the sysfs interface of the p4-clockmod driver; while the driver can still protect systems from overheating, it can no longer be used for manually slowing down the CPU. The comment in the commit and an entry in Dave Jones' blog also explain the reasons for this measure; additional reasons can be found in the blog entry's comments, where the developer defends the measure and further discusses the myths about throttling.
In addition, the kernel developers have modified some of the PCI configuration information displayed during booting to give it more coherence and clarity (1, 2). There are numerous major changes to the ACPI code, for example, the restructuring of the include files (1, 2) and the relocation of the ACPI component architecture (ACPICA) to a directory of its own.
New notebook drivers
The maintainer of the ACPI subsystem has relocated the largely vendor-specific drivers for notebooks by Acer, Asus, IBM/Lenovo, MSI and others from drivers/misc/ to drivers/platform/x86/, which may result in a need to reactivate them when configuring 2.6.29 with a configuration file from a previous kernel (1, 2). The i8k driver for Dell notebooks now supports the Vostro and Precision series; a new addition is the dell-laptop driver, which supports brightness adjustments and WiFi/Bluetooth switch suppport via dcdbas (Dell Systems Management Base Driver). The developers extended the fujitsu-laptop driver for notebooks by Fujitsu-Siemens to include several new features. They also made numerous improvements to the driver for Thinkpads by IBM and Lenovo – find these and a selection of further important changes in the areas of ACPI, PCI, and power management in these sections:
- ACPICA: Add a mechanism to escape infinite AML While() loops
- ACPICA: Add Buffer-String conversion for predefined methods
- ACPICA: Add support to externally execute _OSI method
- ACPICA: Emit warning if two FACS or DSDT tables found in the FADT
- ACPICA: Move all public H/W interfaces to new hwxface
- ACPICA: New: acpi_get_gpe_device interface
- ACPICA: New: Public GPE group enable/disable interfaces
- ACPICA: Optimize execution of AML While loops
- ACPICA: Update version to 20081204.
- ACPI: disable MPS when NO APIC-table found
- ACPI: EC: Add some basic check for ECDT data
- ACPI: main.c: use new public GPE group enable/disable interfaces
- ACPI: Use RSDT instead of XSDT by adding boot option of "acpi=rsdt"
- ACPI hibernate: Add a mechanism to save/restore ACPI NVS memory
- ACPI hibernate: Introduce new kernel parameter acpi_sleep=s4_nonvs
- Newly inserted battery might differ from one just removed, so
- /proc/acpi/alarm: handle day-of-month wraparound on readback
- thermal fixup for broken BIOS which has invalid trip points.
- video: always update the brightness when poking "brightness"
- CPUFREQ: add to speedstep-lib additional fsb values for core processors
- CPUFREQ: Add Celeron Core support to p4-clockmod.
- cpuidle: Add decaying history logic to menu idle predictor
- ACPI: EC: Don't trust ECDT tables from ASUS
- ACPI: EC: Limit workaround for ASUS notebooks even more
- ACPI: thinkpad-acpi: add UWB radio support
- ACPI: thinkpad-acpi: bump up version to 0.22
- ACPI: thinkpad-acpi: debug facility to emulate the rf switches
- ACPI: thinkpad-acpi: handle HKEY event 6030
- ACPI: thinkpad-acpi: preserve radio state across shutdown
- ACPI: thinkpad-acpi: resume with radios disabled
- ACPI: thinkpad-acpi: update documents for the new location
- dell-laptop: move to drivers/platform/x86/ from drivers/misc/
- eeepc-laptop: enable Bluetooth ACPI details
- eeepc-laptop: use select and not depends on
- fujitsu-laptop: Simplify SBLL/SBL2 backlight handling
- PCI/ACPI: acpiphp: Identify more removable slots
- PCI: add a new function to map BAR offsets
- PCI: Add legacy_io/mem to all busses
- PCI: add PCI Advanced Feature Capability defines
- PCI: Add pci_clear_master() as opposite of pci_set_master()
- PCI: add pci_common_swizzle() for INTx swizzling
- PCI: add pci_swizzle_interrupt_pin()
- PCI: extend on the ICH motherboard IO decode quirk list
- PCI: handle PCI state saving with interrupts disabled
- PCI hotplug: introduce functions for ACPI slot detection
- PCI: keep ASPM link state consistent throughout PCIe hierarchy
- PCI: pciehp: add ACPI based slot detection
- PCI: pciehp: add auto option to pciehp_detect_mode
- PCI: pciehp: cleanup register and field definitions
- PCI: PCIe portdrv: Add kerneldoc comments to remining core funtions
- PCI: PCIe portdrv: Add kerneldoc comments to some core functions
- PCI: PCIe portdrv: Fix suspend and resume of PCI Express port services
- PCI: pci-stub module to reserve pci device
- PCI PM: Add suspend counterpart of pci_reenable_device
- PCI PM: Avoid touching devices behind bridges in unknown state
- PCI PM: Fix poweroff and restore callbacks
- PCI PM: Power-manage devices without drivers during suspend-resume
- PCI PM: Register power state of devices during initialization
- PCI PM: Restore standard config registers of all devices early
- PCI PM: Run default PM callbacks for all devices using new framework
- PCI: Rework default handling of suspend and resume
- PCI: Suspend and resume PCI Express ports with interrupts disabled
- Hibernate: Take overlapping zones into account (rev. 2)
- Hibernation: Introduce system_entering_hibernation
- PM: Simplify the new suspend/hibernation framework for devices
- Hibernate: Do not oops on resume if image data are incorrect
Further background and information about developments in the Linux kernel and its environment can also be found in previous issues of the kernel log at heise open:
- Kernel Log: New stable kernels, AMD 3D documentation and Mesa 7.3 released
- Kernel Log: What's new in 2.6.29 - Part 3: Kernel controlled graphics modes
- Kernel Log: main development phase for 2.6.29 ends, new X.org drivers
- Kernel Log: What's new in 2.6.29 - Part 2: WiMax
- Kernel Log: What's new in 2.6.29 - Part 1: Dodgy Wifi drivers and AP support
- Kernel Log: 2.6.29 development kicks off, improved 3D support