File: nvram-wakeup.8

package info (click to toggle)
nvram-wakeup 1.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 2,052 kB
  • ctags: 242
  • sloc: ansic: 1,943; sh: 309; ruby: 190; makefile: 102
file content (316 lines) | stat: -rw-r--r-- 9,924 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
'\" t
.\" ** The above line should force tbl to be a preprocessor **
.\" 
.\"   Man page for NVRAM WakeUp
.\"   Copyright (C) 2001-2004, Sergei Haller.
.\" 
.\"   $Id: nvram-wakeup.8 870 2008-09-06 20:48:34Z tiber $
.\" 
.\"   This program is free software; you can redistribute it and/or modify
.\"   it under the terms of the GNU General Public License as published by
.\"   the Free Software Foundation; either version 2 of the License, or
.\"   (at your option) any later version.
.\" 
.\"   This program is distributed in the hope that it wqill be useful,
.\"   but WITHOUT ANY WARRANTY; without even the implied warranty of
.\"   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\"   GNU General Public License for more details.
.\" 
.\"   You should have received a copy of the GNU General Public License
.\"   along with this program; if not, write to the Free Software
.\"   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
.\" 
.TH nvram-wakeup 8 "May 08 2004" Linux "NVRAM WakeUp"
.SH NAME
nvram-wakeup \- a (small) program that can read and write the WakeUp time
in the BIOS.
.\" ********************************************************************
.SH SYNOPSIS
.\" The general command line
.B nvram-wakeup 
.RB [\| \-l\||\-\-syslog \|]
.RB [\| \-D\||\-\-debug \|]
.RB [\| \-A\||\-\-directisa \|]
.RB [\| \-N\||\-\-nowrite \|]
.RB [\| \-d\||\-\-disable \|]
.RB [\| \-s\||\-\-settime
.IR time \|]
.RB [\| \-C\||\-\-configfile
.IR filename \|]
.RB [\| \-I\||\-\-iwname
.IR string \|]
.RB [\| \-v\||\-\-version \|]
.RB [\| \-h\||\-\-help \|]
.\" ********************************************************************
.SH DESCRIPTION
.B nvram-wakeup
is a (small) program that can read and write the WakeUp time
in the BIOS (via 
.I /dev/nvram
on kernels >= 2.4.6 or using direct I/O). 
On this WakeUp time the computer will be powered on automatically from 
the soft-off state.
.\" ********************************************************************
.SH OPTIONS
If run without options, 
.B nvram-wakeup
will read the current wakeup settings from 
the NVRAM and print them on stdout.
.TP
.B \-l, \-\-syslog
This option will let
.B nvram-wakeup
log all output via syslogd to the system log instead of stdout/stderr.
This option should always be the first one.
.TP
.B \-D, \-\-debug
This option enables printing debug messages.
.TP
.B \-A, \-\-directisa
Use direct I/O port access to access the nvram instead of 
.I /dev/nvram.
This option must be used if the configuration option 
.B upper_method 
is set. The device 
.I /dev/rtc 
is still used.

.B WARNING:
If you use the option 
.B \-\-directisa
and some other programm tries to access nvram and/or rtc at the same time,
you might screw up all your nvram (i.e. all CMOS settings).
.TP
.B \-N, \-\-nowrite
This option disables writing into the nvram and rtc devices. But all the
values for the bytes are calculated. Write them down and go set the
same date/time via BIOS Setup, run 
.B nvram-wakeup  
and see if
the values  you written down  correspond to  the values  set by the
BIOS.  
.TP
.BI \-s\  time ,\ \-\-settime= time
Specify the 
.I time
on which the computer should be up and running. The time is specified
as a 
.I time_t 
value, i.e., number of seconds since epoch (Jan 1 1970, 00:00:00).

See 
.B EXAMPLES 
below on how to set a "human readable" wakeup time.

Set time to 0 to disable the wakeup feature.

You can specify multiple
.B \-s\||\-\-settime
options on the command line, as far as they all have the same 
.I time
value. See 
.B EXAMPLES 
below.
.TP
.B \-d, \-\-disable
A synonym for 
.BI \-\-settime= 0 
.TP
.BI \-C\  filename ,\ \-\-configfile= filename
Read mainboard configuration from configuration file 
.IR filename .

See
.BR nvram-wakeup.conf "(5)"
for information on the syntax of the file.

See 
.B BOARD CONFIGURATION
below for general information on getting board configurations.
.TP
.BI \-I\  name ,\ \-\-iwname= name
If the DMI entries of your mainboard are broken, 
you may specify a DMI infowriter name here. (it's the name of one of
the functions from nvram-wakeup-mb.c)

If you specify
.B \-\-configfile
as well as the
.B \-\-iwname
option, then 
.B \-\-iwname
is ignored.

See 
.B BOARD CONFIGURATION
below for general information on getting board configurations.
.TP
.BI \-w\  minutes ,\ \-\-wakeupbefore= minutes
Specify how many
.I minutes
before the programmed wakeuptime the computer should wake up.

The default is to start 5 minutes before the programmed wakeup time.
.TP
.B \-h, \-\-help
Print a help message and exit.
.TP
.B \-v, \-\-version
Display version and author information.
.\" ********************************************************************
.SH "BOARD CONFIGURATION"
By default, the mainboard is autodetected by reading DMI information from the BIOS.
If the DMI entries are broken, you can specify the name of the infowriter to be used with the 
.B \-\-iwname
option. This only works if the board configuration is aleready compiled into the program.
The list of existing infowriters can be found in the source.

Example: On my Biostar M6VCG the whole DMI entry is broken (maybe a BIOS update would help,
but I never tried it), but the configuration of the board is known, so only the autodetection 
doesn't work. Thus look up (in boards.yaml) the name of the infowriter to beused, which is 'bio_m6vcg'
and call

.RS
.if t \f(CWnvram-wakeup --iwname bio_m6vcg\fP
.if n nvram-wakeup --iwname bio_m6vcg
.RE

If 
.B nvram-wakeup 
doesn't know anything about your board, you can put the board configuration
into a file and pass the file name via the
.B \-\-configfile
option to
.BR nvram-wakeup .
Look 
.BR nvram-wakeup.conf "(5)"
for more information on the configuration file syntax.

If you specify
.B \-\-configfile
as well as the
.B \-\-iwname
option, then 
.B \-\-iwname
is ignored.
.\" ********************************************************************
.SH "EXAMPLES"
You can specify multiple -d or -s options at the command line,  but
they must specify the same time, e.g.

.RS
.if t \f(CWnvram-wakeup --settime=0 -s0 -s 0 -d -ddds0  # is O.K.\fP
.if n nvram-wakeup --settime=0 -s0 -s 0 -d -ddds0  # is O.K.
.RE
.RS
.if t \f(CWnvram-wakeup -s1002722247 -s1002722247       # is O.K.\fP
.if n nvram-wakeup -s1002722247 -s1002722247       # is O.K.
.RE
.RS
.if t \f(CWnvram-wakeup -s1002722247 -s1002722248       # is not O.K.\fP
.if n nvram-wakeup -s1002722247 -s1002722248       # is not O.K.
.RE
.RS
.if t \f(CWnvram-wakeup -s1002722247 --disable          # is not O.K.\fP
.if n nvram-wakeup -s1002722247 --disable          # is not O.K.
.RE

If you want the machine to be up and running in 20 minutes, call

.RS
.if t \f(CWnvram-wakeup -s $((`date +%s` + 20 * 60))\fP
.if n nvram-wakeup -s $((`date +%s` + 20 * 60))
.RE

If you want the machine to be up and running at 18:30 today, call

.RS
.if t \f(CWnvram-wakeup -s `date +%s -d "18:30"`\fP
.if n nvram-wakeup -s `date +%s -d "18:30"`
.RE

Note that this is really "today" so if you run this after 18:30, 
the time will be in the past.

If you want the machine to be up and running on a particular day, 
at a particular time, say at 18:30 on Apr. 23rd, call

.RS
.if t \f(CWnvram-wakeup -s `date +%s -d "Apr 23 18:30"`\fP
.if n nvram-wakeup -s `date +%s -d "Apr 23 18:30"`
.RE

For "tomorrow" you can use something like that:

.RS
.if t \f(CWnvram-wakeup -s $((`date +%s -d "18:30"` + 60*60*24))\fP
.if n nvram-wakeup -s $((`date +%s -d "18:30"` + 60*60*24))
.RE

.\" ********************************************************************
.SH "EXIT STATUS"
.TP
.B 0
Successful program execution. The new date and time were set successfully.
.TP
.B 1
Successful program execution. The computer must be rebooted for the changes
to take effect.
.TP
.B 2
An error occured. Something went wrong.
.\" ********************************************************************
.SH FILES
.TP
.I /dev/nvram
NVRAM character device. This one is used for reading/writing the nvram values
if the command line option --directisa is not used.
.TP
.I /dev/rtc
RTC character device. This one is used to determine if the RTC clock is 
running localtime or UTC/GMT. Furthermore, some motherboards use the RTC alarm
time for the wakeup feature.
.TP
.I /dev/mem
Memory character device. This one is used to get DMI information for board autodetection.
.TP
.I nvram-wakeup.conf
Configuration file for a mainboard not supported out-of-the-box. See
.BR nvram-wakeup.conf "(5)"
for information on the syntax of the file.

.\" ********************************************************************
.SH SEE ALSO
.BR nvram-wakeup.conf "(5)"

.\" ********************************************************************
.SH HOMEPAGE
http://sf.net/projects/nvram-wakeup/

.\" ********************************************************************
.SH AUTHOR
Written by 
Sergei Haller <Sergei.Haller@math.uni-giessen.de>.
.\"
.\" ********************************************************************
.SH "REPORTING BUGS"
Report bugs at the bug tracking system (see HOMEPAGE) or on the mailing list
.B nvram-wakeup-devel@lists.sourceforge.net
.\"
.\" ********************************************************************
.SH COPYRIGHT
Copyright \(co 2001-2004 Sergei Haller.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA