]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/apm
/sys/lib/rootstub
[plan9front.git] / sys / man / 8 / apm
1 .TH APM 8
2 .SH NAME
3 apm \- Advanced Power Management 1.2 BIOS interface
4 .SH SYNOPSIS
5 .I (in plan9.ini)
6 .B apm0=
7 .PP
8 bind -a '#P' /dev
9 .PP
10 .B aux/apm
11 [
12 .B -d
13 .I device
14 ]
15 [
16 .B -m
17 .I mountpoint
18 ]
19 [
20 .B -s
21 .I service
22 ]
23 .SH DESCRIPTION
24 .I Aux/apm
25 presents at
26 .I mountpoint
27 (default
28 .BR /mnt/apm )
29 an interface to the APM 1.2 BIOS 
30 (see
31 .IR apm (3))
32 .I device
33 (the default is to try
34 .BR /dev/apm ,
35 followed by
36 .BR #P/apm ).
37 If a
38 .I service
39 is specified, the interface will be
40 posted at
41 .BI /srv/ service 
42 as well.
43 .PP
44 The directory contains the following files.
45 .TP
46 .B battery
47 Contains one line for each battery in the system.
48 Each line lists three fields: the status (a string, one of
49 .BR unknown ,
50 .BR high ,
51 .BR low ,
52 .BR critical ,
53 or
54 .BR charging ),
55 the percent charge remaining, and
56 an estimate of the amount of time left in seconds.
57 If either or both of the last two are unknown,
58 the corresponding field will be zero.
59 .TP
60 .B ctl
61 The
62 .B ctl
63 file is used to set power management modes for
64 various parts of the system.
65 Control messages are of the form
66 .RI `` device " " verb ,''
67 where 
68 .I device
69 is one of
70 .BR system ,
71 .BR display ,
72 .BR storage ,
73 .BR lpt ,
74 .BR eia ,
75 .BR network ,
76 and
77 .BR pcmcia ,
78 and 
79 .I verb is one of
80 .BR enable ,
81 .BR disable ,
82 .BR standby ,
83 .BR off
84 and 
85 .BR on .
86 .B Enable
87 and
88 .B disable
89 control whether power management is active
90 for the device, while
91 .B standby
92 puts the device into standby mode
93 and
94 .B on
95 brings it back to full power.
96 .TP
97 .B event
98 Reads from this file will block until an APM event
99 has occurred.
100 A large enough read is guaranteed to return
101 an integral number of textual event descriptions, one per line.
102 .SH SOURCE
103 .B /sys/src/cmd/aux/apm.c
104 .br
105 .B /acme/bin/Battery
106 .SH BUGS
107 The verbs
108 .B suspend
109 and
110 .B off
111 should be supported but doing so requires
112 nontrivial help from the kernel.