acpi_device_get_power(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay bestie, welcome to acpi_device_get_power(9) β€” this is the Kernel API Manual page for acpi_device_get_power, and its whole vibe is: Get power state of an ACPI device. πŸ’…


✨ SYNOPSIS ✨

here's the signature, kept exactly as-is so nobody comes for me:

int acpi_device_get_power (struct acpi_device *device , int *state );

πŸŽ€ ARGUMENTS πŸŽ€

  • device β€” Device to get the power state of.
  • state β€” Place to store the power state of the device.

πŸ’… DESCRIPTION πŸ’…

okay so here's the important tea, and I need you to listen: this function does not update the device's power.state field. it may update its parent's power.state field β€” specifically when the parent's power state is unknown and the device's power state turns out to be D0. πŸ‘‘

also, it does not update power resource reference counters to ensure that the power state returned by it will be persistent. and it may return a power state shallower than previously set by acpi_device_set_power for device (if that power state depends on any power resources). that's the caveat, bestie β€” no cap. 😭


πŸ¦‹ SEE ALSO πŸ¦‹

the kernel file is ./drivers/acpi/device_pm.c β€” go peek at that. also these icons:


mwah πŸ’‹ that's the page! source/version: ./drivers/acpi; date: October 2026; title: acpi_device_get_power(9). now go get that power state, bestie β€” periodt. πŸ’– ✨ πŸŽ€ πŸ¦‹ 🌸

πŸ“¦ where this page comes from