Re: Dell XPS 13 9360: `slp_s0_residency_usec` stays 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Linux folks,


Am 24.05.24 um 06:53 schrieb Paul Menzel:

Am 22.05.24 um 18:37 schrieb Mario Limonciello:
On 5/22/2024 10:52, Paul Menzel wrote:

On the Intel Kaby Lake laptop Dell XPS 13 9360, `/sys/kernel/debug/pmc_core/slp_s0_residency_usec` does stay 0 even after a s2idle suspend/resume cycle.

It won't change your numbers but FWIW you can also read from

$ cat /sys/power/suspend_stats/last_hw_sleep

which is also accessible under kernel lockdown.

Sorry, I overlooked this part. I just tried it, and this also stays 0 with s2idle and deep.

    $ cat /sys/power/suspend_stats/last_hw_sleep
    0

     $ sudo dmesg
     […]
     [    0.000000] DMI: Dell Inc. XPS 13 9360/0596KF, BIOS 2.21.0 06/02/2022
     […]
     [10176.745124] PM: suspend entry (s2idle)
     [10176.757275] Filesystems sync: 0.012 seconds
     [10176.769118] Freezing user space processes
     [10176.771693] Freezing user space processes completed (elapsed 0.002 seconds)
     [10176.771710] OOM killer disabled.
     [10176.771714] Freezing remaining freezable tasks
     [10176.773487] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
     [10176.773504] printk: Suspending console(s) (use no_console_suspend to debug)
     [10176.948337] ACPI: EC: interrupt blocked
     [10176.951016] intel_pch_thermal 0000:00:14.2: CPU-PCH is cool [48C]
     [10181.281827] ACPI: EC: interrupt unblocked
     $ sudo more /sys/kernel/debug/pmc_core/slp_s0_residency_usec
     0

Is that expected?

Is it a regression?  If so; probably it's worth bisecting.

Sorry, I do not know. It’s the first time [1] I heard about this file, and that fwts [2] checks it. Do you remember, if Dell has any public logs from testing, containing `slp_s0_residency_usec`?

If it's not a regression IIUC you should probably run https://github.com/intel/S0ixSelftestTool for assistance in next steps on debugging why this is happening.

Thank you for the pointer. Please find the log file from `sudo ./s0ix-selftest-tool.sh -s` attached. Some PCIe ports are flagged.

Just as a data point, non-zero values in `/sys/kernel/debug/pmc_core/slp_s0_residency_usec` and reaching PC10 states works on a Dell XPS 13 93*7*0 with Kaby Lake R CPU (i5-8350U). Details attached.


Kind regards,

Paul


[1]: https://review.coreboot.org/c/coreboot/+/81595/10/src/mainboard/cwwk/adl/Kconfig#9
[2]: https://wiki.ubuntu.com/FirmwareTestSuite/


PS: Some system details:

```
$ LANG= lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers [8086:5904] (rev 02)
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 620 [8086:5916] (rev 02)
00:04.0 Signal processing controller [1180]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem [8086:1903] (rev 02)
00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller [8086:9d2f] (rev 21)

[…]
$ sudo ./s0ix-selftest-tool.sh -s

---Check S2idle path S0ix Residency---:

The system OS Kernel version is:
Linux purcell 6.8.11-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.8.11-1 (2024-05-26) x86_64 GNU/Linux

---Check whether your system supports S0ix or not---:

Low Power S0 Idle is:1
Your system supports low power S0 idle capability.



---Check whether intel_pmc_core sysfs files exit---:

The pmc_core debug sysfs files are OK on your system.



---Judge PC10, S0ix residency available status---:
cat: /sys/kernel/debug/pmc_core/substate_residencies: No such file or directory
grep: /sys/kernel/debug/pmc_core/substate_residencies: No such file or directory
Test system does not support S0ix.y substate

Turbostat output: 
15.029165 sec
CPU%c1	CPU%c6	CPU%c7	GFX%rc6	Pkg%pc2	Pkg%pc3	Pkg%pc6	Pkg%pc7	Pkg%pc8	Pkg%pc9Pk%pc10	SYS%LPI
1.08	0.40	96.72	1121.43	2.01	0.68	0.16	0.00	0.44	0.00	91.96	92.12
0.69	0.21	97.45	1121.68	2.01	0.68	0.16	0.00	0.44	0.00	91.97	92.14
0.80
1.49	0.10	95.95
1.93
0.64	0.43	97.24
0.89
1.26	0.87	96.23
0.94

CPU Core C7 residency after S2idle is: 96.72
GFX RC6 residency after S2idle is: 1121.43
CPU Package C-state 2 residency after S2idle is: 2.01
CPU Package C-state 3 residency after S2idle is: 0.68
CPU Package C-state 8 residency after S2idle is: 0.44
CPU Package C-state 9 residency after S2idle is: 0.00
CPU Package C-state 10 residency after S2idle is: 91.96
S0ix residency after S2idle is: 92.12
cat: /sys/kernel/debug/pmc_core/substate_residencies: No such file or directory

Congratulations! Your system achieved S2idle S0ix residency: 92.12

pmenzel@purcell:~/src/S0ixSelftestTool$ sudo more /sys/kernel/debug/pmc_core/slp_s0_residency_usec
35849424
pmenzel@purcell:~/src/S0ixSelftestTool$ sudo ./s0ix-selftest-tool.sh -r on

---Check Runtime PC10 Residency during Screen ON---:

The system OS Kernel version is:
Linux purcell 6.8.11-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.8.11-1 (2024-05-26) x86_64 GNU/Linux

modprobe cpufreq_stats failed
Cannot load from file /var/cache/powertop/saved_results.powertop
Cannot load from file /var/cache/powertop/saved_parameters.powertop
File will be loaded after taking minimum number of measurement(s) with battery only 
RAPL device for cpu 0
RAPL Using PowerCap Sysfs : Domain Mask f
RAPL device for cpu 0
RAPL Using PowerCap Sysfs : Domain Mask f
Devfreq not enabled
glob returned GLOB_ABORTED
Cannot load from file /var/cache/powertop/saved_parameters.powertop
File will be loaded after taking minimum number of measurement(s) with battery only 
Leaving PowerTOP

The system will keep idle for 40 seconds then check runtime PC10 state:


The CPU runtime PC10 residency when screen ON: 93.54%
The CPU runtime PC8 residency when screen ON: 2.68%


Turbostat log: 
30.004698 sec
CPU%c1	CPU%c6	CPU%c7	GFX%rc6	Pkg%pc2	Pkg%pc3	Pkg%pc6	Pkg%pc7	Pkg%pc8	Pkg%pc9	Pk%pc10
0.33	0.03	99.49	99.99	2.02	0.01	0.08	0.00	2.68	0.00	93.54
0.60	0.03	99.32	99.99	2.02	0.01	0.08	0.00	2.68	0.00	93.54
0.28
0.34	0.01	99.31
0.51
0.12	0.01	99.79
0.13
0.29	0.07	99.54
0.34


Your system achieved high runtime PC10 residency during screen ON: 93.54%



pmenzel@purcell:~/src/S0ixSelftestTool$ lscup
bash: lscup: command not found
pmenzel@purcell:~/src/S0ixSelftestTool$ lscpu
Architecture:             x86_64
  CPU op-mode(s):         32-bit, 64-bit
  Address sizes:          39 bits physical, 48 bits virtual
  Byte Order:             Little Endian
CPU(s):                   8
  On-line CPU(s) list:    0-7
Vendor ID:                GenuineIntel
  Model name:             Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
    CPU family:           6
    Model:                142
    Thread(s) per core:   2
    Core(s) per socket:   4
    Socket(s):            1
    Stepping:             10
    CPU(s) scaling MHz:   19%
    CPU max MHz:          3600.0000
    CPU min MHz:          400.0000
    BogoMIPS:             3799.90
    Flags:                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs b
                          ts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_dead
                          line_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust sgx bmi1 avx2 smep bm
                          i2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d arch_capabil
                          ities
Virtualization features:  
  Virtualization:         VT-x
Caches (sum of all):      
  L1d:                    128 KiB (4 instances)
  L1i:                    128 KiB (4 instances)
  L2:                     1 MiB (4 instances)
  L3:                     6 MiB (1 instance)
NUMA:                     
  NUMA node(s):           1
  NUMA node0 CPU(s):      0-7
Vulnerabilities:          
  Gather data sampling:   Mitigation; Microcode
  Itlb multihit:          KVM: Mitigation: VMX disabled
  L1tf:                   Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
  Mds:                    Mitigation; Clear CPU buffers; SMT vulnerable
  Meltdown:               Mitigation; PTI
  Mmio stale data:        Mitigation; Clear CPU buffers; SMT vulnerable
  Reg file data sampling: Not affected
  Retbleed:               Mitigation; IBRS
  Spec rstack overflow:   Not affected
  Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:             Mitigation; IBRS; IBPB conditional; STIBP conditional; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
  Srbds:                  Mitigation; Microcode
  Tsx async abort:        Mitigation; TSX disabled
$ more /sys/power/mem_sleep
[s2idle] deep
$ sudo dmesg --level alert,crit,err,warn
[    0.053771] MDS CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html for more details.
[    0.053771] MMIO Stale Data CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/processor_mmio_stale_data.html for more details.
[    0.274550] hpet_acpi_add: no address or irqs in _CRS
[    0.331296] i8042: Warning: Keylock active
[    0.346461] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
[    0.892680] wmi_bus wmi_bus-PNP0C14:01: WQBC data block query control method not found
[    1.706252] device-mapper: core: CONFIG_IMA_DISABLE_HTABLE is disabled. Duplicate IMA measurements will not be recorded in the IMA log.
[   20.223479] i2c_hid_acpi i2c-ELAN25B4:00: i2c_hid_get_input: IRQ triggered but there's no data
[   20.629111] thermal thermal_zone10: failed to read out thermal zone (-61)
[   21.186940] block nvme0n1: No UUID available providing old NGUID
[   23.204839] Bluetooth: hci0: Reading supported features failed (-16)
[   23.204846] Bluetooth: hci0: HCI LE Coded PHY feature bit is set, but its usage is not supported.
[   49.458982] psmouse serio1: Failed to disable mouse on isa0060/serio1
[   63.792705] done.
[   72.515406] psmouse serio1: Failed to disable mouse on isa0060/serio1
[  432.824698] DMAR: DRHD: handling fault status reg 2
[  432.824709] DMAR: [INTR-REMAP] Request device [f0:1f.0] fault index 0x0 [fault reason 0x25] Blocked a compatibility format interrupt request
[  433.088001] atkbd serio0: Failed to deactivate keyboard on isa0060/serio0
[  433.515411] done.
[  435.245661] Bluetooth: hci0: Reading supported features failed (-16)
[  435.245690] Bluetooth: hci0: HCI LE Coded PHY feature bit is set, but its usage is not supported.

$ sudo hw-probe --all --upload
Probe for hardware ... Ok
Reading logs ... Ok
Uploaded to DB, Thank you!

Probe URL: https://linux-hardware.org/?probe=b60475756e

[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux