apm_get_event(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ apm_get_event(9) β€” Kernel API Manual πŸ¦‹

okay so bestie, welcome to apm_get_event. This is a kernel API manual page, and honestly it's giving "small function, big lore". Sit down, hydrate, and let's get into it πŸ’…


✨ NAME ✨

apm_get_event β€” get an APM event from the BIOS 🫢


🌸 SYNOPSIS 🌸

int apm_get_event (apm_event_t *event , apm_eventinfo_t *info );

πŸŽ€ ARGUMENTS πŸŽ€

  • event β€” pointer to the event πŸ’– like, this is where the event itself goes.
  • info β€” pointer to the event information ✨ this one's for the extra deets.

πŸ’œ DESCRIPTION πŸ’œ

So here's the vibe: the APM BIOS provides polled information for event reporting. No cap, polled β€” you go ask, it doesn't come tell you 🌈

The BIOS expects to be polled at least every second when events are pending. That's the rule, bestie. When a message is found, the caller should keep polling until no more messages are present β€” like, keep going until the queue is empty, periodt πŸ™ˆ

⚠️ But wait β€” this causes problems on some laptops πŸ‘€ Specifically, a suspend event notification is not cleared until it is acknowledged. So yeah, that's a real gotcha, not me being dramatic for once πŸ’€

Additional information is returned in the info pointer β€” providing that APM 1.2 is in use. If no messages are pending, the value 0x80 is returned, which means (No power management events pending) 🧚


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./arch/x86/kernel/apm_32.c β€” plus the whole friend group:


⭐ that's the whole page, you ate that ⭐ And now the cute sign-off: this lil masterpiece lives in ./arch/x86/kernel, it's dated October 2026, and it's filed under apm_get_event(9). slay πŸ’…πŸ’–

πŸ“¦ where this page comes from