[personal profile] mjg59
(Edit to add: this issue is restricted to the mobile SKUs. Desktop parts have very different power management behaviour)

Linux 4.5 seems to have got Intel's Skylake platform (ie, 6th-generation Core CPUs) to the point where graphics work pretty reliably, which is great progress (4.4 tended to lose all my windows every so often, especially over suspend/resume). I'm even running Wayland happily. Unfortunately one of the reasons I have a laptop is that I want to be able to do things like use it on battery, and power consumption's an important part of that. Skylake continues the trend from Haswell of moving to an SoC-type model where clock and power domains are shared between components that were previously entirely independent, and so you can't enter deep power saving states unless multiple components all have the correct power management configuration. On Haswell/Broadwell this manifested in the form of Serial ATA link power management being involved in preventing the package from going into deep power saving states - setting that up correctly resulted in a reduction in full-system power consumption of about 40%[1].

I've now got a Skylake platform with a nice shiny NVMe device, so Serial ATA policy isn't relevant (the platform doesn't even expose a SATA controller). The deepest power saving state I can get into is PC3, despite Skylake supporting PC8 - so I'm probably consuming about 40% more power than I should be. And nobody seems to know what needs to be done to fix this. I've found no public documentation on the power management dependencies on Skylake. Turning on everything in Powertop doesn't improve anything. My battery life is pretty poor and the system is pretty warm.

The best thing about this is the following statement from page 64 of the 6th Generation Intel ® Processor Datasheet for U-Platforms:

Caution: Long term reliability cannot be assured unless all the Low-Power Idle States are enabled.

which is pretty concerning. Without support for states deeper than PC3, Linux is running in a configuration that Intel imply may trigger premature failure. That's obviously not good. Until this situation is improved, you probably shouldn't buy any Skylake systems if you're planning on running Linux.

[1] These patches never went upstream. Someone reported that they resulted in their SSD throwing errors and I couldn't find anybody with deeper levels of SATA experience who was interested in working on the problem. Intel's AHCI drivers for Windows do the right thing, but I couldn't find anybody at Intel who could get any information from their Windows driver team.

Re: Lenovo Yoga 900

Date: 2016-10-09 11:19 am (UTC)
From: (Anonymous)
I stand corrected

   Bad           VM writeback timeout                                                                                   
   Bad           Enable SATA link power management for host0
   Bad           Enable SATA link power management for host1
   Bad           Enable SATA link power management for host2
   Bad           Enable Audio codec power management
   Bad           NMI watchdog should be turned off
   Bad           Runtime PM for I2C Adapter i2c-1 (i915 gmbus dpb)
   Bad           Runtime PM for I2C Adapter i2c-2 (i915 gmbus dpd)
   Bad           Runtime PM for I2C Adapter i2c-0 (i915 gmbus dpc)
   Bad           Autosuspend for unknown USB device 1-7 (8087:0a2b)
   Bad           Runtime PM for PCI Device Intel Corporation Sky Lake Integrated Graphics
   Bad           Runtime PM for PCI Device Intel Corporation Sunrise Point-LP HD Audio
   Bad           Runtime PM for PCI Device Intel Corporation Sky Lake Host Bridge/DRAM Registers
   Bad           Runtime PM for PCI Device Intel Corporation Sunrise Point-LP Thermal subsystem
   Bad           Runtime PM for PCI Device Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller
   Bad           Runtime PM for PCI Device Intel Corporation Sunrise Point-LP SMBus
   Bad           Runtime PM for PCI Device Intel Corporation Sunrise Point-LP LPC Controller
   Bad           Runtime PM for PCI Device O2 Micro, Inc. Device 8620
   Bad           Runtime PM for PCI Device Intel Corporation Skylake Processor Thermal Subsystem
   Bad           Runtime PM for PCI Device Intel Corporation Sunrise Point-LP CSME HECI
   Bad           Runtime PM for PCI Device Intel Corporation Wireless 8260
   Bad           Runtime PM for PCI Device Intel Corporation Sunrise Point-LP PMC
   Bad           Runtime PM for PCI Device Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode]


Changing to:

   Good          VM writeback timeout
   Good          Enable SATA link power management for host0
   Good          Enable SATA link power management for host1
   Good          Enable SATA link power management for host2
   Good          Enable Audio codec power management
   Good          NMI watchdog should be turned off
   Good          Runtime PM for I2C Adapter i2c-1 (i915 gmbus dpb)                                                      
   Good          Runtime PM for I2C Adapter i2c-2 (i915 gmbus dpd)
   Good          Runtime PM for I2C Adapter i2c-0 (i915 gmbus dpc)
   Bad           Autosuspend for unknown USB device 1-7 (8087:0a2b)
   Good          Runtime PM for PCI Device Intel Corporation Sky Lake Integrated Graphics
   Bad           Runtime PM for PCI Device Intel Corporation Sunrise Point-LP HD Audio
   Bad           Runtime PM for PCI Device Intel Corporation Sky Lake Host Bridge/DRAM Registers
   Bad           Runtime PM for PCI Device Intel Corporation Sunrise Point-LP Thermal subsystem
   Bad           Runtime PM for PCI Device Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller
   Bad           Runtime PM for PCI Device Intel Corporation Sunrise Point-LP SMBus
   Bad           Runtime PM for PCI Device Intel Corporation Sunrise Point-LP LPC Controller
   Bad           Runtime PM for PCI Device O2 Micro, Inc. Device 8620
   Bad           Runtime PM for PCI Device Intel Corporation Skylake Processor Thermal Subsystem
   Bad           Runtime PM for PCI Device Intel Corporation Sunrise Point-LP CSME HECI
   Bad           Runtime PM for PCI Device Intel Corporation Wireless 8260
   Bad           Runtime PM for PCI Device Intel Corporation Sunrise Point-LP PMC
   Bad           Runtime PM for PCI Device Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode]


Allows the chip (peripherals) to spend time in lower power states than pc2:

          Package   |             Core    |            CPU 0       CPU 2
                    |                     | C0 active   1.7%        1.2%
                    |                     | POLL        0.5%    2.6 ms  0.0%    0.0 ms
                    |                     | C1E-SKL     4.3%    2.0 ms  0.3%    0.3 ms
C2 (pc2)   11.5%    |                     |
C3 (pc3)    0.3%    | C3 (cc3)    0.1%    | C3-SKL      0.1%    0.1 ms  0.1%    0.2 ms
C6 (pc6)    2.4%    | C6 (cc6)    1.9%    | C6-SKL      2.0%    0.5 ms  3.8%    1.9 ms
C7 (pc7)    0.1%    | C7 (cc7)   37.4%    | C7s-SKL     0.0%    0.0 ms  0.0%    0.0 ms
C8 (pc8)   20.7%    |                     | C8-SKL      9.4%    1.3 ms 11.6%    5.1 ms
C9 (pc9)    0.0%    |                     | C9-SKL      0.0%    0.0 ms  0.0%    0.0 ms
C10 (pc10)  0.0%    |                     | C10-SKL    30.0%   12.6 ms 80.8%    9.8 ms


Setting more flags to "Good" does not allow my laptop to resume after closing the lid. And I've to restart the network-manager, but I can live with that.

Profile

Matthew Garrett

About Matthew

Power management, mobile and firmware developer on Linux. Security developer at Aurora. Ex-biologist. [personal profile] mjg59 on Twitter. Content here should not be interpreted as the opinion of my employer. Also on Mastodon.

Page Summary

Expand Cut Tags

No cut tags