mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Evgeny Sagatov <evgeny.sagatov@gmail.com>
Cc: regressions@lists.linux.dev, linux-acpi@vger.kernel.org,
	Thorsten Leemhuis <regressions@leemhuis.info>,
	LKML <linux-kernel@vger.kernel.org>,
	Wysocki Rafael J <rafael.j.wysocki@intel.com>
Subject: Re: Pressing the power button causes the device to freeze completely
Date: Thu, 23 Apr 2026 15:17:01 +0200	[thread overview]
Message-ID: <4738258.LvFx2qVVIh@rafael.j.wysocki> (raw)
In-Reply-To: <CAGAxtY0tgWJ=QQ48=aYTiQd994Z+9e=BAFN1OFTvzP9KE46t8A@mail.gmail.com>

On Wednesday, April 22, 2026 4:48:41 PM CEST Evgeny Sagatov wrote:
> > There are two cpufreq governors to choose from.  Have you decided to compile out the other ones on purpose?
> 
> Powersave is compiled into the stock Debian kernel as a module, so it
> does not appear in this list.
> 
> I changed governor to powersave and pressed the power button. The PC
> shut down normally.

Interesting.

Can you please also check what happens if you change the cpufreq governor
to "performance" (on all CPUs) before pressing the power button?

The difference is that with the "performance" governor the CPUs will be
running at the highest frequency.

> ср, 22 апр. 2026 г. в 17:04, Rafael J. Wysocki <rafael@kernel.org>:
> >
> > On Wed, Apr 22, 2026 at 3:34 PM Evgeny Sagatov <evgeny.sagatov@gmail.com> wrote:
> > >
> > > # 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
> >
> > There are two cpufreq governors to choose from.  Have you decided to
> > compile out the other ones on purpose?
> >
> > It might be useful to compile the powersave governor in and try to
> > switch over to it (on all CPUs) before pressing the power button
> > (without any patches applied).
> >
> > > /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
> >
> > The frequency scaling on this CPU is quite limited (only 2 states to
> > choose from).
> >
> > > /sys/devices/system/cpu/cpufreq/policy2/related_cpus:2
> > > /sys/devices/system/cpu/cpufreq/policy2/scaling_cur_freq:2000088
> >
> > Interestingly, this number doesn't match the available choices (maybe
> > due to a rounding error or similar).
> >
> > > /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
> >
> > The fact that acpi-cpufreq is the scaling driver may be related to the
> > power button issue in principle.
> >
> > I'm still going to send you another debug patch for the button driver though.

So the patch is appended.  It causes a message to be printed into the kernel
log every time the power button is pressed if all goes well, but the system
will not shut down (it is also not expected to hang).

Please see if that happens with the patch applied (it is a replacement for the
previous debug patch).  In principle it should work without changing the
cpufreq governor.

---
 drivers/acpi/button.c |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -473,14 +473,12 @@ static void acpi_button_notify(acpi_hand
 					event, ++button->pushed);
 }
 
-static void acpi_button_notify_run(void *data)
-{
-	acpi_button_notify(NULL, ACPI_BUTTON_NOTIFY_STATUS, data);
-}
-
 static u32 acpi_button_event(void *data)
 {
-	acpi_os_execute(OSL_NOTIFY_HANDLER, acpi_button_notify_run, data);
+	struct acpi_button *button = data;
+
+	dev_info(button->dev, "ACPI button event\n");
+
 	return ACPI_INTERRUPT_HANDLED;
 }
 




  reply	other threads:[~2026-04-23 13:17 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <184091776095270@mail.yandex.ru>
2026-04-16  8:22 ` Thorsten Leemhuis
     [not found]   ` <186071776359023@mail.yandex.ru>
2026-04-16 17:35     ` Thorsten Leemhuis
     [not found]       ` <26521776666243@mail.yandex.ru>
2026-04-20  6:41         ` Sagatov, Evgeniy
2026-04-20  6:54           ` Thorsten Leemhuis
2026-04-20 19:34             ` Sagatov, Evgeniy
2026-04-20 22:20               ` Sagatov, Evgeniy
2026-04-21  5:01                 ` Thorsten Leemhuis
2026-04-21  9:28                   ` Sagatov, Evgeniy
2026-04-21 15:11 ` Wysocki, Rafael J
2026-04-21 20:41   ` Rafael J. Wysocki
     [not found]     ` <168591776860440@mail.yandex.ru>
2026-04-22 12:36       ` Evgeny Sagatov
2026-04-22 13:26         ` Rafael J. Wysocki
2026-04-22 13:34           ` Evgeny Sagatov
2026-04-22 14:04             ` Rafael J. Wysocki
2026-04-22 14:48               ` Evgeny Sagatov
2026-04-23 13:17                 ` Rafael J. Wysocki [this message]
2026-04-23 14:51                   ` Evgeny Sagatov
2026-04-23 18:21                     ` Rafael J. Wysocki
2026-04-23 20:07                       ` Evgeny Sagatov
2026-04-24 14:40                         ` Rafael J. Wysocki
2026-04-24 17:06                           ` Evgeny Sagatov
2026-04-24 19:45                             ` Rafael J. Wysocki
2026-04-24 21:18                               ` Evgeny Sagatov
2026-04-26 14:50                                 ` Rafael J. Wysocki
2026-04-26 14:54                                   ` Rafael J. Wysocki
2026-04-26 20:45                                     ` Evgeny Sagatov
2026-04-27 18:48                                       ` Rafael J. Wysocki
2026-04-27 20:12                                         ` Evgeny Sagatov
2026-04-27 20:31                                           ` Rafael J. Wysocki
2026-04-27 21:49                                             ` Evgeny Sagatov
2026-04-28 17:40                                               ` Rafael J. Wysocki
2026-04-28 19:11                                                 ` Evgeny Sagatov
2026-04-28 19:58                                                   ` Rafael J. Wysocki
2026-04-28 21:05                                                     ` Evgeny Sagatov
2026-04-29 18:24                                                       ` Pressing the power button causes the device to freeze completely (schedutil involved) Rafael J. Wysocki
2026-04-29 20:22                                                         ` Rafael J. Wysocki
2026-04-29 21:16                                                           ` Evgeny Sagatov
2026-04-30 10:40                                                             ` Rafael J. Wysocki
2026-04-30 10:53                                                               ` Rafael J. Wysocki
2026-04-30 11:41                                                                 ` Evgeny Sagatov
2026-04-30 11:57                                                                   ` Evgeny Sagatov
2026-04-30 14:10                                                                     ` Rafael J. Wysocki
2026-04-30 16:04                                                                       ` Evgeny Sagatov
2026-04-30 13:57                                                                   ` Rafael J. Wysocki
2026-04-30 14:42                                                                     ` Rafael J. Wysocki
2026-04-30 23:05                                                                       ` Evgeny Sagatov
2026-04-30 23:17                                                                       ` Evgeny Sagatov
2026-05-01 12:00                                                                         ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4738258.LvFx2qVVIh@rafael.j.wysocki \
    --to=rafael@kernel.org \
    --cc=evgeny.sagatov@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=regressions@leemhuis.info \
    --cc=regressions@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®