Linux-ACPI Archive on lore.kernel.org
 help / color / 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, back to index

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

Linux-ACPI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-acpi/0 linux-acpi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-acpi linux-acpi/ https://lore.kernel.org/linux-acpi \
		linux-acpi@vger.kernel.org
	public-inbox-index linux-acpi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-acpi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git