Bug 204867 - 5.3.0-rc8: Dell Latitude 7400 2-in-1 (i5-8365U Coffee Lake / CFL) unable to enter system S0ix / slp_s0_residency_usec, and low_power_idle_system_residency_us stay 0
Summary: 5.3.0-rc8: Dell Latitude 7400 2-in-1 (i5-8365U Coffee Lake / CFL) unable to e...
Status: CLOSED UNREPRODUCIBLE
Alias: None
Product: Power Management
Classification: Unclassified
Component: Run-Time-PM (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: wendy.wang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-15 16:43 UTC by Leho Kraav
Modified: 2022-04-18 14:35 UTC (History)
1 user (show)

See Also:
Kernel Version: 5.3.0-rc8
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg.txt (67.94 KB, text/plain)
2019-09-15 16:43 UTC, Leho Kraav
Details
config-5.3.0-rc8 (140.96 KB, text/plain)
2019-09-15 16:44 UTC, Leho Kraav
Details

Description Leho Kraav 2019-09-15 16:43:32 UTC
Created attachment 284973 [details]
dmesg.txt

== PROBLEMS

1. system level S0ix is currently unreachable

2. opportunistic sleep (idle screen) increased `low_power_idle_cpu_residency_us` seems to work on stock Ubuntu 5.0.0 kernel, but does not work on my custom built 5.3.0-rc8 - I can't find any significant differences in key related configuration options

3. I can't fallback to S3 deep sleep, because bug 204063 (display freezes w/ DELL logo on resume)


== DEBUGGING

Bug 199689 enabled understanding better debugging of S0ix and s2idle.

I've read https://01.org/blogs/qwang59/2018/how-achieve-s0ix-states-linux and https://01.org/blogs/rajneesh/2019/using-power-management-controller-drivers-debug-low-power-platform-states

Here's some base data to get going:

$ [-] sudo ./sys-devices-system-cpu-cpuidle.sh 
/sys/class/drm/card0/power/rc6_residency_ms:2859132
/sys/devices/system/cpu/cpuidle/current_driver:intel_idle
/sys/devices/system/cpu/cpuidle/current_governor_ro:menu
/sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us:57163778
/sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us:0
/sys/kernel/debug/pmc_core/slp_s0_residency_usec:0

$ [-] sudo ./sys-kernel-debug-pmc-core-pch-ip-power-gating-status.sh 
PCH IP: 0  - PMC                                State: On
PCH IP: 1  - OPI-DMI                            State: On
PCH IP: 2  - SPI/eSPI                           State: Off
PCH IP: 3  - XHCI                               State: On
PCH IP: 4  - SPA                                State: Off
PCH IP: 5  - SPB                                State: Off
PCH IP: 6  - SPC                                State: Off
PCH IP: 7  - GBE                                State: Off
PCH IP: 8  - SATA                               State: Off
PCH IP: 9  - HDA_PGD0                           State: Off
PCH IP: 10 - HDA_PGD1                           State: Off
PCH IP: 11 - HDA_PGD2                           State: Off
PCH IP: 12 - HDA_PGD3                           State: Off
PCH IP: 13 - SPD                                State: Off
PCH IP: 14 - LPSS                               State: Off
PCH IP: 15 - LPC                                State: Off
PCH IP: 16 - SMB                                State: Off
PCH IP: 17 - ISH                                State: On
PCH IP: 18 - P2SB                               State: Off
PCH IP: 19 - NPK_VNN                            State: On
PCH IP: 20 - SDX                                State: Off
PCH IP: 21 - SPE                                State: Off
PCH IP: 22 - Fuse                               State: On
PCH IP: 23 - SBR8                               State: Off
PCH IP: 24 - CSME_FSC                           State: Off
PCH IP: 25 - USB3_OTG                           State: Off
PCH IP: 26 - EXI                                State: Off
PCH IP: 27 - CSE                                State: Off
PCH IP: 28 - CSME_KVM                           State: Off
PCH IP: 29 - CSME_PMT                           State: Off
PCH IP: 30 - CSME_CLINK                         State: Off
PCH IP: 31 - CSME_PTIO                          State: Off
PCH IP: 32 - CSME_USBR                          State: Off
PCH IP: 33 - CSME_SUSRAM                        State: Off
PCH IP: 34 - CSME_SMT1                          State: Off
PCH IP: 35 - CSME_SMT4                          State: Off
PCH IP: 36 - CSME_SMS2                          State: Off
PCH IP: 37 - CSME_SMS1                          State: Off
PCH IP: 38 - CSME_RTC                           State: Off
PCH IP: 39 - CSME_PSF                           State: Off
PCH IP: 40 - SBR0                               State: On
PCH IP: 41 - SBR1                               State: On
PCH IP: 42 - SBR2                               State: On
PCH IP: 43 - SBR3                               State: Off
PCH IP: 44 - SBR4                               State: On
PCH IP: 45 - SBR5                               State: On
PCH IP: 46 - CSME_PECI                          State: Off
PCH IP: 47 - PSF1                               State: On
PCH IP: 48 - PSF2                               State: On
PCH IP: 49 - PSF3                               State: On
PCH IP: 50 - PSF4                               State: On
PCH IP: 51 - CNVI                               State: On
PCH IP: 52 - UFS0                               State: Off
PCH IP: 53 - EMMC                               State: Off
PCH IP: 54 - SPF                                State: Off
PCH IP: 55 - SBR6                               State: On
PCH IP: 56 - SBR7                               State: On
PCH IP: 57 - NPK_AON                            State: On
PCH IP: 58 - HDA_PGD4                           State: Off
PCH IP: 59 - HDA_PGD5                           State: Off
PCH IP: 60 - HDA_PGD6                           State: Off
PCH IP: 61 - PSF6                               State: Off
PCH IP: 62 - PSF7                               State: Off
PCH IP: 63 - PSF8                               State: Off

== QUESTIONS

https://01.org/blogs/qwang59/2018/how-achieve-s0ix-states-linux presents an `lpr_ignore` looper script to try to find devices disturbing `low_power_idle_cpu_residency_us`.

Is this tool also usable for `low_power_idle_system_residency_us`?

What could be the next step?
Comment 1 Leho Kraav 2019-09-15 16:44:01 UTC
Created attachment 284975 [details]
config-5.3.0-rc8

Kernel config
Comment 2 wendy.wang 2019-09-16 05:00:06 UTC
So the questions for this bug are:

1. Why cannot get s0ix residency after doing one cycle s2idle, please show us this one:
echo 1 > /sys/kernel/debug/pmc_core/slp_s0_dbg_latch
rtcwake -m freeze -s 30
cat /sys/kernel/debug/pmc_core/slp_s0_debug_status

and can you please try disable wifi, then double check the S2idle s0ix status?


2. Why your custom built 5.3.0-rc8 kernel cannot get opportunistic PC10? 
Did you run powertop --auto-tune before you check the opportunistic PC10?
Does your display support PSR? cat /sys/kernel/debug/dri/0/i915_dmc_info

Can you get pc10 after resuming from S2idle (rtcwake -m freeze -s 20)?
cat /sys/kernel/debug/pmc_core/package_cstate_show

ltr_ignore scrip will help for the PC10 in case your devices have ltr issue.
which can be have a try for this pc10 failure case.
Comment 3 Leho Kraav 2019-09-16 05:44:15 UTC
Thank you for responding.

> Did you run powertop --auto-tune before you check the opportunistic PC10?

Yes, after I learned about it, I have it as a systemd service. Have repeatedly checked this, all Tunables are in Good state.

> Can you please try disable wifi

I have tested both disabling wifi, and also with all system peripherals disabled at BIOS level. There is no apparent change in this behavior.

PS I don't want to confuse people, but I should note, that *I think* I had one "Try Ubuntu" USB stick boot, where both `low_power_idle_system_residency_us` and 
`low_power_idle_cpu_residency_us` started increasing immediately, without suspend.

I think all system devices were disabled at BIOS level, as that was the specific test I was attempting.

After suspending in this state, I rebooted back and forth between my kernel and Ubuntu - and I have not been able to increase `low_power_idle_system_residency_us` counter since, with either kernel. I wish I had taken a photo, because later you start doubting whether you really saw what you saw.

It feels like some piece of platform hardware now stays in some active state.

> Does your display support PSR? cat /sys/kernel/debug/dri/0/i915_dmc_info

Yes, I believe it supports PSR2 even, it's a modern CFL machine.

$ [-] sudo cat /sys/kernel/debug/dri/0/i915_dmc_info
fw loaded: yes
path: i915/kbl_dmc_ver1_04.bin
version: 1.4
DC3 -> DC5 count: 643885
DC5 -> DC6 count: 642912
program base: 0x09004040
ssp base: 0x00002fc0
htp: 0x00b40068

> 1. Why cannot get s0ix residency after doing one cycle s2idle, please show us
> this one:

papaya ~ # echo 1 > /sys/kernel/debug/pmc_core/slp_s0_dbg_latch
papaya ~ # rtcwake -m freeze -s 30
rtcwake: wakeup from "freeze" using /dev/rtc0 at Mon Sep 16 05:32:43 2019
papaya ~ # cat /sys/kernel/debug/pmc_core/slp_s0_debug_status
SLP_S0_DBG: AUDIO_D3                        	State: Yes
SLP_S0_DBG: OTG_D3                          	State: Yes
SLP_S0_DBG: XHCI_D3                         	State: No
SLP_S0_DBG: LPIO_D3                         	State: Yes
SLP_S0_DBG: SDX_D3                          	State: Yes
SLP_S0_DBG: SATA_D3                         	State: Yes
SLP_S0_DBG: UFS0_D3                         	State: Yes
SLP_S0_DBG: UFS1_D3                         	State: Yes
SLP_S0_DBG: EMMC_D3                         	State: Yes
SLP_S0_DBG: SDIO_PLL_OFF                    	State: Yes
SLP_S0_DBG: USB2_PLL_OFF                    	State: Yes
SLP_S0_DBG: AUDIO_PLL_OFF                   	State: Yes
SLP_S0_DBG: OC_PLL_OFF                      	State: Yes
SLP_S0_DBG: MAIN_PLL_OFF                    	State: No
SLP_S0_DBG: XOSC_OFF                        	State: No
SLP_S0_DBG: LPC_CLKS_GATED                  	State: Yes
SLP_S0_DBG: PCIE_CLKREQS_IDLE               	State: Yes
SLP_S0_DBG: AUDIO_ROSC_OFF                  	State: Yes
SLP_S0_DBG: HPET_XOSC_CLK_REQ               	State: Yes
SLP_S0_DBG: PMC_ROSC_SLOW_CLK               	State: No
SLP_S0_DBG: AON2_ROSC_GATED                 	State: No
SLP_S0_DBG: CLKACKS_DEASSERTED              	State: No
SLP_S0_DBG: MPHY_CORE_GATED                 	State: No
SLP_S0_DBG: CSME_GATED                      	State: Yes
SLP_S0_DBG: USB2_SUS_GATED                  	State: No
SLP_S0_DBG: DYN_FLEX_IO_IDLE                	State: Yes
SLP_S0_DBG: GBE_NO_LINK                     	State: Yes
SLP_S0_DBG: THERM_SEN_DISABLED              	State: No
SLP_S0_DBG: PCIE_LOW_POWER                  	State: No
SLP_S0_DBG: ISH_VNNAON_REQ_ACT              	State: Yes
SLP_S0_DBG: ISH_VNN_REQ_ACT                 	State: No
SLP_S0_DBG: CNV_VNNAON_REQ_ACT              	State: Yes
SLP_S0_DBG: CNV_VNN_REQ_ACT                 	State: No
SLP_S0_DBG: NPK_VNNON_REQ_ACT               	State: No
SLP_S0_DBG: PMSYNC_STATE_IDLE               	State: No
SLP_S0_DBG: ALST_GT_THRES                   	State: No
SLP_S0_DBG: PMC_ARC_PG_READY                	State: No

> Can you get pc10 after resuming from S2idle (rtcwake -m freeze -s 20)?

papaya ~ # cat /sys/kernel/debug/pmc_core/package_cstate_show
Package C2 : 1700042915
Package C3 : 1479401909
Package C6 : 961542094
Package C7 : 30824383
Package C8 : 2840699353
Package C9 : 190229330
Package C10 : 40357279406

> ltr_ignore scrip will help for the PC10 in case your devices have ltr issue.

Should I increase the counter to 64 instead of 32? Or just first 32 matter?
Comment 4 wendy.wang 2019-09-16 13:32:13 UTC
From the papaya ~ # cat /sys/kernel/debug/pmc_core/slp_s0_debug_status log,
we notice below ones are show Not in the state, based on my experience, we should check the high speed devices first(Maybe I'm wrong), just have a try. 

SLP_S0_DBG: XHCI_D3                         	State: No---------can be ignore
SLP_S0_DBG: MAIN_PLL_OFF                    	State: No---------need check high speed devices first
SLP_S0_DBG: XOSC_OFF                        	State: No---------not sure
SLP_S0_DBG: PMC_ROSC_SLOW_CLK               	State: No---------can be ignore
SLP_S0_DBG: AON2_ROSC_GATED                 	State: No---------can be ignore temporaily 
SLP_S0_DBG: CLKACKS_DEASSERTED              	State: No---------not sure
SLP_S0_DBG: MPHY_CORE_GATED                 	State: No---------need check first high-speed devices first
SLP_S0_DBG: USB2_SUS_GATED                  	State: No---------not sure
SLP_S0_DBG: THERM_SEN_DISABLED              	State: No---------not sure
SLP_S0_DBG: PCIE_LOW_POWER                  	State: No---------can be ignore
SLP_S0_DBG: ISH_VNN_REQ_ACT                 	State: No---------can be ignore
SLP_S0_DBG: CNV_VNN_REQ_ACT                 	State: No---------can be ignore
SLP_S0_DBG: NPK_VNNON_REQ_ACT               	State: No---------can be ignore
SLP_S0_DBG: PMSYNC_STATE_IDLE               	State: No---------can be ignore
SLP_S0_DBG: ALST_GT_THRES                   	State: No---------not sure
SLP_S0_DBG: PMC_ARC_PG_READY                	State: No---------can be ignore

Then let's check which high speed devices your CFL has, I suggest to check from NVMe(I just guess you are running NVMe) and GBe first.
XHCI
XDCI
SATA
NVMe
PCIe
SCC 
GBe

The questions are: 
For GBe: Did you enabled PCH LAN controller in the BIOS setup? How about disable it and re-check S2idle S0ix?

For NVMe: linux kernel v5.3 have some change for the NVMe PCI D3, and make sure ASPM policy needs to be "default" or "powersupersave" (via /sys/module/pcie_aspm/parameters/policy)
Comment 5 wendy.wang 2019-09-16 13:35:02 UTC
For this question:

ltr_ignore scrip will help for the PC10 in case your devices have ltr issue.


Should I increase the counter to 64 instead of 32? Or just first 32 matter?

Which should depend on this cat /sys/kernel/debug/pmc_core/ltr_show, to see how many devices support LTR value, no need counter to 64.
Comment 6 Leho Kraav 2019-09-16 16:54:54 UTC
I upgraded to 5.3.0 release mid-day, and surprisingly, now I'm suddenly seeing `low_power_idle_system_residency_us` counters increase, after exactly one suspend.

There were a small set of various reverts from 5.3.0-rc8 to release. Maybe one of these patches have an effect here..?

I'm noticing I may have Audio disabled in BIOS right now, no `snd-hda-intel` modules are loading.

Some logs below. Anything else interesting I can paste here, let me know.

$ [-] sudo ./sys-devices-system-cpu-cpuidle.sh 
/sys/class/drm/card0/power/rc6_residency_ms:5398373
/sys/devices/system/cpu/cpuidle/current_driver:intel_idle
/sys/devices/system/cpu/cpuidle/current_governor_ro:menu
/sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us:3844954290
/sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us:77205427
/sys/kernel/debug/pmc_core/slp_s0_residency_usec:73962800

$ [-] sudo dmesg | grep suspend
[16308.032289] PM: suspend entry (s2idle)
[16308.161492] printk: Suspending console(s) (use no_console_suspend to debug)
[29868.207178] PM: suspend exit

$ [-] diff -urN slp-s0-debug-5.3.0-rc8.txt slp-s0-debug-5.3.0.txt 
--- slp-s0-debug-5.3.0-rc8.txt	2019-09-16 19:39:40.771166077 +0300
+++ slp-s0-debug-5.3.0.txt	2019-09-16 19:40:34.436306186 +0300
@@ -1,6 +1,6 @@
 SLP_S0_DBG: AUDIO_D3                            State: Yes
 SLP_S0_DBG: OTG_D3                              State: Yes
-SLP_S0_DBG: XHCI_D3                             State: No
+SLP_S0_DBG: XHCI_D3                             State: Yes
 SLP_S0_DBG: LPIO_D3                             State: Yes
 SLP_S0_DBG: SDX_D3                              State: Yes
 SLP_S0_DBG: SATA_D3                             State: Yes
@@ -11,7 +11,7 @@
 SLP_S0_DBG: USB2_PLL_OFF                        State: Yes
 SLP_S0_DBG: AUDIO_PLL_OFF                       State: Yes
 SLP_S0_DBG: OC_PLL_OFF                          State: Yes
-SLP_S0_DBG: MAIN_PLL_OFF                        State: No
+SLP_S0_DBG: MAIN_PLL_OFF                        State: Yes
 SLP_S0_DBG: XOSC_OFF                            State: No
 SLP_S0_DBG: LPC_CLKS_GATED                      State: Yes
 SLP_S0_DBG: PCIE_CLKREQS_IDLE                   State: Yes
@@ -25,13 +25,13 @@
 SLP_S0_DBG: USB2_SUS_GATED                      State: No
 SLP_S0_DBG: DYN_FLEX_IO_IDLE                    State: Yes
 SLP_S0_DBG: GBE_NO_LINK                         State: Yes
-SLP_S0_DBG: THERM_SEN_DISABLED                  State: No
+SLP_S0_DBG: THERM_SEN_DISABLED                  State: Yes
 SLP_S0_DBG: PCIE_LOW_POWER                      State: No
 SLP_S0_DBG: ISH_VNNAON_REQ_ACT                  State: Yes
 SLP_S0_DBG: ISH_VNN_REQ_ACT                     State: No
 SLP_S0_DBG: CNV_VNNAON_REQ_ACT                  State: Yes
 SLP_S0_DBG: CNV_VNN_REQ_ACT                     State: No
 SLP_S0_DBG: NPK_VNNON_REQ_ACT                   State: No
-SLP_S0_DBG: PMSYNC_STATE_IDLE                   State: No
-SLP_S0_DBG: ALST_GT_THRES                       State: No
+SLP_S0_DBG: PMSYNC_STATE_IDLE                   State: Yes
+SLP_S0_DBG: ALST_GT_THRES                       State: Yes
 SLP_S0_DBG: PMC_ARC_PG_READY                    State: No
Comment 7 wendy.wang 2019-09-19 16:27:42 UTC
It's interesting, I see
-SLP_S0_DBG: MAIN_PLL_OFF                        State: No
+SLP_S0_DBG: MAIN_PLL_OFF                        State: Yes

Your v5.3 kernel can have Main PLL OFF, which let you get S0ix residency, but it's hard to say which device power state changed, and MAIN PLL can OFF right now.
Maybe this one, but not sure.
-SLP_S0_DBG: XHCI_D3                             State: No
+SLP_S0_DBG: XHCI_D3                             State: Yes

This is good, which is the communication thing between CPU and PCH.
-SLP_S0_DBG: PMSYNC_STATE_IDLE                   State: No
+SLP_S0_DBG: PMSYNC_STATE_IDLE                   State: Yes

I do not know what is ALST:
-SLP_S0_DBG: ALST_GT_THRES                       State: No
+SLP_S0_DBG: ALST_GT_THRES                       State: Yes
 
Looks like more explanation need expert to comment.

Anyway, glad to see you have s0ix residency right now.
Comment 8 Leho Kraav 2019-09-19 17:32:07 UTC
> Anyway, glad to see you have s0ix residency right now.

Yep, but should be noted that in this session I'm running with most devices disabled in BIOS, kind of "limp-mode".

Most importantly, Audio is off.

Thunderbolt, camera, fingerprint reader, touchscreen, also off.

My next step after the work week will be to reboot and enable Audio and Camera, as those are devices I'm actually likely to use.

> For GBe: Did you enabled PCH LAN controller in the BIOS setup? How about
> disable it and re-check S2idle S0ix?

I think I missed replying about GBe before: this 7400 2-in-1 model does *not* have a built-in Ethernet adapter.

```
$ [-] sudo lspci
00:00.0 Host bridge: Intel Corporation Device 3e34 (rev 0c)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 0c)
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model
00:12.0 Signal processing controller: Intel Corporation Cannon Point-LP Thermal Controller (rev 30)
00:13.0 Serial controller: Intel Corporation Cannon Point-LP Integrated Sensor Hub (rev 30)
00:14.0 USB controller: Intel Corporation Cannon Point-LP USB 3.1 xHCI Controller (rev 30)
00:14.2 RAM memory: Intel Corporation Cannon Point-LP Shared SRAM (rev 30)
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 30)
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #0 (rev 30)
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP Serial IO I2C Controller #1 (rev 30)
00:16.0 Communication controller: Intel Corporation Cannon Point-LP MEI Controller #1 (rev 30)
00:1c.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #1 (rev f0)
00:1d.0 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #9 (rev f0)
00:1d.4 PCI bridge: Intel Corporation Cannon Point-LP PCI Express Root Port #13 (rev f0)
00:1f.0 ISA bridge: Intel Corporation Cannon Point-LP LPC Controller (rev 30)
00:1f.4 SMBus: Intel Corporation Cannon Point-LP SMBus Controller (rev 30)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Point-LP SPI Controller (rev 30)
01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01)
02:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
03:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
03:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
03:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
03:04.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
04:00.0 System peripheral: Intel Corporation JHL6540 Thunderbolt 3 NHI (C step) [Alpine Ridge 4C 2016] (rev 02)
38:00.0 USB controller: Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016] (rev 02)
6d:00.0 Non-Volatile memory controller: Toshiba America Info Systems XG4 NVMe SSD Controller (rev 01)
```
Comment 9 Zhang Rui 2019-09-29 08:07:24 UTC
So I guess we can close this bug.
Comment 10 Leho Kraav 2019-09-30 08:12:18 UTC
I've been discussing with Mario Limonciello in e-mail as well. Learning is that while I'm indeed now somehow getting some residency (uptime: 14 days):

$ [-] sudo ./sys-devices-system-cpu-cpuidle.sh 
/sys/class/drm/card0/power/rc6_residency_ms:18328374
/sys/devices/system/cpu/cpuidle/current_driver:intel_idle
/sys/devices/system/cpu/cpuidle/current_governor_ro:menu
/sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us:7271198865
/sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us:69456920146
/sys/kernel/debug/pmc_core/slp_s0_residency_usec:66539729500
/sys/module/pcie_aspm/parameters/policy:[default] performance powersave powersupersave

...on this 7400 2-in-1 machine s2idle only lasts about max 48h before battery goes from full to completely depleted, and this is with some key peripherals disabled in BIOS. Some things are definitely still not low-powering themselves.

Mario advised me he's able to s2idle a healthy laptop configuration (granted, another hardware model) for up to 2 weeks, even.

There's more to uncover here, but it will take me some time to collect more data. We can leave the bug as closed, I'll add data and additional discoveries over time, and we'll see where it goes.
Comment 11 Leho Kraav 2019-10-26 13:41:35 UTC
Bug 202519 pointed out additional S0ix patches merged into 5.4.0-rc.

This seems to have made a significant difference on my Latitude 7400 2-in-1 machine.

I now have all devices enabled in BIOS, and s2idle still consumed only 5% battery over 7 hrs today, whereas it would be ~5% / hr before.

Looking good \o/
Comment 12 Leho Kraav 2022-04-08 20:24:35 UTC
If Wendy could help with diagnosing a s0ix regression with ICL 7390 at bug 215367, would be much appreciated. I can't figure it out.
Comment 13 wendy.wang 2022-04-18 14:35:37 UTC
Hi Kraav,
I've bring that issue to our Internal Power management forum meeting, David will look at that issue.

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