Message ID | 20240919165349.235777-1-hdegoede@redhat.com (mailing list archive) |
---|---|
State | Handled Elsewhere, archived |
Headers | show |
Series | platform/x86:intel/pmc: Leave ACPI PM Timer alone when using S3 suspend | expand |
On Thu, Sep 19, 2024 at 06:53:49PM +0200, Hans de Goede wrote: > Disabling the ACPI PM timer causes suspend to no longer work on > a Intel Kaby Lake Dell XPS 13 using deep / S3 suspend. > > The power-savings from disabling the pm-timer are mostly relevant for > s0ix suspend. If regular S3 suspend is used the firmware is in control of > the suspend and if necessary it should disable the timer if necessary. > > Limit the disabling of the ACPI PM Timer on suspend to when using > S0ix (so not firmware, but OS handled) suspend to fix this. Acked-by: Andy Shevchenko <andy@kernel.org>
diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c index f443bf8bb82c..c753f013b59d 100644 --- a/drivers/platform/x86/intel/pmc/core.c +++ b/drivers/platform/x86/intel/pmc/core.c @@ -1275,6 +1275,10 @@ static void pmc_core_acpi_pm_timer_suspend_resume(void *data, bool suspend) if (!map->acpi_pm_tmr_ctl_offset) return; + /* Check if the suspend will actually use S0ix */ + if (suspend && pm_suspend_via_firmware()) + return; + guard(mutex)(&pmcdev->lock); if (!suspend && !pmcdev->enable_acpi_pm_timer_on_resume)