Re: Pressing the power button causes the device to freeze completely

From: Rafael J. Wysocki

Date: Fri Apr 24 2026 - 15:46:19 EST


On Friday, April 24, 2026 7:06:50 PM CEST Evgeny Sagatov wrote:
> dmesg | grep "Fast frequency"
> [ 8.903099] cpufreq: CPU0: Fast frequency switching enabled
> [ 8.903181] cpufreq: CPU1: Fast frequency switching enabled
> [ 8.903247] cpufreq: CPU2: Fast frequency switching enabled
> [ 8.903316] cpufreq: CPU3: Fast frequency switching enabled

If it is enabled, let's try to disable it and see what happens.

> When I pressed the power button, the PC froze. Nothing in the log.

Below is an updated version of the previous patch which additionally
disables fast frequency switching in the ACPI cpufreq driver that is
in use on your system.

The "Fast frequency switching enabled" messages should not be there
any more in the log with this patch applied (please verify) and
please check if pressing the power button will still lock up the
system.

---
drivers/acpi/acpica/evevent.c | 5 +++++
drivers/cpufreq/acpi-cpufreq.c | 3 +--
drivers/cpufreq/cpufreq.c | 1 +
3 files changed, 7 insertions(+), 2 deletions(-)

--- a/drivers/acpi/acpica/evevent.c
+++ b/drivers/acpi/acpica/evevent.c
@@ -243,6 +243,11 @@ static u32 acpi_ev_fixed_event_dispatch(
(void)acpi_write_bit_register(acpi_gbl_fixed_event_info[event].
status_register_id, ACPI_CLEAR_STATUS);

+ if (event == ACPI_EVENT_POWER_BUTTON) {
+ pr_info("ACPI power button event\n");
+ return (ACPI_INTERRUPT_HANDLED);
+ }
+
/*
* Make sure that a handler exists. If not, report an error
* and disable the event to prevent further interrupts.
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -912,8 +912,7 @@ static int acpi_cpufreq_cpu_init(struct
*/
data->resume = 1;

- policy->fast_switch_possible = !acpi_pstate_strict &&
- !(policy_is_shared(policy) && policy->shared_type != CPUFREQ_SHARED_TYPE_ANY);
+ policy->fast_switch_possible = false;

if (perf->states[0].core_frequency * 1000 != freq_table[0].frequency)
pr_warn(FW_WARN "P-state 0 is not max freq\n");
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -473,6 +473,7 @@ void cpufreq_enable_fast_switch(struct c
if (cpufreq_fast_switch_count >= 0) {
cpufreq_fast_switch_count++;
policy->fast_switch_enabled = true;
+ pr_info("CPU%u: Fast frequency switching enabled\n", policy->cpu);
} else {
pr_warn("CPU%u: Fast frequency switching not enabled\n",
policy->cpu);