Matthew Garrett ([personal profile] mjg59) wrote2016-04-13 12:46 pm
Entry tags:

Skylake's power management under Linux is dreadful and you shouldn't buy one until it's fixed

(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.

4.6 seems to have better support

(Anonymous) 2016-05-30 10:01 pm (UTC)(link)
I have a Thinkpad X1 Carbon (4th gen). I'm running debian sid with 4.5 kernel. It seems that I couldn't get past PC2. I've updated my kernel to the latest in experimental which is 4.6 and I'm reaching PC8.

C2 (pc2) 12.2%
C3 (pc3) 0.2%
C6 (pc6) 39.4%
C7 (pc7) 0.0%
C8 (pc8) 14.1%
C9 (pc9) 0.0%
C10 (pc10) 0.0%

I've also flashed the BIOS to the latest version:

BIOS Revision: 1.14 Firmware Revision: 1.9

microcode revision=0x88.

I'm not sure if the BIOS/firwmare/microcode upgrade made any real difference or if it was just the kernel because it did reach PC8 with just the kernel upgrade.

Hopefully this will improve the battery life a bit.

Re: 4.6 seems to have better support

(Anonymous) 2016-06-09 06:55 pm (UTC)(link)
IT WAS THE IMEI FIRMWARE!

So I Think I was experiencing the same thing. I'm still running 4.4.0-23 *(ubuntu kernel). I was only able to get to pc2. I ended up booting into windows to debug a separate unrelated issue, and ran a few updates. I had already been running the 1.14 bios and firmware revision 1.9 so that wasn't the solution. I did upgrade the IMEI firmware though. After rebooting back into linux I'm now getting much better behavior.

C2 (pc2) 12.6%
C3 (pc3) 0.1%
C6 (pc6) 55.4%
C7 (pc7) 0.0%
C8 (pc8) 14.8%
C9 (pc9) 0.0%
C10 (pc10) 0.0%

It's worth noting that I am using an NVMe drive so the sata patches here don't apply.

Re: 4.6 seems to have better support

(Anonymous) 2016-06-22 05:26 am (UTC)(link)
Sorry if this question has an obvious answer, but how can one upgrade the IMEI firmware?

Re: 4.6 seems to have better support

(Anonymous) 2016-06-29 10:33 pm (UTC)(link)
Same question here.

Have you tried the newest Kernel 4.6.3 or 4.7-rc*? Would the performance be better?

Re: 4.6 seems to have better support

(Anonymous) 2016-07-14 10:10 pm (UTC)(link)
I still get up to PC2 on my P50 Lenovo laptop with kernel 4.6... Any trick there?

Re: 4.6 seems to have better support

(Anonymous) 2016-07-17 09:01 pm (UTC)(link)
There's no need to, it's a kernel module.
It would only make sense if the linux version is behind the windows version. And only if it made persistent changes to the cpu/efi/whatever...
https://www.thomas-krenn.com/de/wiki/Intel_Management_Engine_Interface_mei_Linux_Treiber