Re: Pressing the power button causes the device to freeze completely
From: Evgeny Sagatov
Date: Wed Apr 22 2026 - 09:46:39 EST
# grep -r . /sys/devices/system/cpu/cpufreq/
/sys/devices/system/cpu/cpufreq/schedutil/rate_limit_us:240
/sys/devices/system/cpu/cpufreq/policy2/scaling_min_freq:2000000
/sys/devices/system/cpu/cpufreq/policy2/scaling_available_governors:performance
schedutil
/sys/devices/system/cpu/cpufreq/policy2/freqdomain_cpus:2
/sys/devices/system/cpu/cpufreq/policy2/scaling_governor:schedutil
/sys/devices/system/cpu/cpufreq/policy2/cpuinfo_max_freq:2834000
/sys/devices/system/cpu/cpufreq/policy2/scaling_available_frequencies:2834000
2000000
/sys/devices/system/cpu/cpufreq/policy2/related_cpus:2
/sys/devices/system/cpu/cpufreq/policy2/scaling_cur_freq:2000088
/sys/devices/system/cpu/cpufreq/policy2/scaling_setspeed:<unsupported>
grep: /sys/devices/system/cpu/cpufreq/policy2/stats/reset: Access denied
/sys/devices/system/cpu/cpufreq/policy2/stats/trans_table: From : To
/sys/devices/system/cpu/cpufreq/policy2/stats/trans_table: :
2834000 2000000
/sys/devices/system/cpu/cpufreq/policy2/stats/trans_table: 2834000:
0 762
/sys/devices/system/cpu/cpufreq/policy2/stats/trans_table: 2000000:
761 0
/sys/devices/system/cpu/cpufreq/policy2/stats/total_trans:1523
/sys/devices/system/cpu/cpufreq/policy2/stats/time_in_state:2834000 6606
/sys/devices/system/cpu/cpufreq/policy2/stats/time_in_state:2000000 248733
/sys/devices/system/cpu/cpufreq/policy2/affected_cpus:2
/sys/devices/system/cpu/cpufreq/policy2/scaling_max_freq:2834000
/sys/devices/system/cpu/cpufreq/policy2/cpuinfo_transition_latency:160000
/sys/devices/system/cpu/cpufreq/policy2/scaling_driver:acpi-cpufreq
/sys/devices/system/cpu/cpufreq/policy2/cpuinfo_min_freq:2000000
/sys/devices/system/cpu/cpufreq/policy2/bios_limit:2834000
/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq:2000000
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors:performance
schedutil
/sys/devices/system/cpu/cpufreq/policy0/freqdomain_cpus:0
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor:schedutil
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_max_freq:2834000
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies:2834000
2000000
/sys/devices/system/cpu/cpufreq/policy0/related_cpus:0
/sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq:2000000
/sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed:<unsupported>
grep: /sys/devices/system/cpu/cpufreq/policy0/stats/reset: Access denied
/sys/devices/system/cpu/cpufreq/policy0/stats/trans_table: From : To
/sys/devices/system/cpu/cpufreq/policy0/stats/trans_table: :
2834000 2000000
/sys/devices/system/cpu/cpufreq/policy0/stats/trans_table: 2834000:
0 850
/sys/devices/system/cpu/cpufreq/policy0/stats/trans_table: 2000000:
849 0
/sys/devices/system/cpu/cpufreq/policy0/stats/total_trans:1699
/sys/devices/system/cpu/cpufreq/policy0/stats/time_in_state:2834000 6684
/sys/devices/system/cpu/cpufreq/policy0/stats/time_in_state:2000000 248654
/sys/devices/system/cpu/cpufreq/policy0/affected_cpus:0
/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq:2834000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_transition_latency:160000
/sys/devices/system/cpu/cpufreq/policy0/scaling_driver:acpi-cpufreq
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_min_freq:2000000
/sys/devices/system/cpu/cpufreq/policy0/bios_limit:2834000
/sys/devices/system/cpu/cpufreq/policy3/scaling_min_freq:2000000
/sys/devices/system/cpu/cpufreq/policy3/scaling_available_governors:performance
schedutil
/sys/devices/system/cpu/cpufreq/policy3/freqdomain_cpus:3
/sys/devices/system/cpu/cpufreq/policy3/scaling_governor:schedutil
/sys/devices/system/cpu/cpufreq/policy3/cpuinfo_max_freq:2834000
/sys/devices/system/cpu/cpufreq/policy3/scaling_available_frequencies:2834000
2000000
/sys/devices/system/cpu/cpufreq/policy3/related_cpus:3
/sys/devices/system/cpu/cpufreq/policy3/scaling_cur_freq:1999770
/sys/devices/system/cpu/cpufreq/policy3/scaling_setspeed:<unsupported>
grep: /sys/devices/system/cpu/cpufreq/policy3/stats/reset: Access denied
/sys/devices/system/cpu/cpufreq/policy3/stats/trans_table: From : To
/sys/devices/system/cpu/cpufreq/policy3/stats/trans_table: :
2834000 2000000
/sys/devices/system/cpu/cpufreq/policy3/stats/trans_table: 2834000:
0 623
/sys/devices/system/cpu/cpufreq/policy3/stats/trans_table: 2000000:
622 0
/sys/devices/system/cpu/cpufreq/policy3/stats/total_trans:1245
/sys/devices/system/cpu/cpufreq/policy3/stats/time_in_state:2834000 6697
/sys/devices/system/cpu/cpufreq/policy3/stats/time_in_state:2000000 248642
/sys/devices/system/cpu/cpufreq/policy3/affected_cpus:3
/sys/devices/system/cpu/cpufreq/policy3/scaling_max_freq:2834000
/sys/devices/system/cpu/cpufreq/policy3/cpuinfo_transition_latency:160000
/sys/devices/system/cpu/cpufreq/policy3/scaling_driver:acpi-cpufreq
/sys/devices/system/cpu/cpufreq/policy3/cpuinfo_min_freq:2000000
/sys/devices/system/cpu/cpufreq/policy3/bios_limit:2834000
/sys/devices/system/cpu/cpufreq/policy1/scaling_min_freq:2000000
/sys/devices/system/cpu/cpufreq/policy1/scaling_available_governors:performance
schedutil
/sys/devices/system/cpu/cpufreq/policy1/freqdomain_cpus:1
/sys/devices/system/cpu/cpufreq/policy1/scaling_governor:schedutil
/sys/devices/system/cpu/cpufreq/policy1/cpuinfo_max_freq:2834000
/sys/devices/system/cpu/cpufreq/policy1/scaling_available_frequencies:2834000
2000000
/sys/devices/system/cpu/cpufreq/policy1/related_cpus:1
/sys/devices/system/cpu/cpufreq/policy1/scaling_cur_freq:1999773
/sys/devices/system/cpu/cpufreq/policy1/scaling_setspeed:<unsupported>
grep: /sys/devices/system/cpu/cpufreq/policy1/stats/reset: Access denied
/sys/devices/system/cpu/cpufreq/policy1/stats/trans_table: From : To
/sys/devices/system/cpu/cpufreq/policy1/stats/trans_table: :
2834000 2000000
/sys/devices/system/cpu/cpufreq/policy1/stats/trans_table: 2834000:
0 882
/sys/devices/system/cpu/cpufreq/policy1/stats/trans_table: 2000000:
881 0
/sys/devices/system/cpu/cpufreq/policy1/stats/total_trans:1763
/sys/devices/system/cpu/cpufreq/policy1/stats/time_in_state:2834000 5501
/sys/devices/system/cpu/cpufreq/policy1/stats/time_in_state:2000000 249838
/sys/devices/system/cpu/cpufreq/policy1/affected_cpus:1
/sys/devices/system/cpu/cpufreq/policy1/scaling_max_freq:2834000
/sys/devices/system/cpu/cpufreq/policy1/cpuinfo_transition_latency:160000
/sys/devices/system/cpu/cpufreq/policy1/scaling_driver:acpi-cpufreq
/sys/devices/system/cpu/cpufreq/policy1/cpuinfo_min_freq:2000000
/sys/devices/system/cpu/cpufreq/policy1/bios_limit:2834000
ср, 22 апр. 2026 г. в 16:27, Rafael J. Wysocki <rafael@xxxxxxxxxx>:
>
> Hi,
>
> On Wed, Apr 22, 2026 at 2:36 PM Evgeny Sagatov <evgeny.sagatov@xxxxxxxxx> wrote:
> >
> > Hello Rafael,
> >
> > I applied the patch that you sent.
> > The PC isn't responding to the power button press. It doesn't freeze.
>
> As expected, thanks! I'll send you another patch to test (instead of
> the one you have tested) in the next message.
>
> > I just want to clarify, did you receive messages where we found the
> > first broken commit using git bisect?
> >
> > > 8c94ccc7cd691472461448f98e2372c75849406c good
> > > e37617c8e53a1f7fcba6d5e1041f4fd8a2425c27 good
> > > b0d326da462e20285236e11e4cbc32085de9f363 bad
>
> Yes, I did, but I think that reverting the schedutil change hides the problem.
>
> BTW, since reverting the schedutil change makes a difference for you,
> I'm wondering about the cpufreq configuration on your system. Can you
> please send me the
>
> $ grep -r . /sys/devices/system/cpu/cpufreq/
>
> output from your system?
>
>
> > > On Tuesday, April 21, 2026 5:11:36 PM CEST Wysocki, Rafael J wrote:
> > >
> > > Hi,
> > >
> > > On 4/13/2026 6:46 PM, Evgeny Sagatov wrote:
> > > > Hello,
> > > > I have a PC with a motherboard GA-EP45T-UD3LR (Rev. 1.0)
> > > > <https://www.gigabyte.com/Motherboard/GA-EP45T-UD3LR-rev-10> and
> > > > processor Intel Core 2 Quad Q9550.
> > > > Previously, I had Debian 12 with kernel 6.1 installed, and pressing
> > > > the power button would shut down the PC as usual.
> > > > I updated to Debian 13 with kernel 6.12.74, and now pressing the power
> > > > button causes the PC to freeze completely.
> > > > I see that systemd doesn't even begin to shut down. It freezes
> > > > immediately after pressing the button. There's no error message in
> > > > console. There's no error message in the logs either. Netconsole
> > > > doesn't report any errors, and the kernel doesn't panic. It just
> > > > freezes completely.
> > >
> > > It looks like the ACPI button notify handler crashes on your system for
> > > some obscure reason.
> > >
> > > It should be possible to get to the bottom of it, but it will require
> > > some investigation if you have the motivation and time to run debug patches.
> > >
> > >
> > > > I checked that Live CD with Debian 12 continue to shut down normally,
> > > > but Live CD with Debian 13 freeze.
> > > > I tried updating and resetting the BIOS. I tried various kernel
> > > > parameters related to ACPI settings. I also tried kernels 6.18 and
> > > > 6.19. Nothing fixed the problem.
> > > > If I unload the "button" module, the system doesn't freeze, but it
> > > > also doesn't shut down.
> > >
> > > This is a useful data point, thanks!
> > >
> > >
> > > > I built "button" module by rolling back its version to commit 1a20d40
> > > > <https://github.com/torvalds/linux/commit/1a20d409c874255086e2f42a729826d490294c91>,
> > > > which corresponds to kernel version 6.1. This module does not freeze,
> > > > but does not turn off the PC either.
> > > > I've found that the freezes have been occurring since commit 0d51157
> > > > <https://github.com/torvalds/linux/commit/0d51157dfaac05ea66616d8a250dce04bef49a4f>.
> > >
> > > The main difference made by it is the fixed events handling and if there
> > > is a problem with that, a few debug patches should suffice to find out
> > > what's going on. I'll send you one to try shortly.
> > >
> > >
> > > First off, on top of 7.0.0 (since the issue is present in this one, I think
> > > it's better to focus the debugging on it), let's first check what happens if
> > > the ACPI fixed event handler is not installed for the power button at all.
> > >
> > > This should be similar to using a 6.1 version of the button driver (that is,
> > > no crash, but pressing the power button will have no effect).
> > >
> > > Please test the patch below and let me know what happens.
> > >
> > > ---
> > > drivers/acpi/button.c | 4 +---
> > > 1 file changed, 1 insertion(+), 3 deletions(-)
> > >
> > > --- a/drivers/acpi/button.c
> > > +++ b/drivers/acpi/button.c
> > > @@ -628,9 +628,7 @@ static int acpi_button_probe(struct plat
> > >
> > > switch (device->device_type) {
> > > case ACPI_BUS_TYPE_POWER_BUTTON:
> > > - status = acpi_install_fixed_event_handler(ACPI_EVENT_POWER_BUTTON,
> > > - acpi_button_event,
> > > - button);
> > > + status = AE_OK;
> > > break;
> > > case ACPI_BUS_TYPE_SLEEP_BUTTON:
> > > status = acpi_install_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON,