| apm(4/amd64) | power management interface |
| apm(4/arm64) | power management interface |
| apm(4/i386) | advanced power management device interface |
| apm(4/loongson) | advanced power management device interface |
| apm(4/macppc) | advanced power management device interface |
| APM(4) | Device Drivers Manual (amd64) | APM(4) |
apm — power
management interface
acpi0 at mainbus?
The apm driver provides a user interface
to the acpi(4) driver.
The apm driver implements the following
ioctl(2) calls. They are defined
in <machine/apmvar.h>.
APM_IOC_REJECTAPM_IOC_STANDBYno parameters) Request “standby”
mode.APM_IOC_SUSPENDno parameters) Request “suspend”
mode.APM_IOC_HIBERNATEno parameters) Request “hibernate”
mode.APM_IOC_GETPOWERstruct apm_power_info) Request the current power
state. The argument structure is as follows:
struct apm_power_info {
u_char battery_state;
u_char ac_state;
u_char battery_life;
u_char spare1;
u_int minutes_left;
u_int spare2[6];
};
The following values are defined for battery_state:
APM_BATT_HIGHAPM_BATT_LOWAPM_BATT_CRITICALAPM_BATT_CHARGINGAPM_BATT_UNKNOWNAPM_BATTERY_ABSENTThe following values are defined for ac_state:
APM_AC_OFFAPM_AC_ONAPM_AC_BACKUPAPM_AC_UNKNOWNThe battery_life value contains the estimated percentage of battery life available. 100% indicates a full charge.
The minutes_left value contains the estimated number of minutes of battery life remaining.
APM_IOC_DEV_CTLstruct apm_ctl) Allows an application to directly
set the APM operating mode. The argument structure is as follows:
struct apm_ctl {
u_int dev;
u_int mode;
};
dev indicates the device, typically
APM_DEV_ALLDEVS.
mode indicates the desired operating mode. Possible values are
APM_IOC_PRN_CTLint) This
ioctl(2) controls message output
by the APM driver when a power change event is detected. The integer
parameter is one of:
APM_PRINT_ONAPM_PRINT_OFFAPM_PRINT_PCTEBUSY.| January 30, 2023 | openbsd |