linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Calling _WAK on boot
@ 2021-04-14 12:35 w4v3
  0 siblings, 0 replies; only message in thread
From: w4v3 @ 2021-04-14 12:35 UTC (permalink / raw)
  To: rjw; +Cc: linux-acpi

Hi everyone,

As I understand ACPI spec §16.3.3, the _WAK method should also
be called when waking up from S5. Currently this doesn't
seem to be the case.

On my device (Lenovo Yoga 7i), the brightness hotkeys depend
on initialization carried out in _WAK, so they currently only
work after resuming from S3 or S4 sleep, but not after booting
normally.

I really don't know what would be the right way to do this,
but as an example, patching the acpi_init function as follows
seems to work fine.

--- linux-pm.orig/drivers/acpi/bus.c
+++ linux-pm/drivers/acpi/bus.c
@@ -1094,6 +1094,7 @@
 	acpi_debugfs_init();
 	acpi_sleep_proc_init();
 	acpi_wakeup_device_init();
+        acpi_leave_sleep_state(ACPI_STATE_S5);
 	return 0;
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-14 12:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-14 12:35 Calling _WAK on boot w4v3

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).