3 .\" This page is a part of apmd-3.0 distribution.
5 .\" Japanese Version Copyright (c) 2000 NAKANO Takeo all rights reserved.
6 .\" Translated Mon 29 May 2000 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
8 .TH RTCSLEEP 1 "sleep in APM suspend/standby mode" "APM" \" -*- nroff -*-
11 .\"O apmsleep \- go into suspend or standby mode and wake-up later
12 apmsleep \- ¥µ¥¹¥Ú¥ó¥É/¥¹¥¿¥ó¥Ð¥¤¥â¡¼¥É¤ËÆþ¤ê¡¢¸å¤ÇÉüµ¢¤¹¤ë
16 [\-sSnwhVd] [\-\-suspend] [\-\-standby] [\-\-noapm]
17 [\-\-wait] [\-\-help] [\-\-version] [\-\-debug]
21 .\"O Some computers, especially laptops, can wake-up from a low-power suspend
22 .\"O to DRAM mode using the Real-time-clock (RTC) chip.
24 .\"O can be used to set the alarm time in the RTC and to go into suspend or
25 .\"O standby mode. An interrupt from the RTC causes the computer to wake-up.
26 .\"O The program detects this event, by waiting for a leap in the kernel time
27 .\"O and terminates successfully. If no time leap occurs within one minute, or
28 .\"O something goes wrong, the exit value will be non-zero.
29 ¥³¥ó¥Ô¥å¡¼¥¿¤ÎÃæ¤Ë¤Ï (Æä˥é¥Ã¥×¥È¥Ã¥×¤Ë¤Ï)¡¢
30 ¥ê¥¢¥ë¥¿¥¤¥à¥¯¥í¥Ã¥¯ (RTC) ¤òÍѤ¤¤Æ
31 ÄãÅÅÎÏ¥µ¥¹¥Ú¥ó¥É¥â¡¼¥É¤«¤é DRAM ¥â¡¼¥É¤ËÉüµ¢¤Ç¤¤ë¥¿¥¤¥×¤Î¤â¤Î¤¬¤¢¤ë¡£
33 ¤ò»È¤¦¤È¡¢RTC ¤Î¡ÖÌܳФޤ·»þ¹ï¡×¤òÀßÄꤷ¤Æ¤«¤é
34 ¥·¥¹¥Æ¥à¤ò¥µ¥¹¥Ú¥ó¥É¥â¡¼¥É¡¦¥¹¥¿¥ó¥Ð¥¤¥â¡¼¥É¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£
35 RTC ¤«¤é¤Î³ä¤ê¹þ¤ß¤¬¤¢¤ë¤È¡¢¥³¥ó¥Ô¥å¡¼¥¿¤ÏÌܤò³Ð¤Þ¤¹¡£
36 ¤³¤Î¥×¥í¥°¥é¥à¤Ï¡¢¥«¡¼¥Í¥ë»þ¹ï¤ÎÉÔϢ³¤ÊÊѲ½ (leap)
37 ¤òÂԤĤ³¤È¤Ë¤è¤Ã¤Æ¤³¤Î¥¤¥Ù¥ó¥È¤ò¸¡ÃΤ·¡¢À®¸ù¤òÊÖ¤·¤Æ½ªÎ»¤¹¤ë¡£
38 °ìʬ°ÊÆâ¤Ë»þ¹ï¤Î leap ¤¬¤Ê¤«¤Ã¤¿¤ê¡¢²¿¤«¤Þ¤º¤¤¤³¤È¤¬¤ª¤³¤Ã¤¿¤é¡¢
39 0 °Ê³°¤ÎÃͤòÊÖ¤·¤Æ½ªÎ»¤¹¤ë¡£
41 .\"O The wake-up time can be specified in two formats:
42 Éüµ¢»þ¹ï¤Î»ØÄê¤Ë¤Ï 2 ¤Ä¤Î·Á¼°¤¬¤¢¤ë¡£
45 .\"O specifies a relative offset to the current time. The computer
46 .\"O will suspend for exactly hh hours and mm minutes plus a few seconds
48 ¤Ï¸½ºß¤Î»þ¹ï¤«¤é¤ÎÁêÂÐŪ¤Ê¥ª¥Õ¥»¥Ã¥È¤ò»ØÄꤹ¤ë¡£
49 ¥³¥ó¥Ô¥å¡¼¥¿¤¬Éüµ¢¤¹¤ë¤Þ¤Ç¤Ë¤Ï¡¢
50 hh »þ´Ö¤È mm ʬ¤Ë²Ã¤¨¤Æ²¿É䫤¬É¬ÍפȤʤ롣
53 .\"O specifies absolute
55 .\"O time in 24-hour format. The time stored in the RTC is not important.
56 .\"O You may change the time zone used, with
57 .\"O the TZ environment variable as usual. Daylight saving time is
58 .\"O not obeyed in this version, but might be in a future release.
59 ¤ÏÉüµ¢»þ¹ï¤ò 24 »þ´Ö¥Õ¥©¡¼¥Þ¥Ã¥È¤Î\fB¥í¡¼¥«¥ë\fP»þ¹ï¤Ç»ØÄꤹ¤ë¡£
60 RTC ¤ËÊݸ¤µ¤ì¤Æ¤¤¤ë¤Î¤¬ GMT ¤«¤½¤¦¤Ç¤Ê¤¤¤«¤Ïµ¤¤Ë¤·¤Ê¤¯¤Æ¤è¤¤¡£
61 TZ ´Ä¶ÊÑ¿ô¤Ç¥¿¥¤¥à¥¾¡¼¥ó¤òÊѹ¹¤·¤Æ¤¤¤Æ¤âÎɤ¤¡£
62 ²Æ»þ´Ö¤Ï¤³¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ï¹Íθ¤·¤Æ¤¤¤Ê¤¤¤¬¡¢¾Íè¤ÏÂбþ¤¹¤ëͽÄê¤Ç¤¢¤ë¡£
69 .\"O program version and exit immediately.
71 ¥×¥í¥°¥é¥à¤Î¥Ð¡¼¥¸¥ç¥ó¤òɽ¼¨¤·¤Æ¤¿¤À¤Á¤Ë½ªÎ»¤¹¤ë¡£
74 .\"O Put the machine into suspend mode if possible (default). On my laptop,
75 .\"O suspend mode turns off everything except the memory.
76 ²Äǽ¤Ê¤é¥Þ¥·¥ó¤ò¥µ¥¹¥Ú¥ó¥É¥â¡¼¥É¤Ë¤¹¤ë (¥Ç¥Õ¥©¥ë¥È)¡£
77 ºî¼Ô¤Î¥é¥Ã¥×¥È¥Ã¥×¤Ç¤Ï¡¢¥µ¥¹¥Ú¥ó¥É¥â¡¼¥É¤Ï¥á¥â¥ê°Ê³°¤Î¤¹¤Ù¤Æ¤ÎÅŸ»¤ò¼×ÃǤ¹¤ë¡£
80 .\"O Put the machine into standby mode if possible. On my laptop, standby mode
81 .\"O turns off screen, hard disk, and CPU.
82 ²Äǽ¤Ê¤é¥Þ¥·¥ó¤ò¥¹¥¿¥ó¥Ð¥¤¥â¡¼¥É¤Ë¤¹¤ë¡£
83 ºî¼Ô¤Î¥é¥Ã¥×¥È¥Ã¥×¤Ç¤Ï¡¢¥¹¥¿¥ó¥Ð¥¤¥â¡¼¥É¤Ï
84 ¥¹¥¯¥ê¡¼¥ó¡¦¥Ï¡¼¥É¥Ç¥£¥¹¥¯¡¦CPU ¤ÎÅŸ»¤ò¼×ÃǤ¹¤ë¡£
87 .\"O Wait indefinitely for the time leap.
88 »þ¹ï¤Î leap ¤ò¤¤¤Ä¤Þ¤Ç¤âÂÔ¤Á³¤±¤ë¡£
91 .\"O Do not call /usr/bin/apm to suspend computer, just set the alarm clock
92 .\"O and wait for time leap.
93 ¥³¥ó¥Ô¥å¡¼¥¿¤ò¥µ¥¹¥Ú¥ó¥É¤µ¤»¤ë¤È¤¤Ë /usr/bin/apm ¤ò¸Æ¤Ð¤Ê¤¤¡£
94 ¥¢¥é¡¼¥à¥¯¥í¥Ã¥¯¤ò͸ú¤Ë¤·¤Æ»þ¹ï¤Î leap ¤òÂԤĤÀ¤±¡£
97 .\"O Print some information about what is going on.
98 ²¿¤¬µ¯¤³¤Ã¤Æ¤¤¤ë¤Î¤«¡¢¾ðÊó¤òɽ¼¨¤¹¤ë¡£
99 .\"O .SH REQUIRED SYSTEM CONFIGURATION
100 .SH ɬÍפȤʤ륷¥¹¥Æ¥àÀßÄê
104 .\"O The special character device /dev/rtc must exist and the Linux kernel needs
105 .\"O to be compiled with APM and RTC support (CONFIG_RTC, and
106 .\"O relevant CONFIG_APM* options).
107 ¥¹¥Ú¥·¥ã¥ë¡¦¥¥ã¥é¥¯¥¿¡¦¥Ç¥Ð¥¤¥¹ /dev/rtc ¤¬Â¸ºß¤·¡¢
108 Linux ¥«¡¼¥Í¥ë¤ò APM ¤È RTC ¤ò¥µ¥Ý¡¼¥È¤¹¤ë¤è¤¦¤Ë
109 ¥³¥ó¥Ñ¥¤¥ë¤·¤Æ¤ª¤«¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤
110 (CONFIG_RTC ¤È¡¢Å¬ÀÚ¤Ê CONFIG_APM* ¥ª¥×¥·¥ç¥ó)¡£
113 .\"O The computer must have the 'suspend to RAM'
114 .\"O feature enabled in the BIOS; 'suspend to Disk' will not work, because the
115 .\"O computer is turned off completely. You do not need to enable the ALARM
116 .\"O timer, it will be activated by apmsleep. On some boards, you can configure
117 .\"O which interrupts can be used to awake from suspend mode. If you have such
118 .\"O a board, you might want to make sure that keyboard (IRQ 1) and RTC (IRQ 8)
119 .\"O are among those interrupts.
120 BIOS ÀßÄê¤Ç¡¢¥³¥ó¥Ô¥å¡¼¥¿¤Î "suspend to RAM" µ¡Ç½¤ò
121 ͸ú¤Ë¤·¤Æ¤ª¤«¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
122 "suspend to Disk" ¤ÏÆ°ºî¤·¤Ê¤¤¡£
123 ¤³¤ì¤Ï¥³¥ó¥Ô¥å¡¼¥¿¤ÎÅŸ»¤ò´°Á´¤Ë¼×ÃǤ·¤Æ¤·¤Þ¤¦¤«¤é¤Ç¤¢¤ë¡£
124 ALARM ¥¿¥¤¥Þ¡¼¤Ï͸ú¤Ë¤·¤Ê¤¯¤Æ¤â¤è¤¤¡£¤³¤ì¤Ï
126 ¤Ë¤è¤Ã¤Æ͸ú¤Ë¤µ¤ì¤ë¡£¥Ü¡¼¥É¤Ë¤è¤Ã¤Æ¤Ï¡¢
127 ¥µ¥¹¥Ú¥ó¥É¥â¡¼¥É¤«¤éÉüµ¢¤µ¤»¤ë³ä¤ê¹þ¤ß¤òÁª¤Ù¤ë¤³¤È¤â¤¢¤ë¡£
128 ¤³¤Î¤è¤¦¤Ê¥Ü¡¼¥É¤ò»È¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢¥¡¼¥Ü¡¼¥É (IRQ 1) ¤È
129 RTC (IRQ 8) ¤¬¤½¤ÎÃæ¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë¤«¤ò³Î¤«¤á¤Æ¤ª¤¯¤ÈÎɤ¤¤À¤í¤¦¡£
133 .\"O The program must be run as root or have the SUID attribute set
135 ¤³¤Î¥×¥í¥°¥é¥à¤Ï root ¸¢¸Â¤Ç¼Â¹Ô¤¹¤ë¤«¡¢ SUID °À¤òÀßÄꤹ¤ëɬÍפ¬¤¢¤ë
141 .\"O Apmsleep cannot detect which event terminated the suspension. Possible
142 .\"O events are: keyboard or mouse activity, modem ring, alarm from RTC, any
143 .\"O other interrupt.
145 ¤Ï¤É¤Î¥¤¥Ù¥ó¥È¤¬¥µ¥¹¥Ú¥ó¥É¾õÂÖ¤ò½ªÎ»¤µ¤»¤¿¤«¤ò¸¡ÃΤǤ¤Ê¤¤¡£
146 ²ÄǽÀ¤Î¤¢¤ë¤â¤Î¤Ï¡¢¥¡¼¥Ü¡¼¥É¡¦¥Þ¥¦¥¹¤Ø¤ÎÆþÎÏ¡¢¥â¥Ç¥à¤Ø¤ÎÃå¿®¡¢
147 RTC ¤«¤é¤Î¥¢¥é¡¼¥à¡¢¤½¤Î¾¤¢¤é¤æ¤ë³ä¤ê¹þ¤ß¡¢¤Ê¤É¡£
149 .\"O This program was tested on a Winbook XL laptop (Pentium) only.
150 .\"O It may not function on your hardware.
151 ¤³¤Î¥×¥í¥°¥é¥à¤Ï Winbook XL ¥é¥Ã¥×¥È¥Ã¥× (Pentium) ¤Ç¤·¤«¥Æ¥¹¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
152 ¤¢¤Ê¤¿¤Î¥Ï¡¼¥É¥¦¥§¥¢¤Ç¤ÏÆ°ºî¤·¤Ê¤¤¤«¤â¤·¤ì¤Ê¤¤¡£
155 .\"O Written by Peter Englmaier (ppe@pa.uky.edu) and may be freely
156 .\"O distributed under the terms of the GNU General Public License. The
157 .\"O code is based on Paul Gortmacher's RTC test/example program. There is
158 .\"O ABSOLUTELY NO WARRANTY for this program. The current maintainer is
159 .\"O Peter Englmaier.
160 ¤³¤Î¥×¥í¥°¥é¥à¤Ï Peter Englmaier (ppe@pa.uky.edu) ¤Ë¤è¤Ã¤Æ½ñ¤«¤ì¡¢
161 GNU °ìÈ̸ø¶¦»ÈÍѵöÂú¤Î¤â¤È¤Ç¼«Í³¤ËºÆÇÛÉۤǤ¤ë¡£
162 ¤³¤Î¥³¡¼¥É¤Ï Paul Gortmacher ¤Î RTC ¥Æ¥¹¥È/Î㼨¥×¥í¥°¥é¥à¤ò¸µ¤Ë¤·¤Æ¤¤¤ë¡£
163 ¤³¤Î¥×¥í¥°¥é¥à¤Ï¡Ö´°Á´¤Ë̵ÊݾڡפǤ¢¤ë¡£¸½ºß¤Î´ÉÍý¼Ô¤Ï
164 Peter Englmaier ¤Ç¤¢¤ë¡£
167 .\"O .BR xapm "(1), "apmd (8), rtc.txt "(Linux Kernel Documentation)"
170 .BR rtc.txt " (Linux Kernel Documentation)"