Re: Pressing the power button causes the device to freeze completely
From: Evgeny Sagatov
Date: Fri Apr 24 2026 - 13:19:38 EST
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
When I pressed the power button, the PC froze. Nothing in the log.
пт, 24 апр. 2026 г. в 17:40, Rafael J. Wysocki <rafael@xxxxxxxxxx>:
>
> On Thursday, April 23, 2026 10:07:39 PM CEST Evgeny Sagatov wrote:
> > This patch doesn't change anything. The PC remains frozen when
> > pressing the power button.
>
> Well, thanks for giving it a go.
>
> This at least means that the issue is related to certain activity in schedutil,
> and the specific values used by it are most likely irrelevant.
>
> This time, I'd like to check two things in one go. First, whether or not
> fast frequency switching is enabled on your system (if it is, it will exercise
> a different code path in schedutil) and second, whether or not the power button
> press processing gets beyond the clearing the associated event status bit.
>
> For this purpose, please apply the patch below and (1) after booting the
> system with the new kernel, run
>
> $ dmesg | grep "Fast frequency"
>
> and let me know if it produces any output (and what the output is if so).
>
> Then (2) press the power button and see if that still locks up the system
> if schedutil is the cpufreq governor (if it doesn't lock up, a message
> will be printed to the kernel log every time the button is pressed).
>
> ---
> drivers/acpi/acpica/evevent.c | 5 +++++
> drivers/cpufreq/cpufreq.c | 1 +
> 2 files changed, 6 insertions(+)
>
> --- 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/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);
>
>
>