1 .\" Copyright (c) 2001, Sun Microsystems, Inc. 2 .\" All Rights Reserved 3 .\" 4 .\" Copyright 2020 Joyent, Inc. 5 .\" 6 .\" The contents of this file are subject to the terms of the 7 .\" Common Development and Distribution License (the "License"). 8 .\" You may not use this file except in compliance with the License. 9 .\" 10 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 11 .\" or http://www.opensolaris.org/os/licensing. 12 .\" See the License for the specific language governing permissions 13 .\" and limitations under the License. 14 .\" 15 .\" When distributing Covered Code, include this CDDL HEADER in each 16 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 17 .\" If applicable, add the following below this CDDL HEADER, with the 18 .\" fields enclosed by brackets "[]" replaced with your own identifying 19 .\" information: Portions Copyright [yyyy] [name of copyright owner] 20 .\" 21 .Dd January 12, 2020 22 .Dt CPR 7 23 .Os 24 .Sh NAME 25 .Nm cpr 26 .Nd Suspend and resume module 27 .Sh SYNOPSIS 28 .Pa /platform/i86pc/kernel/misc/amd64/cpr 29 .Pa /platform/sun4u/kernel/misc/sparcv9/cpr 30 .Sh DESCRIPTION 31 The 32 .Nm 33 module is a loadable module used to suspend and resume the entire system. 34 You may wish to suspend a system to save power or to power off 35 temporarily for transport. 36 The 37 .Nm 38 module should not be used in place of 39 a normal shutdown when performing any hardware reconfiguration or replacement. 40 In order for the resume operation to succeed, it is important that the hardware 41 configuration remain the same. 42 When the system is suspended, the entire system 43 state is preserved in non-volatile storage until a resume operation is 44 conducted. 45 .Pp 46 .Xr pmconfig 1M 47 and 48 .Xr power.conf 4 49 are used to configure the suspend-resume feature. 50 .Pp 51 The speed of suspend and resume operations can range from 15 seconds to 52 several minutes, depending on the system speed, memory size, and load. 53 .Pp 54 During resume operation, the 55 .Dv SIGTHAW 56 signal is sent to all processes to 57 allow them to do any special processing in response to suspend-resume 58 operation. 59 Normally applications are not required to do any special processing 60 because of suspend-resume, but some specialized processes can use 61 .Dv SIGTHAW 62 to restore the state prior to suspend. 63 For example, 64 .Sy X 65 can refresh the screen in response to 66 .Dv SIGTHAW . 67 .Pp 68 In some cases the 69 .Nm 70 module may be unable to perform the suspend operation. 71 If a system contains additional devices outside the standard shipped 72 configuration, it is possible that device drivers for these additional devices 73 might not support suspend-resume operations. 74 In this case, the suspend fails and an error message is displayed. 75 These devices must be removed or their 76 device drivers unloaded for the suspend operation to succeed. 77 Contact the 78 device manufacturer to obtain a new version of device driver that supports 79 suspend-resume. 80 .Pp 81 A suspend may also fail when devices or processes are performing critical or 82 time-sensitive operations (such as realtime operations). 83 The system will remain in its current running state. 84 Messages reporting the failure will be displayed 85 on the console and status returned to the caller. 86 Once the system is 87 successfully suspended the resume operation will succeed, barring external 88 influences such as a hardware reconfiguration. 89 .Pp 90 Some network-based applications may fail across a suspend and resume cycle. 91 This largely depends on the underlying network protocol and the applications 92 involved. 93 In general, applications that retry and automatically reestablish 94 connections will continue to operate transparently on a resume operation; 95 those applications that do not will likely fail. 96 .Sh INTERFACE STABILITY 97 Unstable 98 .Sh SEE ALSO 99 .Xr pmconfig 1M , 100 .Xr uadmin 1M , 101 .Xr uadmin 2 , 102 .Xr power.conf 4 , 103 .Xr attributes 5 104 .Pp 105 .%T Writing Device Drivers 106 .Sh NOTES 107 Certain device operations such as tape and floppy disk activities are not 108 resumable due to the nature of removable media. 109 These activities are detected 110 at suspend time, and must be stopped before the suspend operation will 111 complete successfully. 112 .Pp 113 Suspend-resume is currently supported only on a limited set of hardware 114 platforms.