intel / intel/S0ixSelftestTool
Main script says everything's fine but debug function pci_d3_status_check says not
- Dominant language
- Shell
- Stars
- 213
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I've tried the S0ix script on my Dell Laptop featuring an Intel Alder Lake i7-1265U because I noticed a battery drain during suspend.
The script was pointing a faulty NVME SSD, as described in this [Dell community thread](https://www.dell.com/community/en/conversations/latitude/latitude-7430-nvme-ssd-does-not-enter-into-suspend-mode-d3cold-and-causes-battery-drain/688666a7b185a2077bfea9ee)
So I tried another NVME SSD, and now the S0ix script says I can reach the deepest sleep state whereas the same pci D3cold errors are present (but not tested by default) and the battery still drains (about 2-3 Watts). So is the success a false-negative? What output should I believe?
S0iX success
```
CPU Core C7 residency after S2idle is: 19.45
CPU Package C-state 2 residency after S2idle is: 2.15
CPU Package C-state 3 residency after S2idle is: 10.55
CPU Package C-state 6 residency after S2idle is: 0.00
CPU Package C-state 8 residency after S2idle is: 0.66
CPU Package C-state 10 residency after S2idle is: 81.09
S0ix residency after S2idle is: 74.82
S0ix substate after S2idle:
S0i2.0 S0i3.0
S0ix substate residency after S2idle:
0 11960758
S0ix substates residency delta value: S0i2.0 0
S0ix substates residency delta value: S0i3.0 11960758
Congratulations! Your system achieved the deepest S0ix substate!
Here is the S0ix substates status:
Substate Residency
S0i2.0 0
S0i3.0 11960758
```
If I slightly modify the script to execute the pci_d3_status_check function before anything, then I get the same error as I reported in the Dell forum originally:
S0ix pci errors
```
Checking PCI Devices D3 States:
[ 48.184056] snd_hda_intel 0000:00:1f.3: PCI PM: Suspend power state: D3hot
[ 48.184121] i915 0000:00:02.0: PCI PM: Suspend power state: D3hot
[ 48.187237] xhci_hcd 0000:00:0d.0: PCI PM: Suspend power state: D3cold
[ 48.200795] intel_ish_ipc 0000:00:12.0: PCI PM: Suspend power state: D0
[ 48.200802] intel_ish_ipc 0000:00:12.0: PCI PM: Skipped
[ 48.200950] i801_smbus 0000:00:1f.4: PCI PM: Suspend power state: D0
[ 48.200959] i801_smbus 0000:00:1f.4: PCI PM: Skipped
[ 48.213421] nvme 0000:01:00.0: PCI PM: Suspend power state: D3hot
[ 48.213830] pcieport 0000:00:06.0: PCI PM: Suspend power state: D0
[ 48.213849] pcieport 0000:00:06.0: PCI PM: Skipped
[ 48.215666] mei_me 0000:00:16.0: PCI PM: Suspend power state: D3hot
[ 48.216911] proc_thermal_pci 0000:00:04.0: PCI PM: Suspend power state: D3hot
[ 48.217893] intel-lpss 0000:00:15.1: PCI PM: Suspend power state: D3hot
[ 48.219578] xhci_hcd 0000:00:14.0: PCI PM: Suspend power state: D3hot
[ 48.219682] iwlwifi 0000:00:14.3: PCI PM: Suspend power state: D3hot
[ 48.223407] thunderbolt 0000:00:0d.2: PCI PM: Suspend power state: D3cold
Checking PCI Devices tree diagram:
-[0000:00]-+-00.0 Intel Corporation Alder Lake-U15 Host and DRAM Controller
+-02.0 Intel Corporation Alder Lake-UP3 GT2 [Iris Xe Graphics]
+-04.0 Intel Corporation Alder Lake Innovation Platform Framework Processor Participant
+-06.0-[01]----00.0 KIOXIA Corporation NVMe SSD
+-07.0-[02-39]--
+-07.1-[3a-71]--
+-08.0 Intel Corporation 12th Gen Core Processor Gaussian & Neural Accelerator
+-0d.0 Intel Corporation Alder Lake-P Thunderbolt 4 USB Controller
+-0d.2 Intel Corporation Alder Lake-P Thunderbolt 4 NHI #0
+-12.0 Intel Corporation Alder Lake-P Integrated Sensor Hub
+-14.0 Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller
+-14.2 Intel Corporation Alder Lake PCH Shared SRAM
+-14.3 Intel Corporation Alder Lake-P PCH CNVi WiFi
+-15.0 Intel Corporation Alder Lake PCH Serial IO I2C Controller #0
+-15.1 Intel Corporation Alder Lake PCH Serial IO I2C Controller #1
+-16.0 Intel Corporation Alder Lake PCH HECI Controller
+-1f.0 Intel Corporation Alder Lake PCH eSPI Controller
+-1f.3 Intel Corporation Alder Lake PCH-P High Definition Audio Controller
+-1f.4 Intel Corporation Alder Lake PCH-P SMBus Host Controller
\-1f.5 Intel Corporation Alder Lake-P PCH SPI Controller
The pcieport 0000:00:06.0 ASPM enable status:
LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
Pcieport is not in D3cold:
0000:00:06.0
```
By the way, the script reports an error about the NVME SSD but two others D3cold attempts are skipped whereas at least one of those pci devices pretend to support D3cold mode according to `lspci -vv`. The remaining hot devices are Intel ISH (should support D3cold) and Intel SMBus (not specified).
lspci excerpt of the pci devices not reaching D3cold
```
00:12.0 Serial controller: Intel Corporation Alder Lake-P Integrated Sensor Hub (rev 01) (prog-if 00 [8250])
Subsystem: Dell Alder Lake-P Integrated Sensor Hub
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR-
Kernel driver in use: intel_ish_ipc
Kernel modules: intel_ish_ipc
00:1f.4 SMBus: Intel Corporation Alder Lake PCH-P SMBus Host Controller (rev 01)
Subsystem: Dell Alder Lake PCH-P SMBus Host Controller
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR-
Extra questions are: what could causes those skips? and how to avoid them? I know that those questions may not be relevant to the present github issue, but if Intel's devices are causing the problem I guess that Intel developers of the S0ix script here could get in touch with their colleagues in charge of ISH/SMBus. I would be very glad if you can help me on that part too; if not enough related to this issue, please answer on the Dell forum directly!
Note about the system
Linux Mint 22.1 with kernel 6.8.0-71-generic on Dell Latitude 7430 with Intel Alder Lake i7-1265U. /sys/power/mem_sleep shows only [s2idle].
Wake on LAN and Wake on USB are disabled in BIOS. Disabling all wakeup sources (except platform ones) in /proc/acpi/wakeup does not change anything. I think that the problem is not OS-dependent because I got a similar battery drain with Windows 11.
Some posts about Dell battery drain suggest modifying BIOS options including one to "Block deep sleep". This seems silly but I tried anyway to Block deep sleep in BIOS and s2idle is still working in such case, with the only difference to not waking up from touchpad (instead I have to press any key). If Block deep sleep option is enabled, I also need to bypass the `slp_s0_support` call in the S0ix script because the firmware pretends to not support low power mode whereas s2idle works as if the option was not selected (except for the touchpad). Doing so, the S0ix script outputs the same as before.
Contributor guide
Research direction
The issue centers on the S0ix script's pci_d3_status_check and slp_s0_support entry points. First reproduce the reported Alder Lake s2idle output and compare the main success path with the PCI checks, including skipped D3 states. Done means the tool's result and diagnostics agree or clearly explain why they differ.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, shell
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100