s3 add checking the device signed wakeup events

Bug #2029452 reported by Ivan Hu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Firmware Test Suite
Fix Released
High
Ivan Hu

Bug Description

The file, /sys/kernel/debug/wakeup_sources, lists wakeup source for all wakeup devices. Currently, fwts sets wakeup event by RTC(/dev/rtc), it could be used to check if suspend wake up by expected wakeup event as well.

Ivan Hu (ivan.hu)
Changed in fwts:
importance: Undecided → Wishlist
assignee: nobody → Ivan Hu (ivan.hu)
status: New → In Progress
Revision history for this message
Ivan Hu (ivan.hu) wrote :

compare the wakeup sources and check which the increased event count, get the signaled events such as below,

s3: Sleep suspend/resume test.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Test 1 of 1: Sleep suspend/resume test.
Defaulted to 1 test, use --s3-multiple=N to run more s2idle cycles
s2idle cycle 1 of 1
Detecting the power method.
Response to CanSuspend is yes
User allowed to execute the CanSuspend action
Using logind as the default power method.
Requesting Suspend action
Skipping the minimum delay (0) and using a 3 seconds delay instead
s2idle duration = 30.
wakeup source name: "00:01" wakeup event was signaled.
pm-action returned 0 after 30 seconds.
FAILED [HIGH] S2idleNotDeepest: Test 1, Expected /sys/kernel/debug/pmc_core/slp_s0_residency_usec to increase from 0, got 0.
Suspend/Resume Timings:
  Suspend: 0.720 seconds.
  Resume: 0.936 seconds.
Completed s2idle cycle(s)
PASSED: Test 1, No kernel log errors detected.
PASSED: Test 1, No PM related suspend issues detected.
PASSED: Test 1, No device errors detected.
PASSED: Test 1, No kernel oopses detected.
PASSED: Test 1, No kernel WARN_ON warnings detected.
Found 1 s2idle errors.
PASSED: Test 1, Found no errors doing 1 suspend/resume cycle(s).
PASSED: Test 1, All suspends took less than 15.00 seconds.
PASSED: Test 1, All resumes took less than 15.00 seconds.

Ivan Hu (ivan.hu)
summary: - s3 add checking the wakeup event
+ s3 add listing the devices signed wakeup event
Ivan Hu (ivan.hu)
summary: - s3 add listing the devices signed wakeup event
+ s3 add checking the devices signed wakeup event
summary: - s3 add checking the devices signed wakeup event
+ s3 add checking the device signed wakeup events
Changed in fwts:
importance: Wishlist → High
Revision history for this message
Ivan Hu (ivan.hu) wrote :
Revision history for this message
Ivan Hu (ivan.hu) wrote :

another patch which help to dump the wakeup sources for debug has sent to fwts-devel,

https://lists.ubuntu.com/archives/fwts-devel/2023-August/013702.html

Changed in fwts:
status: In Progress → Fix Committed
Revision history for this message
Mario Limonciello (superm1) wrote :

> FAILED [HIGH] S2idleNotDeepest: Test 1, Expected /sys/kernel/debug/pmc_core/slp_s0_residency_usec to increase from 0, got 0.

Please don't use this file. It's vendor dependent. Use this one instead:

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

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

@Mario,

yes, the patch for test slp_s0_residency_usec
https://lists.ubuntu.com/archives/fwts-devel/2020-August/012164.html

is suggested from Intel for testing the PC10 for s2idle.

https://01.org/blogs/qwang59/2020/linux-s0ix-troubleshooting

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

> is suggested from Intel for testing the PC10 for s2idle.

Right; but now there is a vendor agnostic one. If you can please use the vendor agnostic one and "fall back" to that one then you can have it work on both Intel and AMD systems.

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

@Mario,

Understood that our goad is to support the tests on both Intel and AMD systems.
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?

BTW, could you file another bug to discuss the last_hw_sleep tests?

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

> I don't know much about /sys/power/suspend_stats/last_hw_sleep, could you provide more details?

Actually I already filed https://bugs.launchpad.net/fwts/+bug/2019728. I'll move discussion there and answer your questions in it.

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

fix released in the fwts release 23.09.00

Changed in fwts:
status: Fix Committed → Fix Released
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.