Bug 93035 - [SKL-Y] Can't reach deepest state than pc2
Summary: [SKL-Y] Can't reach deepest state than pc2
Status: CLOSED WORKSFORME
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: high critical
Assignee: cprigent
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-20 10:13 UTC by cprigent
Modified: 2016-01-22 14:41 UTC (History)
2 users (show)

See Also:
i915 platform: SKL
i915 features: power/runtime PM


Attachments
report.html (67.38 KB, text/plain)
2015-11-20 10:13 UTC, cprigent
no flags Details
kern.log.tar.gz (3.84 MB, application/x-gzip)
2015-11-20 10:33 UTC, cprigent
no flags Details
i915_dmc_info (104 bytes, text/plain)
2015-11-20 11:22 UTC, cprigent
no flags Details
i915_power_domain_info (1.79 KB, text/plain)
2015-11-20 11:22 UTC, cprigent
no flags Details
lsmod (4.08 KB, text/plain)
2015-11-20 11:22 UTC, cprigent
no flags Details
lspci -vvk (13.01 KB, text/plain)
2015-11-20 11:23 UTC, cprigent
no flags Details
pci_runtime_status (6.17 KB, text/plain)
2015-11-20 11:23 UTC, cprigent
no flags Details
turbostat (2.93 KB, text/plain)
2015-11-20 14:26 UTC, cprigent
no flags Details
lspci -vvk (13.01 KB, text/plain)
2015-11-20 16:31 UTC, cprigent
no flags Details
lsmod (4.08 KB, text/plain)
2015-11-20 16:32 UTC, cprigent
no flags Details
turbostat (2.93 KB, text/plain)
2015-11-20 16:33 UTC, cprigent
no flags Details
pci_runtime_status (8.16 KB, text/plain)
2015-11-20 16:46 UTC, cprigent
no flags Details
report.html (67.54 KB, text/plain)
2015-11-20 17:06 UTC, cprigent
no flags Details
kern_dmc1.23.log (529.49 KB, text/plain)
2015-11-20 17:06 UTC, cprigent
no flags Details
i915_dmc_info (204 bytes, text/plain)
2015-11-23 17:51 UTC, cprigent
no flags Details
i915_power_domain_info (1.84 KB, text/plain)
2015-11-23 17:52 UTC, cprigent
no flags Details
kern.log (358.24 KB, text/plain)
2015-11-23 17:52 UTC, cprigent
no flags Details
lsmod (3.93 KB, text/plain)
2015-11-23 17:53 UTC, cprigent
no flags Details
lspci -vvk (19.01 KB, text/plain)
2015-11-23 17:53 UTC, cprigent
no flags Details
pci_runtime_status (3.63 KB, text/plain)
2015-11-23 17:53 UTC, cprigent
no flags Details
report.html (67.94 KB, application/html)
2015-11-23 17:54 UTC, cprigent
no flags Details
turbostat (2.93 KB, text/plain)
2015-11-23 17:54 UTC, cprigent
no flags Details
Patch to enable AHCI ALPM accounting (11.14 KB, patch)
2015-11-23 19:33 UTC, Imre Deak
no flags Details | Splinter Review

Description cprigent 2015-11-20 10:13:28 UTC
Created attachment 119971 [details]
report.html

Hardware
Platform: SKY LAKE Y A0 QUAL
CPU : Intel(R) Core(TM) M5-6Y54 @ 1.10GHz 4MB (family: 6, model: 78  stepping: 3)
MCP : SKL-Y  D1  
QDF : QJ9W
CPU : SKL D0
Chipset PCH: Sunrise Point LP C1       
CRB : SKY LAKE Y LPDDR3 RVP3 CRB FAB2
Reworks : All Mandatories + FBS02 & FBS03, O-06
Software 
Linux : Ubuntu 15.04 64 bits
BIOS : SKLSE2R1.R00.B104.B01.1511110114
ME FW : 11.0.0.1191
Ksc (EC FW): 1.20
Kernel 4.4.0-rc1 nighlty 0ffc902 from git://anongit.freedesktop.org/drm-intel
  commit 0ffc902f01780eea9bd497435f04883b1c071871
  Author: Daniel Vetter <daniel.vetter@ffwll.ch>
  Date:   Thu Nov 19 17:52:23 2015 +0100
  drm-intel-nightly: 2015y-11m-19d-16h-51m-40s UTC integration manifest
Mesa 11.0.5 from http://cgit.freedesktop.org/mesa/mesa/
xf86-video-intel - 2.99.917 from http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/
Libdrm - 2.4.65 from http://cgit.freedesktop.org/mesa/drm/
Libva - 1.6.1 from http://cgit.freedesktop.org/libva/
vaapi intel-driver - 1.6.1 from http://cgit.freedesktop.org/vaapi/intel-driver
Cairo - 1.14.2 from http://cgit.freedesktop.org/cairo
Xorg Xserver - 1.17.2 from http://cgit.freedesktop.org/xorg/xserver

Steps:
------
1. Boot with kernel boot command line: i915.disable_power_well=1 
2. From Ubuntu Power settings, configure Turn screen off when inactive after 1 minute
3. Auto-tune the system using PowerTop, execute command:
sudo powertop --auto-tune
4. Turn off networks, disconnect devices (mouse, keyboard ...)
5. Launch PowerTop with command:
sudo powertop --html=report --time=240
6. Wait 4 minutes
7. Check PC states residency in html report

Actual result:
---------------
7. PC2 is 89.5% (deepest states are 0)

Expected result:
----------------
7. System can reach deepest states

PowerTop installation steps:
----------------------------
Install packages: g++, autopoint, libpci-dev, autoconf, libncurses, libncurses-dev, libnl-cli, libnl-genl-dev, libtool
git clone git://github.com/fenrus75/powertop.git 
cd powertop
./configure
make
make install
Comment 1 cprigent 2015-11-20 10:33:51 UTC
Created attachment 119972 [details]
kern.log.tar.gz
Comment 2 Imre Deak 2015-11-20 10:51:21 UTC
(In reply to cprigent from comment #1)
> Created attachment 119972 [details]
> kern.log.tar.gz

For power state residency problems could you please always provide also the output of the followings, captured at the moment where you expect some non-zero residency (all ran as root):

lspci -vvk
lsmod

for d in /sys/devices/pci*/0*; do \
  grep . $d/power/{control,runtime_usage,runtime_suspended_time}; \
done

sleep 5

for d in /sys/devices/pci*/0*; do \
  grep . $d/power/{control,runtime_usage,runtime_suspended_time}; \
done

cat /sys/kernel/debug/dri/0/i915_power_domain_info
cat /sys/kernel/debug/dri/0/i915_dmc_info

<linux_src>/tools/power/x86/turbostat --debug sleep 5
Comment 3 Imre Deak 2015-11-20 11:04:27 UTC
Also please retest with the latest DMC firmware:

[    8.678838] [drm:intel_csr_ucode_init] Loading i915/skl_dmc_ver1.bin
[    8.687031] [drm] Refusing to load old Skylake DMC firmware v1.22, please upgrade to v1.23 or later [https://01.org/linuxgraphics/intel-linux-graphics-firmwares].
[    8.687094] [drm:csr_load_work_fn [i915]] *ERROR* Failed to load DMC firmware, disabling rpm
Comment 4 cprigent 2015-11-20 11:22:14 UTC
Created attachment 119974 [details]
i915_dmc_info
Comment 5 cprigent 2015-11-20 11:22:32 UTC
Created attachment 119975 [details]
i915_power_domain_info
Comment 6 cprigent 2015-11-20 11:22:52 UTC
Created attachment 119976 [details]
lsmod
Comment 7 cprigent 2015-11-20 11:23:14 UTC
Created attachment 119977 [details]
lspci -vvk
Comment 8 cprigent 2015-11-20 11:23:43 UTC
Created attachment 119978 [details]
pci_runtime_status
Comment 9 cprigent 2015-11-20 11:24:40 UTC
For the VGA PCI controller not suspending: https://bugs.freedesktop.org/show_bug.cgi?id=93016
Comment 10 cprigent 2015-11-20 14:26:12 UTC
Created attachment 119984 [details]
turbostat
Comment 11 cprigent 2015-11-20 14:26:22 UTC
Reproduced with firmware DMC 1.23
Comment 12 Imre Deak 2015-11-20 15:08:57 UTC
(In reply to cprigent from comment #11)
> Reproduced with firmware DMC 1.23

But now runtime PM actually got enabled, it's a completely new scenario, so we need a new capture of dmesg, and the rest of debug output from comment 2.
Comment 13 cprigent 2015-11-20 16:31:59 UTC
Created attachment 119990 [details]
lspci -vvk
Comment 14 cprigent 2015-11-20 16:32:32 UTC
Created attachment 119991 [details]
lsmod
Comment 15 cprigent 2015-11-20 16:33:55 UTC
Created attachment 119992 [details]
turbostat
Comment 16 cprigent 2015-11-20 16:46:23 UTC
Created attachment 119993 [details]
pci_runtime_status
Comment 17 cprigent 2015-11-20 17:06:21 UTC
Created attachment 119994 [details]
report.html
Comment 18 cprigent 2015-11-20 17:06:48 UTC
Created attachment 119995 [details]
kern_dmc1.23.log
Comment 19 Imre Deak 2015-11-20 17:28:51 UTC
(In reply to cprigent from comment #18)
> Created attachment 119995 [details]
> kern_dmc1.23.log

You forgot to add

cat /sys/kernel/debug/dri/0/i915_power_domain_info

and

cat /sys/kernel/debug/dri/0/i915_dmc_info
Comment 20 Imre Deak 2015-11-23 14:17:53 UTC
You left an easter-egg for me in your dmesg:)

Nov 20 04:34:41 SKLY-8 kernel: [    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-rc1-nightly+ root=UUID=984d322b-a35a-40bc-9ca6-f6d395aae9f6 ro
Nov 20 05:56:25 SKLY-8 kernel: [    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-rc1-nightly+ root=UUID=984d322b-a35a-40bc-9ca6-f6d395aae9f6 ro init=/sbin/upstart i915.disable_power_well=1
Nov 20 06:26:45 SKLY-8 kernel: [    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-rc1-nightly+ root=UUID=984d322b-a35a-40bc-9ca6-f6d395aae9f6 ro init=/sbin/upstart drm.debug=0xe i915.disable_power_well=1
Nov 20 06:30:58 SKLY-8 kernel: [    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-rc1-nightly+ root=UUID=984d322b-a35a-40bc-9ca6-f6d395aae9f6 ro init=/sbin/upstart drm.debug=0xe i915.disabe_power_well=1

The last one has a typo, which of course will keep power wells disabled. Please retest correcting the parameter.
Comment 21 cprigent 2015-11-23 17:51:56 UTC
Created attachment 120057 [details]
i915_dmc_info
Comment 22 cprigent 2015-11-23 17:52:22 UTC
Created attachment 120058 [details]
i915_power_domain_info
Comment 23 cprigent 2015-11-23 17:52:57 UTC
Created attachment 120059 [details]
kern.log
Comment 24 cprigent 2015-11-23 17:53:17 UTC
Created attachment 120060 [details]
lsmod
Comment 25 cprigent 2015-11-23 17:53:33 UTC
Created attachment 120061 [details]
lspci -vvk
Comment 26 cprigent 2015-11-23 17:53:57 UTC
Created attachment 120062 [details]
pci_runtime_status
Comment 27 cprigent 2015-11-23 17:54:25 UTC
Created attachment 120063 [details]
report.html
Comment 28 cprigent 2015-11-23 17:54:45 UTC
Created attachment 120064 [details]
turbostat
Comment 29 cprigent 2015-11-23 17:57:01 UTC
Yes, I confirm the typo. Now PCI VGA controler successfully suspends.
I still see residency only in PC2 state. New logs attached.
Comment 30 Imre Deak 2015-11-23 19:33:20 UTC
Created attachment 120068 [details] [review]
Patch to enable AHCI ALPM accounting

(In reply to cprigent from comment #29)
> Yes, I confirm the typo. Now PCI VGA controler successfully suspends.
> I still see residency only in PC2 state. New logs attached.

Ok, thanks for the report. It looks like from our side things are fine, we runtime suspend and enable DC6. We get DC5 residency, but not DC6. AFAIK this is because DC6 is allowed only once the PCU determines that everything else is ready for PC9/10, or some other system-wide condition prevents PCU from signaling DC6 readiness.

In general it'll be difficult for us GFX team to ensure that everything else is correct for system power states. It does work now on a couple of machines here, so I guess we can give it a go, but we may need to reconsider testing system power states if independent components will break too often.

I have two ideas what can go wrong on your machine: SSD and LPSS. To see if it's the SSD please apply the ALPM accounting patch and rerun/reattach the powertop --html. For LPSS please make sure you have the following enabled in your kconfig, I see that you don't have the corresponding driver loaded now, and it's not runtime suspended:
CONFIG_MFD_INTEL_LPSS=y
CONFIG_MFD_INTEL_LPSS_ACPI=y
CONFIG_MFD_INTEL_LPSS_PCI=y

If these don't help, some more random ideas, you could try them one-at-a-time:
- Please make sure everything is disconnected (I saw you did this for most things already)
- Reset the BIOS to default settings and enable 'ACPI Settings'/'Low Power S0 Idle Capability'
- Try to disable devices in BIOS.
Comment 31 Rodrigo Vivi 2015-11-23 20:33:15 UTC
Few suggestions:
- run: sudo powertop --auto-tune
- Remove wireless card
- Unplug all USBs
- Make sure you have a recent SSD with ALPM support as Imre mentioned.
Comment 32 cprigent 2015-11-24 17:11:14 UTC
Bug scrub:
Assigned to me to check last comments and try with different SSD
Comment 33 Imre Deak 2015-12-10 11:31:35 UTC
Christophe, any update on this?
Comment 34 Kimmo Nikkanen 2015-12-17 13:25:21 UTC
Any change that QA could validate?
Comment 35 cprigent 2016-01-21 09:00:33 UTC
I will check using a production device
Comment 36 cprigent 2016-01-22 14:41:04 UTC
Not reproduced on a SKL NUC. PC8 is reached at step 3.

Platform: NUC6i3SYH
CPU: Intel(R) Core(TM) i3-6100U CPU @ 2.30GHZ (family 6, model 78, stepping 3)
Motherboard version: H81132-502
GPU: Intel Corporation Sky Lake Integrated Graphics (rev 07)
Software
Bios: SYSKLi35.86A.0024.2015.1027.2142
Linux distribution: Ubuntu 15.10 64 bits
Kernel: drm-intel-nightly 4.4.0 8fe9e78 from http://cgit.freedesktop.org/drm-intel
  commit 8fe9e785ae04fa7c37f7935cff12d62e38054b60
  Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
  Date:   Thu Jan 21 11:03:06 2016 +0000
  drm-intel-nightly: 2016y-01m-21d-11h-02m-42s UTC integration manifest
drm: tag libdrm-2.4.66 e342c0f from http://cgit.freedesktop.org/mesa/drm/
mesa: tag mesa-11.0.8 261daab from http://cgit.freedesktop.org/mesa/mesa/
cairo: tag 1.15.2 db8a7f1 from http://cgit.freedesktop.org/cairo
waffle: master bb29b2a from https://github.com/waffle-gl/waffle
xorg-server-macros: master d7acec2 from git://git.freedesktop.org/git/xorg/util/macros
libva: tag libva-1.6.1 cb418f6 from http://cgit.freedesktop.org/libva/
vaapi-intel-driver: tag 1.6.1 2110b3a from http://cgit.freedesktop.org/vaapi/intel-driver
PowerTop 2.8 180ac4f from https://github.com/fenrus75/powertop.git
Comment 37 cprigent 2016-01-22 14:41:33 UTC
So closed


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.