This chapter discusses the issues to consider when choosing to use the Suspend-Resume feature. It describes how to use the Suspend-Resume features to manually shut down your system and start it up again in the same working state. It also explains how to use the Dtpower program to manage system power, such as to specify when you want the desktop system to shut down automatically. It describes how to activate or turn off the Suspend-Resume feature.
This chapter points out the few differences in how the Dtpower program operates on sun4m-architecture desktop machines (such as the SPARCstationTM 20) and on sun4u-architecture desktop machines (such as the Sun UltraTM 1).
A command line interface is also provided for a system administrator to change a desktop machine's system default settings and to change the idleness definition. For more information, see the power.conf(4) man page.
Powering off a desktop system may interfere with some operations that involve that machine. This section presents some guidelines to take into account before deciding when to use system Power Management features on a desktop machine.
Mail is not sent to any mail spool file on a machine while the machine is suspended. Typically, if mail cannot be delivered for more than three days, it is returned to the sender as undeliverable.
If you suspend your system for three days or longer, and your machine has a local mail spool, you may fail to receive items of mail that have been bounced back to the sender.
Mail aliases on a machine are not available to other users while that machine is suspended. If the machine is suspended long enough (typically three days), messages sent to an alias on that machine are bounced back to the sender.
While your machine is suspended, you cannot access it by remote dial-in. That is, you cannot use rlogin(1) to connect to a machine while that machine is suspended.
The Suspend-Resume feature may have an impact on a networked application. A networked program may fail if it is not resilient when a peer system is suspended and does not respond to network traffic.
One example of this is when you run an Xhosted application from one system and display it on another system. If the Power Management software suspends the latter system, the application software may fail.
Do not use Suspend-Resume features on a machine that uses Solstice(TM) AutoClient(TM) software.
The Power Management software is not supported on SunATM(TM) devices. The ATM protocol is connection oriented, which means calls must be established between two endpoints (such as workstations) before data can be transferred. Each end of the call must maintain the connection actively, so neither end of an ATM connection can use the Power Management software to suspend and, later, resume the connection.
Operations specified in a cron file do not run during the time a machine is suspended.
When a system resumes, cron jobs scheduled to run during the time the system was suspended with the Power Management software are handled in the following way:
The first cron job (the one scheduled to run earliest during the time the system was suspended) is started as soon as the system resumes.
The second and subsequent cron jobs that might have run during the time the system was suspended are not run at all.
Normally, the cron command identifies the next job to run and calculates the interval to wait until it is time to run that job. When a system resumes, the cron command calculates the interval until the first job has expired; then this already-queued cron job is run. The cron process then rechecks its queue of jobs. It only considers jobs whose execution time has not yet passed, so any additional jobs whose run time fell during the time the system was suspended are not run.
The Calendar Manager software does not display pop-up windows for scheduled events that occur while the desktop machine is suspended.
The goal of the Power Management software is to conserve electricity. However, you should also take into account how an increase in power cycling will affect the overall reliability of the hardware.
The Power Management software is active by default on sun4u systems (such as the Sun Ultra 1). Accordingly, the Power Management system for those machines evaluates each automatic power-cycle request that occurs due to the system being idle. If an evaluation determines that the thermal shock of power cycling on a particular occasion would decrease hardware reliability, then that power-cycle request is deferred.
Despite this feature, you can choose to turn off a sun4u system manually at any time. This checking feature is intended as a brake on the hardware being subjected to an excessive number of automatic power-cycle requests.
The Power Management software includes a timesaving feature called Suspend-Resume. This feature is used by default through the AutoShutdown and AutoWakeup features of the Dtpower program. You also can Suspend and Resume your system whenever you choose by following the procedures in this section.
The traditional process of powering off your system can be time consuming. Similarly, the process of rebooting and setting up your workspace also can take some time. With the Suspend-Resume feature, you can power off your system and quickly save all your current work-in-process automatically. When you power on the system, the saved workspace is restored.
You can leave your system suspended and powered off for an indefinite length of time without losing data. However, there are some outside operations (such as receiving mail) that may be affected while your system is suspended. Before you use the Suspend-Resume feature, be sure to read "Choosing to Use Suspend-Resume".
The Suspend-Resume feature is not supported on systems configured as diskless clients.
You can suspend your system automatically using the AutoShutdown feature in the Power Management software. To suspend your system manually, follow the instructions in this section.
Suspend allows you to do the following without losing the current state of your system:
Move your system from one location to another.
Power off your system to conserve energy.
Do not use the Suspend feature if you need to reconfigure your system. You must halt the operating system whenever you want to reconfigure your system.
Before you suspend a system, you must wait for operations such as the following to finish:
Initiating a Suspend and a subsequent Resume usually requires less than a minute. You can initiate Suspend in several ways:
Use the power key, then respond to a prompt.
Use the Shift and Power keys to Suspend without a further prompt.
Use the standby switch available on the front of systems such as the Sun Ultra 5 and Sun Ultra 10.
Use the CDE desktop Workspace menu.
For examples of the location of the Power key, see Figure 4-1.
After you press the Power key, the confirmation window shown in Figure 4-2 is displayed.
Select Suspend in the confirmation window.
Suspend saves the state of the system to disk, enabling you to return later to the current system environment.
Shutdown syncs the disks to a neutral state and effectively shuts down the operating system. This is equivalent to running the shutdown(1M) command.
Wait for the system to power off.
Power off all external devices.
External devices include disk drives, printers, or other serial or parallel peripherals. See the manual supplied with the external device for instructions.
Press the Shift and the Power key at the same time.
See Figure 4-1 for the location of the Power key.
Wait for the system to power off.
Power off all external devices.
External devices include external disk drives, printers, or other serial or parallel peripherals. See the manual supplied with the external device for instructions.
As root, edit the /usr/openwin/lib/speckeysd.map file
# vi /usr/openwin/lib/speckeysd.map |
comment out the two lines starting "SunPower" by putting a "#" as the first character in the line.
#SunPowerSwitch - $OPENWINHOME/bin/sys-suspend #SunPowerSwitchShift - $OPENWINHOME/bin/sys-suspend -n |
Save the edited file.
Shut down and restart the system.
Some systems, such as the Sun Ultra 5 and Sun Ultra 10, have a standby switch on the front of the system.
Press the standby switch while you are in a windowing environment.
If you are not in a windowing environment, pressing the standby switch will immediately shut down the system.
In a windowing environment, the confirmation window shown in Figure 4-3 is displayed.
Select Suspend in the confirmation window.
Suspend saves the state of the system to disk, enabling you to return to the current system environment.
Shutdown syncs the disks to a neutral state and effectively shuts down the operating system. This is equivalent to running the shutdown(1M) command.
In the window for the standby switch, Shutdown is the default. In the similar window that appears when you press the power key, Suspend is the default.
Wait for the system to power off.
Power off all external devices.
External devices include disk drives, printers, or other serial or parallel peripherals. See the manual supplied with the external device for instructions.
Place your cursor in the workspace and hold down the menu button.
The Workspace menu is displayed.
Select Suspend System from the Workspace menu.
The Suspend confirmation window is displayed, as shown in Figure 4-2.
Select Suspend in the confirmation window.
Wait for the system to power off.
Power off all external devices.
External devices include disk drives, printers, or other serial or parallel peripherals. See the manual supplied with the external device for instructions.
You do not need to be running a windowing system, such as OpenWindows or CDE, for the sys-suspend shell command to work, nor do you need to be superuser.
At the prompt, initiate the system suspend process:
example% /usr/openwin/bin/sys-suspend |
The Suspend confirmation pop-up window is displayed, as shown in Figure 4-2. If a window system is not running, the command executes without displaying the confirmation pop-up window.
Click Suspend.
Wait for the system to power off.
Power off all external devices.
External devices include disk drives, printers, or other serial or parallel peripherals. See the manual supplied with the external device for instructions.
Press the Power key.
See Figure 4-1 for power key locations.
Enter your password to unlock the system.
Whenever the system is suspended, it is automatically locked.
Using the Dtpower program, you can specify times for your system to shut down automatically. This feature is called AutoShutdown. If you have a sun4u desktop machine, you can also set your system to power on automatically at a specified time. This feature is called AutoWakeup.
Be sure to read "Choosing to Use Suspend-Resume" before changing the AutoShutdown settings.
AutoShutdown uses the Suspend feature to automatically power off your system. When the system powers up again, it resumes in the state in which it was suspended.
Through the Dtpower window, you can activate or deactivate the AutoShutdown and AutoWakeup features. You can also specify the following values:
The number of minutes of idle time before AutoShutdown attempts to suspend the system
The start and finish times when AutoShutdown can occur during each day. (If you specify the same time for both start and finish, AutoShutdown can occur at any time of day. See Figure 4-4.)
The time of day when the system will automatically power on and resume (AutoWakeup) after being suspended by AutoShutdown (available on sun4u desktop systems only).
AutoWakeup does not occur after you suspend a system manually; it can occur only after an AutoShutdown.
Start Dtpower.
Consecutive executions of AutoShutdown do not occur less than five minutes apart, even if the idle time setting is under five minutes.
In the Dtpower basic window, click More.
The window expands to show the Quick Edit tab.
In the Quick Edit tab, check Autoshutdown Enabled.
Click Edit.
The AutoShutdown window is displayed.
Enter the time you want the AutoShutdown feature to start to be active.
Enter the time you want the AutoShutdown feature to cease being active.
In the numerical box for Shutdown During This Interval If Idle For, enter the duration for which the computer must be idle before shutting down.
In Figure 4-5, the AutoShutdown will occur after 30 minutes of idle time between the hours of 6:00 p.m. and 8:00 a.m.
Click OK when all the settings you want are displayed.
If you want to reject the displayed settings, select Cancel; the currently active settings will be displayed in the window.
Start Dtpower.
In the Dtpower basic window, click More.
The window expands to show the Quick Edit tab.
In the Quick Edit tab, uncheck Autoshutdown Enabled.
Click OK.
The AutoWakeup feature is available only on sun4u desktop systems.
Start Dtpower.
In the Dtpower basic window, click More.
This expands the window to reveal the Quick Edit tab.
In the Quick Edit tab, check Autoshutdown Enabled.
Click Edit.
The AutoShutdown window is displayed.
Set the idle time for AutoShutdown.
Check the Restart at <time> button.
The time the computer will restart is the second time you have specified for Autoshutdown.
Start Dtpower.
In the Dtpower basic window, click More.
This expands the window to reveal the Quick Edit tab
In the Quick Edit tab, uncheck Autoshutdown Enabled.
Click Edit.
The AutoShutdown window is displayed.
Uncheck the Restart at <time> button.
The following section describes solutions to problems that may occur with Suspend-Resume.
If pressing the Power key does not suspend your system, refer to the following procedure.
Verify that the key processing daemon is present:
% ps -eaf | grep speckeysd |
If the resulting message does not list /usr/openwin/bin/speckeysd, you will need to start the key processing daemon.
Become superuser and start the key processing daemon (if necessary):
% /usr/openwin/bin/speckeysd |
When the system fails to suspend, an alert appears. The exact message within the pop-up window may vary, depending on the cause of the problem, but the Suspend Failed window will appear similar to the following figure.
When any Suspend Failed window appears, click either of the buttons at the bottom of the window:
Power Off turns off power without preserving the current operating state, as a suspend operation usually does.
Cancel cancels the suspend request, and the hardware continues to be powered on.
The following sections discuss specific "Suspend Failed" messages.
If a device fails to suspend, a Suspend Failed pop-up window is displayed that includes the following message:
Device error during suspend.
Select Cancel.
If you have not already saved your work, do so now. Take the corrective action described below before retrying suspend again.
Check for more information in the console window in the workspace.
An unsupported device or a device performing nonresumable activity may be the cause of this problem. If the device specified by the console message is performing a nonresumable activity, stop the activity and try suspend again.
If your system contains devices in addition to the default configuration, then these devices may not support the Suspend feature. In that case, continue with the next step.
Before you try to suspend again, attempt to unload the device driver by doing these steps:
You might not be able to unload a driver for one of these reasons:
Another driver must be unloaded first, such as audio(7I) and dbri(7D).
The device is actually in use and busy.
In such a case, contact your system administrator.
Try Suspend again.
If Suspend succeeds, the system saves your activities and the system powers off successfully.
If Suspend does not succeed, the alert pop-up window is displayed again. In this case, continue with the next step.
Save your work if you have not already done so.
Select Power Off.
Since the error persists, suspend is not possible. Selecting Power Off shuts down the system properly without causing file system damage. (Remember, your data will not be saved unless you have saved it manually.) When you power on again, your system automatically reboots.
However, if you select Power Off and it fails, your system does not support software power off. An alert pop-up window is then displayed with information about the power-off failure, as shown in the following figure:
Select Continue.
Your system might not support software power off due to a non-Type 5 keyboard or an outdated system PROM. If you do have a Type 5 keyboard installed, then contact your system provider for a system PROM upgrade.
Also, some sun4m-architecture systems drop to an OpenBootTM PROM prompt after a suspend operation, because those systems do not support software power off.
Save your work if you have not already done so.
Halt the operating system.
Power off by pressing the power switch on the back panel of the system to the off (0) position.
When possible, solve the problem for that device in the future by obtaining and installing a device driver that supports Suspend features, if one is available from your manufacturer.
If a process fails to suspend, a Suspend Failed pop-up window is displayed that includes the following message:
Process can not be stopped.
Follow this procedure in response to this message.
Select Cancel.
If you have not already saved your work, do so now. Retry Suspend again.
Check for more information in the Console window in the Workspace.
If a process is a real-time process or if it is performing certain special network operations, that process may refuse to suspend gracefully. In most cases, this is only a temporary condition and you can correct it by trying Suspend again.
However, if the problem persists, stop the offending process (as specified in the console message) and retry Suspend again.
Try Suspend again.
If Suspend succeeds, the system saves your activities and the system powers off.
If Suspend does not succeed, the alert pop-up window is displayed again.
Save your work if you have not already done so.
Select Power Off.
Remember, your data will not be saved unless you have done so manually.
When you power on again, your system automatically reboots.
When your system suspends, it creates a statefile to preserve the current state of your system. If the file system containing the statefile is full, a Suspend Failed pop-up window is displayed that includes the following message:
Suspend requires more disk space for statefile.
Perform the following procedure in response to this message.
Select Cancel.
You'll need to take corrective action before you can try Suspend again.
If you have not already saved your work, do so now.
Check for more information in the Console window in the Workspace.
You must have a minimum of 10 MBytes of space available. Clean up a partition before you try suspend again. Another solution is to change the location of the statefile to a file system with sufficient space, as described in the power.conf(4) man page.
Contact your system administrator for assistance, if necessary.
Try Suspend again.
If Suspend succeeds, the system saves your activities and the system powers off.
If Suspend does not succeed, the alert pop-up window is displayed again. In that case, continue with the next step.
Save your work if you have not already done so.
Select Power Off.
Remember, your data will not be saved unless you have done so manually.
When you power on again, your system automatically reboots.
If an abnormal condition occurs, a Suspend Failed pop-up window is displayed that includes the following message:
Abnormal condition during suspend.
Perform the following procedure in response to this message.
Select Cancel.
You'll need to take corrective action before you can try to suspend again.
If you have not already saved your work, do so now.
Check for more information in the Console window in the Workspace.
You may be able to take further corrective action by checking the console error messages.
Try Suspend again.
If Suspend succeeds, the system saves your activities and the system powers off.
If Suspend does not succeed, the alert pop-up window is displayed again. In this case, continue with the next step.
Save your work if you have not already done so.
Select Power Off.
Remember, your data won't be saved unless you have done so manually.
When you power on again, your system automatically reboots.
After a Resume, the system's screen lock is invoked by default. To disable the screen lock before you use the power key to Suspend, use the following procedure.
You cannot disable screen locking that is put into effect by AutoShutdown. This is a security feature. It ensures that only someone who knows your password can get access to your work session when the system resumes.
Modify the speckeysd.map file to add the -x flag to the sys-suspend entry.
For more information, see the man page for speckeysd.map(4).
Save your work if you have not already done so.
Exit the current windowing session and restart.
In place of this step, you may also kill the speckeysd daemon and then restart the daemon.