xref: /illumos-gate/usr/src/man/man4/cpr.4 (revision 7802dc577d81e5451376b767f12514ec82872c30)
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 4
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
31The
32.Nm
33module is a loadable module used to suspend and resume the entire system.
34You may wish to suspend a system to save power or to power off
35temporarily for transport.
36The
37.Nm
38module should not be used in place of
39a normal shutdown when performing any hardware reconfiguration or replacement.
40In order for the resume operation to succeed, it is important that the hardware
41configuration remain the same.
42When the system is suspended, the entire system
43state is preserved in non-volatile storage until a resume operation is
44conducted.
45.Pp
46.Xr pmconfig 8
47and
48.Xr power.conf 5
49are used to configure the suspend-resume feature.
50.Pp
51The speed of suspend and resume operations can range from 15 seconds to
52several minutes, depending on the system speed, memory size, and load.
53.Pp
54During resume operation, the
55.Dv SIGTHAW
56signal is sent to all processes to
57allow them to do any special processing in response to suspend-resume
58operation.
59Normally applications are not required to do any special processing
60because of suspend-resume, but some specialized processes can use
61.Dv SIGTHAW
62to restore the state prior to suspend.
63For example,
64.Sy X
65can refresh the screen in response to
66.Dv SIGTHAW .
67.Pp
68In some cases the
69.Nm
70module may be unable to perform the suspend operation.
71If a system contains additional devices outside the standard shipped
72configuration, it is possible that device drivers for these additional devices
73might not support suspend-resume operations.
74In this case, the suspend fails and an error message is displayed.
75These devices must be removed or their
76device drivers unloaded for the suspend operation to succeed.
77Contact the
78device manufacturer to obtain a new version of device driver that supports
79suspend-resume.
80.Pp
81A suspend may also fail when devices or processes are performing critical or
82time-sensitive operations (such as realtime operations).
83The system will remain in its current running state.
84Messages reporting the failure will be displayed
85on the console and status returned to the caller.
86Once the system is
87successfully suspended the resume operation will succeed, barring external
88influences such as a hardware reconfiguration.
89.Pp
90Some network-based applications may fail across a suspend and resume cycle.
91This largely depends on the underlying network protocol and the applications
92involved.
93In general, applications that retry and automatically reestablish
94connections will continue to operate transparently on a resume operation;
95those applications that do not will likely fail.
96.Sh INTERFACE STABILITY
97Unstable
98.Sh SEE ALSO
99.Xr uadmin 2 ,
100.Xr power.conf 5 ,
101.Xr attributes 7 ,
102.Xr pmconfig 8 ,
103.Xr uadmin 8
104.Pp
105.%T Writing Device Drivers
106.Sh NOTES
107Certain device operations such as tape and floppy disk activities are not
108resumable due to the nature of removable media.
109These activities are detected
110at suspend time, and must be stopped before the suspend operation will
111complete successfully.
112.Pp
113Suspend-resume is currently supported only on a limited set of hardware
114platforms.
115