'\" 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 . .\" .\" ******************************************************************** .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