]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/apm
more stuff
[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 and 
84 .BR on .
85 .B Enable
86 and
87 .B disable
88 control whether power management is active
89 for the device, while
90 .B standby
91 puts the device into standby mode
92 and
93 .B on
94 brings it back to full power.
95 .TP
96 .B event
97 Reads from this file will block until an APM event
98 has occurred.
99 A large enough read is guaranteed to return
100 an integral number of textual event descriptions, one per line.
101 .SH SOURCE
102 .B /sys/src/cmd/aux/apm.c
103 .br
104 .B /acme/bin/Battery
105 .SH BUGS
106 The verbs
107 .B suspend
108 and
109 .B off
110 should be supported but doing so requires
111 nontrivial help from the kernel.