From: deraadt Date: Sat, 31 Aug 2024 15:53:44 +0000 (+0000) Subject: If FADT_POWER_S0_IDLE_CAPABLE feature is found, prefer S0ix style over S3. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=260bb42f6709a1175eac325c18dfa9fde3bc6722;p=openbsd 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. --- 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;