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