[FEAT] Suspend tests should examine time in hardware sleep state

Bug #2019728 reported by Mario Limonciello
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Firmware Test Suite
New
Wishlist
Unassigned

Bug Description

Kernel 6.4-rc1 and later have the ability to advertise time spent in a hardware sleep state. This is by sysfs files that will be created on supported systems.

I suggest that suspend testing should capture the values in these files if present and indicate if there was little or no residency in a hardware sleep state.

https://github.com/torvalds/linux/blob/master/Documentation/ABI/testing/sysfs-power#L416

IMO: A good test would be that if the suspend is greater than 60 seconds that at least 90% of the time is in a hardware sleep state.

Revision history for this message
Ivan Hu (ivan.hu) wrote :

Where is 90% come from? any specification can support it?
And what happen if the test less than 60 seconds, still support 90% of the time?

Revision history for this message
Mario Limonciello (superm1) wrote :

Empirical measurements. I've found this this is a good amount of time for hardware to settle into proper steady state.

In shorter cycles you spend more of the time entering and exiting and so your residency is low.

For example I find 10s cycle only reaches 75% of the time.

There might be Windows HLK requirements for this too, but if so they don't appear public.

Revision history for this message
Ivan Hu (ivan.hu) wrote :

I have consulted with our certificate team regarding the test criteria for Windows HLK requirements for this case, but unfortunately, no one was able to provide an answer. As a result, we will put this to wishlist and wait until we obtain more information about the test requirements.

Changed in fwts:
importance: Undecided → Wishlist
summary: - Suspend tests should examine time in hardware sleep state
+ [FEAT] Suspend tests should examine time in hardware sleep state
Revision history for this message
Mario Limonciello (superm1) wrote :

(Follow up from https://bugs.launchpad.net/fwts/+bug/2029452/comments/7)

> I don't know much about /sys/power/suspend_stats/last_hw_sleep, could you provide more details?
> I am concerning the slp_s0_residency_usec will only be increased when the platform actually go to PC10.
> That's intel suggests to test the s2idle. https://github.com/intel/S0ixSelftestTool
> How about /sys/power/suspend_stats/last_hw_sleep, will it be increased on other PC states or only PC10?

So this file is "opt-in". It will only be visible if it is populated by the OEM's driver.
For AMD this is amd_pmc driver: https://github.com/torvalds/linux/blob/v6.5-rc7/drivers/platform/x86/amd/pmc.c#L376
For Intel this is intel_pmc driver: https://github.com/torvalds/linux/blob/v6.5-rc7/drivers/platform/x86/intel/pmc/core.c#L1317

For Intel case yes s0ix counter only increases while you're in PC10.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.