ACPIBTN(4)

πŸ“¦ in nixpkgs unstable

πŸ’… ACPIBTN(4) β€” the ACPI button page, explained by your favorite nerd bestie

okay so real talk, this is a kernel interfaces manual page, section 4, and it's literally all about acpibtn, the ACPI button driver. yes bestie, the buttons. the ones you press. slay.


✨ NAME ✨

acpibtn β€” the ACPI button driver. that's it, that's the vibe. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

acpibtn* at acpi?

one line, no notes, iconic. it attaches at acpi? and the * means more than one can show up. periodt.


πŸ”₯ DESCRIPTION πŸ”₯

so acpibtn handles the events that get triggered by ACPI buttons. and like… currently only three things are supported, ngl:

  • the power button
  • the sleep button
  • lid status events

that's the whole roster. main character energy only.

🌸 the power button

lowkey the most important one. the power button event gets handled according to the machdep.pwraction sysctl(8). valid values are:

  • 0 β€” do nothing. literally nothing. it just sits there, unbothered, minding its business.
  • 1 β€” perform a regular system shutdown and power off the machine, but only if the hw.allowpowerdown sysctl is set to 1. that condition is doing a lot of work, don't skip it, iykyk.
  • 2 β€” put the system into suspend (deep sleep) state.

πŸ’€ the sleep button

the sleep button event puts the system into suspend (deep sleep) state. that's the entire description. short, sweet, ate. πŸ’…

🫢 the lid status

the lid status event is handled according to the machdep.lidaction sysctl. valid values are:

  • 0 β€” do nothing. once again, nothing. resting.
  • 1 β€” put the system into suspend (deep sleep) state.
  • 2 β€” put the system into hibernation. and bestie this one's a whole journey, so buckle up:

system memory is saved to disk (swap space) and the machine is powered down. for machines supporting the acpi(4) style hibernate functionality β€” note that caveat, it's important β€” on resume a full kernel boot will occur, followed by the reading of the saved memory image. the image will then be unpacked and the system resumed at the point immediately after the hibernation request. like a nap with no consequences. 😭

also, the lid status is set up as a sensor, so you can monitor it with sysctl(8) or sensorsd(8). little sensor, doing big things.


πŸ‘‘ SEE ALSO πŸ‘‘

go read them, they're all right there, no excuses. ✨


🌈 HISTORY 🌈

the acpibtn driver first appeared in OpenBSD 3.9. vintage. retro. a classic. πŸŽ€


πŸ’œ AUTHORS πŸ’œ

the acpibtn driver was written by Marco Peereboom <marco@openbsd.org>. thank you for your service, king. πŸ‘‘


heads up bestie: machdep.pwraction, machdep.lidaction, and hw.allowpowerdown are sysctls β€” you tweak them with sysctl(8), and the power-off-at-1 behavior is conditional on hw.allowpowerdown being 1. don't come for me if you skipped that line. 🫢

and that's the page, fr fr. this beauty comes from the Debian build, dated September 3, 2021, and it's section 4 energy all the way through. byeee πŸ¦‹πŸ’–

πŸ“¦ where this page comes from
  • nixpkgs unstable: cvs-export
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms