Bug 116591 - Mobile does not reach states deeper than PC2 - Lenovo YOGA 900-13ISK, Skylake
Summary: Mobile does not reach states deeper than PC2 - Lenovo YOGA 900-13ISK, Skylake
Status: CLOSED DUPLICATE of bug 116671
Alias: None
Product: Power Management
Classification: Unclassified
Component: Other (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: Zhang Rui
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-17 18:27 UTC by Anne van Rossum
Modified: 2017-03-22 10:38 UTC (History)
8 users (show)

See Also:
Kernel Version: 4.6.0-rc3
Subsystem:
Regression: No
Bisected commit-id:


Attachments
report, dmesg, hdparm, lshw, smartctl, etc. (52.42 KB, application/gzip)
2016-04-17 18:27 UTC, Anne van Rossum
Details

Description Anne van Rossum 2016-04-17 18:27:02 UTC
Created attachment 213201 [details]
report, dmesg, hdparm, lshw, smartctl, etc.

Bug

The system doesn't reach deeper than package c2 according to powertop. Rather than not buying Skylake-powered mobile sytems (https://mjg59.dreamwidth.org/41713.html), let's try to fix it.

System

Chipset: Lenovo Sunrise Point-LP

$ sudo dmidecode | grep 'System Information' -A8
System Information
	Manufacturer: LENOVO
	Product Name: 80MK
	Version: Lenovo YOGA 900-13ISK
	Serial Number: PF0FW650
	UUID: 85D0ED40-B41A-11E5-9614-507B9D9BBE12
	Wake-up Type: Power Switch
	SKU Number: LENOVO_MT_80MK_BU_idea_FM_Lenovo YOGA 900-13ISK
	Family: IDEAPAD

See attachment for further info (report has the powertop report). 

Clues

- On the Yoga 900 the SSD is a non-NVMe SSD (just SATA, see smartctl/hdparm), so, this is probably not the reason why the system doesn't go in deep sleep.
- BIOS version C6CN37WW from 03/01/2016 from Lenovo is up to date.
- There might be "some component" preventing it going into deeper states, but I'll need help in pinpointing it.
Comment 1 Yrjan Skrimstad 2016-04-18 20:17:47 UTC
Seeing similar behaviour on my Thinkpad T460s when running 4.6.0-rc4, I can't get it to a deeper state than pc2 according to powertop. However running 4.4.0 it gets as deep as pc8. Will see if I can pinpoint it further.
Comment 2 Yrjan Skrimstad 2016-04-19 08:44:31 UTC
I seemed to have forgotten some power management options on earlier that allowed me to get to pc8, interestingly these do not allow me to get to deeper states than pc2 on the 4.6-rc1 to rc4 kernels. I suspect there might be multiple bugs here ..?

1) All kernels tested (from 4.4 to 4.6-rc4) seems to only hit deeper states than pc2 when SATA link_power_management_policy is set to something other than max_performance. If set to min_power I can hit pc8 with kernels from 4.4 to 4.5

2) 4.6-rc1 to rc4 kernels seem incapable of hitting deeper states than pc2 even when link_power_management_policy is set to min_power. I have no clue as to why, yet.

This is only tested on my T460s, I do not know if the other reported problems are different or not.
Comment 3 Zhang Rui 2016-04-22 01:15:02 UTC
(In reply to Yrjan Skrimstad from comment #2)
> I seemed to have forgotten some power management options on earlier that
> allowed me to get to pc8, interestingly these do not allow me to get to
> deeper states than pc2 on the 4.6-rc1 to rc4 kernels. I suspect there might
> be multiple bugs here ..?
> 
> 1) All kernels tested (from 4.4 to 4.6-rc4) seems to only hit deeper states
> than pc2 when SATA link_power_management_policy is set to something other
> than max_performance. If set to min_power I can hit pc8 with kernels from
> 4.4 to 4.5
> 
> 2) 4.6-rc1 to rc4 kernels seem incapable of hitting deeper states than pc2
> even when link_power_management_policy is set to min_power. I have no clue
> as to why, yet.
> 
I'm confused, you said that all kernels are able to hit deeper states if link_power_management_policy is set to something other than max_performance in 1), and then you said 4.6-rc kernels are not able to enter deeper states in 2).
please clarify.
Comment 4 Yrjan Skrimstad 2016-04-22 09:40:02 UTC
Yes, that was unclear. Sorry.

I have used powertop to see information on states.

- With link_power_management_policy set to max_performance (the default setting) I cannot get to deeper states than pc2 on any kernel I have tested (I have only tested different kernels from 4.4.0 to 4.6-rc4). I'm uncertain as to how medium_power works, as I've had some differing results testing it.

- On kernels from 4.4.0 to 4.5.0 I can set link_power_management_policy to min_power and hit deeper states than pc2. It seems I can here get to either pc7 or pc8, depending on if the sd card reader is active or not (if the card reader is active it seems only pc7 is attainable, this needs more testing).

- On kernels from 4.6-rc1 to 4.6-rc4 I can set link_power_management_policy to min_power, but I will not get to deeper states than pc2. I don't know why this is.
Comment 5 Paolo Stivanin 2016-04-29 09:46:25 UTC
Same here (but, at least, I can reach PC3) with a Santech T67 (santech.eu/notebook/t67-series).

CPU: i7-6700HQ
GPU: Intel HD530
dGPU: Nvidia GTX 970m

Based on Clevo P640RE.

Powertop html report: https://oc.paolostivanin.com/index.php/s/E5Bh5hG6HybWBz5
Comment 6 chiluk 2016-05-13 20:56:53 UTC
I only have an NVMe drive, and my skylake does not get out of PC2.  Additionally since no sata controllers are exposed in /sys setting link_power_management_policy is not possible.
Comment 7 Zhang Rui 2016-05-15 05:17:47 UTC
Now we have four bug reporters,
1. Anne van Rossum, the original bug reporter, Lenovo YOGA 900. The problem is a duplicate of bug #116671.
2. Yrjan Skrimstad, Thinkpad T460s, who seems to get a 4.6-rc1 regression on top of the first bug.
3. Paolo Stivanin, Clevo P640RE or Santech T67
4. chiluk

I'd like to stick to one bug in one bug report. And this bug should be a duplicate of #116671. Thus mark it as closed.

Yrjan,
For the 4.6-rc1 regression, first please check if the problem still exists after applying the patch set from Matthew at #116671, if yes, please file a new bug report. 

Paolo,
when you saying "same here", please confirm your problem is the same as the one described in comment #0, or #4.
please check if the problem is gone after applying the patch set in #116671.

chiluk,
I'm not sure if you're experiencing the same problem or not, but it would be good to check if the patch set at #116671 helps or not. If not, please file a new bug report.

*** This bug has been marked as a duplicate of bug 116671 ***
Comment 8 Anne van Rossum 2016-05-15 09:15:38 UTC
I reported this bug before #116671 and could not be aware of it without time traveling. I'll try Matthew's patch.
Comment 9 Paolo Stivanin 2016-05-18 13:23:07 UTC
(In reply to Zhang Rui from comment #7)
> Now we have four bug reporters,
> 
> Paolo,
> when you saying "same here", please confirm your problem is the same as the
> one described in comment #0, or #4.
> please check if the problem is gone after applying the patch set in #116671.
> 


Hi,
I can't go deeper than PC3 on my system. I have tried both with and without TLP and with kernel from 4.4 to linux-next (as of today).

I have also tried Matthew's patch without any luck.

Cheers
Comment 10 Zhang Rui 2016-05-19 03:09:49 UTC
If the link_power_management_policy change does not workaround your problem, then this seems like a different problem.
Please file a new bug report. Together with "turbostat --debug" output in the latest upstream kernel.
Comment 11 chiluk 2016-06-10 14:58:55 UTC
I'd like to report that my laptop that has an NVMe drive now gets to pc2, pc3, pc6 and pc8 states.  I suspect, but can not prove that an update to the imei firmware on my machine has resolved my issue.  Basically I booted windows and ran updates *(bios was not updated), of which imei flashed a firmware fix.  Anyhow now my machine seems to be responding better.

IIUC IMEI is related to vpro/amt functionality and as such uses spare processor cycles to act as a BMC.  

That being said I think there is also an issue with sata controllers preventing low power states, but that is not my issue.  Which should be worked via 116671.
Comment 12 Zhang Rui 2016-06-12 03:42:09 UTC
(In reply to chiluk from comment #11)
> I'd like to report that my laptop that has an NVMe drive now gets to pc2,
> pc3, pc6 and pc8 states.  I suspect, but can not prove that an update to the
> imei firmware on my machine has resolved my issue.  Basically I booted
> windows and ran updates *(bios was not updated), of which imei flashed a
> firmware fix.  Anyhow now my machine seems to be responding better.
> 
> IIUC IMEI is related to vpro/amt functionality and as such uses spare
> processor cycles to act as a BMC.  
> 
> That being said I think there is also an issue with sata controllers
> preventing low power states, but that is not my issue.  Which should be
> worked via 116671.

cool, thanks for your information chiluk! :)

For the others, there is something new worth trying.
Comment 13 Meik J 2016-09-07 09:47:43 UTC
@chiluk
I also have an NVMe Device and Power Problems on my t460s Skylake i7.
Could you please provide a download Link to the IMEI Update? I can't find it on the lenovo website :(
Comment 14 chiluk 2016-09-07 15:54:45 UTC
I downloaded and installed the Intel Management Extensions interface update via the windows download utility.  As far as I could tell there was no way to flash this firmware outside of windows. As far as a link, your ability to search the lenovo website is about as good as mine *(and by that I mean their site is horrid, and I couldn't find it).

From what I gather, this seems to be the vpro/amt firmware.
Comment 15 Meik J 2016-09-08 08:49:46 UTC
Okay, yeah that's so true. I created a Windows 10 Live Stick for updating my Notebook and Docking Station. Could you provide the KB number of the Update? Unfortunately the Updater does not find it automatically.
Comment 16 Meik J 2016-09-08 12:24:29 UTC
Finally I found the firmware file and I think this solved the problem (CPU 0-4 comes deep to C10):

http://support.lenovo.com/de/de/products/laptops-and-netbooks/thinkpad-t-series-laptops/thinkpad-t460s/downloads/DS112240
Comment 17 chiluk 2016-09-08 14:59:30 UTC
Thank you so much for confirming my experience.  It's good to have corroboration on that.
Comment 18 Marco Trevisan (Treviño) 2016-09-08 15:22:53 UTC
Yeah, installing that seems enough to get it working.

For people with linux-only machines (like I am), using windows 10 from an USB disk should be possible.

I've done as explained here:
 - https://www.reddit.com/r/windows/comments/4kbjyd/using_your_windows_10_installation_disk_from_usb/
Comment 19 Meik J 2016-09-11 20:30:35 UTC
After a few days I noticed that my batterie life is still very bad (about 2h per battery) Here's my powertop output:


          Paket     |             Kern    |            CPU 0       CPU 2
                    |                     | C0 aktiv    1,1%        2,6%
                    |                     | POLL        0,0%    0,0 ms  0,0%
                    |                     | C1E-SKL     0,1%    0,1 ms  0,2%
C2 (pc2)   28,4%    |                     |
C3 (pc3)    0,4%    | C3 (cc3)    0,2%    | C3-SKL      0,2%    0,2 ms  0,2%
C6 (pc6)   17,5%    | C6 (cc6)    6,1%    | C6-SKL      1,0%    0,7 ms  6,7%
C7 (pc7)   32,6%    | C7 (cc7)   78,8%    | C7s-SKL     0,0%    0,0 ms  0,0%
C8 (pc8)    0,0%    |                     | C8-SKL     29,4%    2,9 ms 68,4%
C9 (pc9)    0,0%    |                     | C9-SKL      0,0%    0,0 ms  0,0%
C10 (pc10)  0,0%    |                     | C10-SKL    65,2%    8,0 ms 16,8%

                    |             Kern    |            CPU 1       CPU 3
                    |                     | C0 aktiv    1,5%        1,0%
                    |                     | POLL        0,0%    0,0 ms  0,0%
                    |                     | C1E-SKL     0,2%    0,1 ms  0,3%
                    |                     |
                    | C3 (cc3)    0,2%    | C3-SKL      0,2%    0,2 ms  0,1%
                    | C6 (cc6)    1,9%    | C6-SKL      1,8%    0,6 ms  0,7%

The C10-SKL percentage has raised, should it do the same on package and kernel? I'm now on kernel 4.8.0-040800rc2-generic.
Comment 20 ihe17248 2017-03-21 10:06:21 UTC
I'm using Solus with kernel 4.9.6 on a thinkpad t460 (with Skylate i5). 
I also can't reach lower than pc2 (or pc3 toggling some powertop tunables).

I'm on the most recent IMEI firmware (and the most recent IME firmware), but I still can't reach states lower than pc2 (or pc3).


From what I read here I assumed an update of the IMEI firmware would fix the issue. Last week I performed the update using a windows to go bootable usb drive, but it doesn't sole the issue for me.
Does anyone have some idea what might be causing the issue for me?


IMEI firmware: http://pcsupport.lenovo.com/nl/en/downloads/DS105811
IME firmware: http://pcsupport.lenovo.com/nl/en/products/laptops-and-netbooks/thinkpad-t-series-laptops/thinkpad-t460/downloads/ds119167
Comment 21 ihe17248 2017-03-22 10:38:10 UTC
(In reply to alexs from comment #20)
> I'm using Solus with kernel 4.9.6 on a thinkpad t460 (with Skylate i5). 
> I also can't reach lower than pc2 (or pc3 toggling some powertop tunables).
> 
> I'm on the most recent IMEI firmware (and the most recent IME firmware), but
> I still can't reach states lower than pc2 (or pc3).
> 
> 
> From what I read here I assumed an update of the IMEI firmware would fix the
> issue. Last week I performed the update using a windows to go bootable usb
> drive, but it doesn't sole the issue for me.
> Does anyone have some idea what might be causing the issue for me?
> 
> 
> IMEI firmware: http://pcsupport.lenovo.com/nl/en/downloads/DS105811
> IME firmware:
> http://pcsupport.lenovo.com/nl/en/products/laptops-and-netbooks/thinkpad-t-
> series-laptops/thinkpad-t460/downloads/ds119167

Nevermind, I noticed that I forgot to enable tlp. After I enable it I can reach up to pc7.

Note You need to log in before you can comment on or make changes to this bug.