From 260bb42f6709a1175eac325c18dfa9fde3bc6722 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 31 Aug 2024 15:53:44 +0000 Subject: [PATCH] If FADT_POWER_S0_IDLE_CAPABLE feature is found, prefer S0ix style over S3. Commiting now so that tests can be done by more people before release. At the last moment, we can pull this change out. --- sys/dev/acpi/acpi_x86.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/acpi/acpi_x86.c b/sys/dev/acpi/acpi_x86.c index d1d2d212137..78b2f6af0cf 100644 --- a/sys/dev/acpi/acpi_x86.c +++ b/sys/dev/acpi/acpi_x86.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi_x86.c,v 1.30 2024/08/13 22:31:16 deraadt Exp $ */ +/* $OpenBSD: acpi_x86.c,v 1.31 2024/08/31 15:53:44 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * Copyright (c) 2005 Jordan Hargrave @@ -37,6 +37,8 @@ sleep_showstate(void *v, int sleepmode) case SLEEP_SUSPEND: sc->sc_state = ACPI_STATE_S3; #ifdef __amd64__ + if (sc->sc_fadt->flags & FADT_POWER_S0_IDLE_CAPABLE) + sc->sc_state = ACPI_STATE_S0; fallback_state = ACPI_STATE_S0; /* No S3, use S0 */ #endif break; -- 2.20.1