apm_get_event(9)
π¦ 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:
apm_error(9)__apm_bios_call(9)apm_bios_call(9)__apm_bios_call_simple(9)apm_bios_call_simple(9)apm_driver_version(9)set_power_state(9)set_system_power_state(9)apm_do_idle(9)apm_do_busy(9)apm_cpu_idle(9)apm_power_off(9)apm_enable_power_management(9)apm_get_power_status(9)apm_engage_power_management(9)apm_console_blank(9)
β 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms