public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Improvements to ACPI battery handling over s2idle
@ 2025-02-08 16:22 Mario Limonciello
  2025-02-08 16:22 ` [PATCH 1/4] PM: Add sysfs file for energy consumed over sleep cycle Mario Limonciello
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Mario Limonciello @ 2025-02-08 16:22 UTC (permalink / raw)
  To: Rafael J . Wysocki
  Cc: Len Brown, Pavel Machek, open list:ACPI,
	open list:HIBERNATION (aka Software Suspend, aka swsusp),
	Mario Limonciello

From: Mario Limonciello <mario.limonciello@amd.com>

On Windows the system wakes up when connected or disconnected from an
AC adapter. On Linux the system will momentarily wake up but immediately
go back into suspend.

This difference in behavior can potentially expose lower level platform
firmware bugs. For example entering/exiting HW sleep rapidly might not
work properly [1]. It's also inconsistent in that plugging in a dock
might not wake up a system when it should.

This series most notably adjusts that behavior. It also adds a new sysfs
file to determine how much battery was lost over the last sleep cycle
which could aid in userspace statistics and in debugging high power
consumption over s2idle.

[1] https://gitlab.freedesktop.org/drm/amd/-/issues/3929

Mario Limonciello (4):
  PM: Add sysfs file for energy consumed over sleep cycle
  ACPI: battery: Save and report battery capacity over suspend
  ACPI: battery: Refactor wakeup reasons in acpi_battery_update()
  ACPI: battery: Wake system on AC plug or unplug in over s2idle

 Documentation/ABI/testing/sysfs-power |  8 ++++
 drivers/acpi/battery.c                | 62 ++++++++++++++++++++++-----
 include/linux/suspend.h               |  2 +
 kernel/power/main.c                   | 10 +++++
 4 files changed, 71 insertions(+), 11 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [PATCH 4/4] ACPI: battery: Wake system on AC plug or unplug in over s2idle
@ 2025-02-10 14:43 K G
  0 siblings, 0 replies; 12+ messages in thread
From: K G @ 2025-02-10 14:43 UTC (permalink / raw)
  To: superm1; +Cc: lenb, linux-acpi, linux-pm, mario.limonciello, pavel, rafael

As only a mildly technical Linux user, I would rather this not be
rolled out as the default behavior. In case this fixes issues some
users are having, I would prefer this to be enabled via a bootup
option that is documented somewhere so that only affected users can
use it. FWIW I'm on  6.8.0-51-generic on a ThinkPad E14 G4 and the
power plugin/plugout behavior is just fine. Thank you.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-02-12 13:57 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-08 16:22 [PATCH 0/4] Improvements to ACPI battery handling over s2idle Mario Limonciello
2025-02-08 16:22 ` [PATCH 1/4] PM: Add sysfs file for energy consumed over sleep cycle Mario Limonciello
2025-02-08 16:22 ` [PATCH 2/4] ACPI: battery: Save and report battery capacity over suspend Mario Limonciello
2025-02-10 15:23   ` Sebastian Reichel
2025-02-10 21:24     ` Mario Limonciello
2025-02-08 16:22 ` [PATCH 3/4] ACPI: battery: Refactor wakeup reasons in acpi_battery_update() Mario Limonciello
2025-02-08 16:22 ` [PATCH 4/4] ACPI: battery: Wake system on AC plug or unplug in over s2idle Mario Limonciello
2025-02-08 17:59   ` Rafael J. Wysocki
2025-02-09 13:14     ` Mario Limonciello
2025-02-12 13:49       ` Armin Wolf
2025-02-12 13:57         ` Rafael J. Wysocki
  -- strict thread matches above, loose matches on Subject: below --
2025-02-10 14:43 K G

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox