From 188023521d796352e9e6ac78e0e5e0952bf3c452 Mon Sep 17 00:00:00 2001 From: Kai-Chuan Hsieh Date: Tue, 25 May 2021 15:30:48 +0800 Subject: Add: check package cstate during short idle LP: #1928053 According to Intel blog [1], the system can reach at least PC8 when screen on. The test job check if the device can reach PC8 during idle screen on. For platform has no PC8, the target shoule be as deeper as possible. [1] https://01.org/blogs/qwang59/2020/linux-s0ix-troubleshooting --- units/cpu/test-plan.pxu | 2 -- units/power-management/jobs.pxu | 25 +++++++++++++++++++++++++ units/power-management/test-plan.pxu | 9 +++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) (limited to 'units') diff --git a/units/cpu/test-plan.pxu b/units/cpu/test-plan.pxu index eb2dabb..46e9ac4 100644 --- a/units/cpu/test-plan.pxu +++ b/units/cpu/test-plan.pxu @@ -32,8 +32,6 @@ include: cpu/offlining_test certification-status=blocker cpu/topology certification-status=blocker cpu/clocktest - power-management/cpu-low-power-idle - power-management/system-low-power-idle id: cpu-cert-blockers unit: test plan diff --git a/units/power-management/jobs.pxu b/units/power-management/jobs.pxu index d2ef21b..726b4ae 100644 --- a/units/power-management/jobs.pxu +++ b/units/power-management/jobs.pxu @@ -331,6 +331,31 @@ plugin: shell command: failed_service_check.sh estimated_duration: 1.0 +id: power-management/idle-screen-on-residency-check +category_id: com.canonical.plainbox::power-management +_summary: Test if CPU records time in desired low power C-state when idle +_description: + When the system has the screen on, but the CPU is idle, it should enter deeper idle state + to reduce power consumption. The expected states are identified as PC8, PC9 and PC10. + For more detail refer to https://01.org/blogs/qwang59/2020/linux-s0ix-troubleshooting +unit: job +plugin: shell +requires: + cpuinfo.type == 'GenuineIntel' + package.name == 'msr-tools' + sleep.mem_sleep == 's2idle' +command: + short-idle-check.sh -s 20 + RET=$? + if [ $RET -ne 0 ]; then + echo "The CPU package target idle state residency is 0." + echo "It will consume more power when the system has the screen on, but the CPU is idle." + echo "More detail is in https://01.org/blogs/qwang59/2020/linux-s0ix-troubleshooting." + exit 1 + fi +user: root +estimated_duration: 22 + id: power-management/cpu-low-power-idle category_id: com.canonical.plainbox::power-management _summary: CPU low power idle residency check diff --git a/units/power-management/test-plan.pxu b/units/power-management/test-plan.pxu index 8391bca..0cc9997 100644 --- a/units/power-management/test-plan.pxu +++ b/units/power-management/test-plan.pxu @@ -86,3 +86,12 @@ _description: Manual power tests for Snappy Ubuntu Core devices include: power-management/poweroff-manual power-management/reboot-manual + +id: power-management-cpu-cstate-cert-automated +unit: test plan +_name: CPU package cstate tests +_description: CPU package cstate tests for Ubuntu PC devices +include: + power-management/idle-screen-on-residency-check + power-management/cpu-low-power-idle + power-management/system-low-power-idle -- cgit v1.2.3