acpi_device_sleep_wake(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’€ acpi_device_sleep_wake(9) πŸ’€

okay so bestie, welcome to acpi_device_sleep_wake β€” it's a Kernel API Manual page, section 9, and it's literally all about poking your device's sleep/wake vibes into place. let's go 🫢


✨ NAME ✨

acpi_device_sleep_wake β€” executes _DSW (Device Sleep Wake), or the lowkey deprecated-in-ACPI-3.0 _PSW (Power State Wake). that's the whole mission, no cap πŸ’…


🌸 SYNOPSIS 🌸

int acpi_device_sleep_wake (struct acpi_device *dev , int enable , int
sleep_state , int dev_state );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device you're handling. the main character of this whole function, fr.
  • enable β€” 0 disables, 1 enables the wake capabilities of the device. simple as that, bestie. ✨
  • sleep_state β€” the target sleep state of the system. iykyk.
  • dev_state β€” the target power state of the device. πŸ¦‹

πŸ’œ DESCRIPTION πŸ’œ

so what it does is: it executes _DSW (Device Sleep Wake) β€” or _PSW (Power State Wake), which is deprecated in ACPI 3.0, just so we're clear 🫢 β€” for the device, if present.

⚠️ if it fails, it resets the device's wakeup.flags.valid flag. like, resets it to invalid. that's the cleanup, no notes.

πŸŒ™ RETURN VALUE πŸŒ™

  • 0 β€” if either _DSW or _PSW has been successfully executed
  • 0 β€” if neither _DSW nor _PSW has been found (yes, also zero, that's not a typo, that's the manpage πŸ’€)
  • -ENODEV β€” if the execution of either _DSW or _PSW has failed 😭

πŸ”₯ SEE ALSO πŸ”₯


🧚 and that's the page! go forth and wake your devices responsibly, bestie πŸ’–

source: ./drivers/acpi β€” dated October 2026 β€” the whole thing is filed under acpi_device_sleep_wake(9), periodt. πŸ‘‘

πŸ“¦ where this page comes from