Debian Codegraph @

README

raw
1
2 NVRAM-WakeUp
3 (C) 2001-2004, Sergei Haller <[email protected]>
4 $Id: README 870 2008-09-06 20:48:34Z tiber $
5
6
7 This is a (small) program that can read and write the WakeUp time in
8 the BIOS (via /dev/nvram on kernels >= 2.4.6 or via direct I/O). On
9 this WakeUp time the computer will be powered on automatically from
10 the soft-off state.
11
12 The original purpose of this program is to be called by VDR (by Klaus
13 Schmidinger, see http://www.cadsoft.de/vdr/) so the machine which runs
14 VDR doesn't have to run all the time but can decide by itself when
15 to wake up after a shutdown.
16
17 The original idea I had from an email by Frank Klingenhoefer
18 <[email protected]> on the linux-dvb mailinglist. See
19 http://linuxtv.org/mailinglists/linux-dvb/2001/08-2001/msg00457.html
20
21 In the directory VDR you will find a small script which you can pass
22 to VDR via the -s command line option.
23
24 ---- WARNING: --------------------------------------------------------
25 This program writes into the NVRAM (used by BIOS to store the CMOS
26 settings). This is DANGEROUS. Do it at your own risk. Neither the
27 author of this program (nvram-wakeup) nor anyone else can be made
28 responsible to any damage made by this program in any way.
29 (The worst case happened to me is that on reboot the BIOS noticed the
30 illegal contents of the nvram and set everything to default values.
31 But this doesn't mean that you can't destroy even your whole computer.)
32 YOU HAVE BEEN WARNED.
33 ----------------------------------------------------------------------
34
35 1. First of all you need a recent 2.4 kernel (2.4.6 or newer) with the
36 /dev/nvram and /dev/rtc drivers enabled (in the kernel or as
37 modules and in latter case the modules to be loaded.
38
39 NOTE for Kernels 2.6.x: You must enable "Enhanced RTC support". the
40 "generic /dev/rtc" is not enough.
41
42 Since release 0.95 of nvram-wakeup the device /dev/nvram isn't
43 necessary if run with --directisa option. But read the warning in
44 the man page.
45
46 If the character devices /dev/nvram, /dev/rtc or /dev/mem do not
47 exist on your system, you can create them (as root) with:
48
49 mknod /dev/nvram c 10 144
50 mknod /dev/rtc c 10 135
51 mknod /dev/mem c 1 1
52
53 or just (also as root)
54
55 make devices
56
57 in nvram-wakeup directory.
58
59 2. To compile nvram-wakeup just enter
60
61 make
62
63 on the command line. (You may want to take a look into Makefile)
64
65 Now run nvram-wakeup in debug mode and see if it can autodetect
66 your board. If it does and knows the addresses of this board,
67 you're done. Enjoy the program.
68
69 If it detects your board correctly but doesn't know it's
70 configuration, there are two choices:
71 - if you know that it worked with the old version (until 0.05) of
72 nvram-wakeup, please submit the output of biosinfo and the MB
73 number from the old version of nvram-wakeup.
74 - if not, read README.mb how to determine the addresses of your
75 board. And submit them to the author.
76 While waiting for the new release you can use the determined
77 addresses in a configuration file with the --configfile option
78 (read nvram-wakeup(5) for more info)
79
80 You may also look on the MB tracker list
81
82 http://sourceforge.net/tracker/?group_id=35022&atid=412959
83
84 or the latest SVN revision of the file boards.yaml
85
86 http://nvram-wakeup.svn.sourceforge.net/viewvc/nvram-wakeup/trunk/nvram-wakeup/boards/boards.yaml
87
88 if your board is already supported out-of-the-box in the CVS
89 version.
90
91 2a. The version 0.90 had a complete rewrite of large parts. Some of
92 the boards supported in the older versions may have gotten
93 incorrect autodetection strings in nvram-wakeup-mb.c. If it's true,
94 please submit the correct ones.
95
96 3. nvram-wakeup detects automatically at run time if your RTC clock is
97 running local time or UTC/GMT. (run nvram-wakeup with the --debug
98 option to see what it detected)
99
100 4. Run nvram-wakeup without options --settime or --disable. It will
101 only READ the wake up date and time. Check if the reported
102 date/time is correct. Do it several times. (Setting different
103 values via BIOS setup and reading them with nvram-wakeup.)
104
105 5. If you think it works always correct, you can try to specify the
106 --settime option to nvram-wakeup (you may want to use the --nowrite
107 option while testing). The (absolute) time is given as time_t value
108 (number of seconds since epoch).
109
110 NOTICE that you do not specify the time to be set in nvram but the
111 time at which the machine should be up and running. I.e.
112 nvram-wakeup will set the wakeup time WAKEUP_BEFORE minutes
113 before the time specified with the --settime option.
114
115 e.g. with
116 nvram-wakeup -s $((`date +%s` + 20 * 60))
117 you tell nvram-wakeup that you want the machine be up and running
118 in 20 minutes again. The actual wakeup time will be set to
119 20-WAKEUP_BEFORE minutes
120 in the future. If you want to specify the EXACT time to be set in
121 nvram, you can modify WAKEUP_BEFORE value to 0 in nvram-wakeup.h.
122
123 Further, there is a NEED_TO_SHTDWN constant in nvram-wakeup.h.
124 nvram-wakeup will refuse a wakeup time which is less than
125 (NEED_TO_SHTDWN + WAKEUP_BEFORE) minutes in the future.
126
127 If NEED_TO_SHTDWN is too small, it may happen that the wake up time
128 is passed while shutdown process, so the machine will wake up one
129 month or (on the boards, which store the month number) one year
130 later than expected.
131
132 Defaults for WAKEUP_BEFORE and NEED_TO_SHTDWN are 5 minutes each.
133
134
135 6. It should work now.
136 (Run
137 nvram-wakeup -s $((`date +%s` + 10 * 60))
138 reboot your computer and look into BIOS if the values are set
139 properly. Turn off the computer. Sit back. It will wake up
140 automatically.)
141
142 7. NOTE: on some boards (Asus AV7-133, AV7-266, TUV4X, ...) the
143 program hwclock isn't able to use the rtc device for getting CMOS
144 time if the wakeup is enabled in the BIOS. Please use the
145 --directisa option of hwclock.
146
147 8. NOTE: I had reports, that on Epia M boards some values (don't
148 remember, which, might have been seconds) are stored not correct
149 before first use. I.e., you must go to BIOS Setup, enter some
150 values different to those, which are there, leave BIOS setup with
151 saving. And then try nvram-wakeup.
152
153 9. Helper programs (see appropriate man pages for more information):
154
155 biosinfo
156 Prints board and bios information. Uses DMI-entries from
157 /dev/mem.
158
159 cat_nvram [option]
160 Dumps the contents of nvram to stdout using direct I/O
161 functions. The possible option is one of the values allowed
162 for upper_method (see `man nvram-wakeup.conf')
163
164 guess
165 Tries to guess the configuration from four dumps of nvram.
166 See README.mb for more information.
167
168 guess-helper
169 Helper for guess. See README.mb for more information.
170
171 rtc
172 Prints the RTC Alarm values using ioctls on /dev/rtc.
173
174 time <time>
175 Where <time> is number of seconds since epoch. Prints the
176 corresponding time in UTC and Local Time in human readable
177 form.
178
179 10. Further README's:
180
181 README.mb
182 This document should help you choose the right motherboard
183 settings.
184
185 README.reboot
186 This document should tell you on the reboot problems and the
187 possible ways to solve or work around them.
188
189
190 ----------------------------------------------------------------------
191 Suggestions, success reports, failures etc. are very welcome. Either
192 write me an eMail or post it on
193 http://sourceforge.net/projects/nvram-wakeup/ - Tracker
194 or on the mailing list
195 http://sourceforge.net/mail/?group_id=35022
196 or in the forum
197 http://www.vdr-portal.de/board/board.php?boardid=9&sid=
198 ----------------------------------------------------------------------
199 At http://home.t-online.de/home/hubertus.sandmann/vdr_wakeup.htm you
200 will find a nice detailed German introduction into nvram-wakeup.
201 (Thanks to Hubertus Sandmann)
202 ----------------------------------------------------------------------
203 And please don't forget to send me your new configurations
204 (including the name and model of your motherboard)
205 Or post it at the BIOS/MB Tracker on the homepage.
206 It will be included in the next version of nvram-wakeup
207 ----------------------------------------------------------------------