ACK: [PATCH] acpi/s3: fix no suspend & resume time for s2idle

ivanhu ivan.hu at canonical.com
Thu Nov 7 07:49:51 UTC 2019


On 10/31/19 1:55 AM, Alex Hung wrote:
> This is to fix
>
> Suspend/Resume Timings:
>   Could not determine time to suspend.
>   Could not determine time to resume.
>
> to
>
> Suspend/Resume Timings:
>   Suspend: 0.282 seconds.
>   Resume:  1.008 seconds.
>
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
>  src/acpi/s3/s3.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/src/acpi/s3/s3.c b/src/acpi/s3/s3.c
> index 5ec8d5c8..f0582152 100644
> --- a/src/acpi/s3/s3.c
> +++ b/src/acpi/s3/s3.c
> @@ -445,6 +445,19 @@ static int s3_scan_times(
>  				s3_suspend_finish = previous_ts;
>  			continue;
>  		}
> +
> +		/* get log time for s2idle */
> +		if (strstr(txt, "PM: suspend-to-idle")) {
> +			s3_suspend_finish = ts;
> +			continue;
> +		}
> +		if (strstr(txt, "PM: Timekeeping suspended")) {
> +			s3_resume_start = ts;
> +			if (s3_suspend_finish < 0.0)
> +				s3_suspend_finish = previous_ts;
> +			continue;
> +		}
> +
>  		if (strstr(txt, "Restarting tasks ... done")) {
>  			s3_resume_finish = ts;
>  			break;


Acked-by: Ivan Hu <ivan.hu at canonical.com>




More information about the fwts-devel mailing list