Using Power Management

Chapter 4 Using the Suspend-Resume Feature

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).


Note -

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.


Choosing to Use Suspend-Resume

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.

Electronic Mail Issues

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 Alias Issues

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.

Remote Login Issues

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.

Networked Software Issues

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.

Solstice AutoClient Issues

Do not use Suspend-Resume features on a machine that uses Solstice(TM) AutoClient(TM) software.

ATM Issues

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.

Cron Job Issues

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:

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.

Calendar Manager Issues

The Calendar Manager software does not display pop-up windows for scheduled events that occur while the desktop machine is suspended.

Thermal Stress Issues

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.

Suspending and Resuming Your System Manually

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".


Note -

The Suspend-Resume feature is not supported on systems configured as diskless clients.


Suspending Your System

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:


Note -

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:

To Suspend Your System Using the Keyboard
  1. Press the Power key.

    For examples of the location of the Power key, see Figure 4-1.

    Figure 4-1 Example of Power Key Location on Sun Type 5 and Type 6 Keyboards

    Graphic

    After you press the Power key, the confirmation window shown in Figure 4-2 is displayed.

    Figure 4-2 Default Confirmation Window for Power Key Suspend

    Graphic

  2. 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.

  3. Wait for the system to power off.

  4. 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.

To Immediately Suspend Your System Using the Keyboard
  1. Press the Shift and the Power key at the same time.

    See Figure 4-1 for the location of the Power key.

  2. Wait for the system to power off.

  3. 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.

To Disable the Power Key
  1. As root, edit the /usr/openwin/lib/speckeysd.map file


    # vi /usr/openwin/lib/speckeysd.map
    
  2. 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
  3. Save the edited file.

  4. Shut down and restart the system.

To Suspend Your System Using the Standby Switch

Some systems, such as the Sun Ultra 5 and Sun Ultra 10, have a standby switch on the front of the system.

  1. Press the standby switch while you are in a windowing environment.


    Caution - Caution -

    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.

    Figure 4-3 Default Confirmation Window for Standby Switch

    Graphic

  2. 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.

  3. Wait for the system to power off.

  4. 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.

To Suspend Your System Using CDE
  1. Place your cursor in the workspace and hold down the menu button.

    The Workspace menu is displayed.

  2. Select Suspend System from the Workspace menu.

    The Suspend confirmation window is displayed, as shown in Figure 4-2.

  3. Select Suspend in the confirmation window.

  4. Wait for the system to power off.

  5. 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.

To Initiate Suspend Using the sys-suspend Command

Note -

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.


  1. 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.

  2. Click Suspend.

  3. Wait for the system to power off.

  4. 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.

To Resume a Suspended System
  1. Power on all external devices connected to your system.

  2. Press the Power key.

    See Figure 4-1 for power key locations.

  3. Enter your password to unlock the system.

    Whenever the system is suspended, it is automatically locked.

System AutoShutdown and AutoWakeup Controls

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.


Note -

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:

Figure 4-4 Autoshutdown Configuration for All Day

Graphic


Note -

AutoWakeup does not occur after you suspend a system manually; it can occur only after an AutoShutdown.


To Set an Idle Time for AutoShutdown
  1. Start Dtpower.


    Note -

    Consecutive executions of AutoShutdown do not occur less than five minutes apart, even if the idle time setting is under five minutes.


  2. In the Dtpower basic window, click More.

    The window expands to show the Quick Edit tab.

  3. In the Quick Edit tab, check Autoshutdown Enabled.

  4. Click Edit.

    The AutoShutdown window is displayed.

    Figure 4-5 Autoshutdown Window

    Graphic

  5. Enter the time you want the AutoShutdown feature to start to be active.

  6. Enter the time you want the AutoShutdown feature to cease being active.

  7. 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.

  8. 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.

To Disable Autoshutdown
  1. Start Dtpower.

  2. In the Dtpower basic window, click More.

    The window expands to show the Quick Edit tab.

  3. In the Quick Edit tab, uncheck Autoshutdown Enabled.

  4. Click OK.

To Enable AutoWakeup

Note -

The AutoWakeup feature is available only on sun4u desktop systems.


  1. Start Dtpower.

  2. In the Dtpower basic window, click More.

    This expands the window to reveal the Quick Edit tab.

  3. In the Quick Edit tab, check Autoshutdown Enabled.

  4. Click Edit.

    The AutoShutdown window is displayed.

  5. Set the idle time for AutoShutdown.

    See "To Set an Idle Time for AutoShutdown".

  6. Check the Restart at <time> button.

The time the computer will restart is the second time you have specified for Autoshutdown.

To Disable AutoWakeup
  1. Start Dtpower.

  2. In the Dtpower basic window, click More.

    This expands the window to reveal the Quick Edit tab

  3. In the Quick Edit tab, uncheck Autoshutdown Enabled.

  4. Click Edit.

    The AutoShutdown window is displayed.

  5. Uncheck the Restart at <time> button.

To Exit Dtpower
  1. Click OK to activate the new settings you made in the Dtpower window.

    The Dtpower window closes.

Troubleshooting Suspend-Resume Problems

The following section describes solutions to problems that may occur with Suspend-Resume.

Power Key Problems

If pressing the Power key does not suspend your system, refer to the following procedure.

To Respond When the Power Key Does Not Suspend the System
  1. 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.

  2. Become superuser and start the key processing daemon (if necessary):


    % /usr/openwin/bin/speckeysd

Suspend Failures

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.

Figure 4-6 Suspend Failed Pop-up Window

Graphic

When any Suspend Failed window appears, click either of the buttons at the bottom of the window:

The following sections discuss specific "Suspend Failed" messages.

Device Suspend Failure

If a device fails to suspend, a Suspend Failed pop-up window is displayed that includes the following message:

Device error during suspend.

To Respond to a Device Suspend Failure
  1. Select Cancel.

    If you have not already saved your work, do so now. Take the corrective action described below before retrying suspend again.

  2. 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.

  3. Unload the device driver.

    Before you try to suspend again, attempt to unload the device driver by doing these steps:

    1. Get the module ID by running modinfo.

    2. Unload that module:


      modunload -i module_id
      

    You might not be able to unload a driver for one of these reasons:

    • There is no detach support in the code.

    • 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.

  4. 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.


    Caution - Caution -

    Save your work if you have not already done so.


  5. 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:

    Figure 4-7 Power Off Failed Pop-up Window

    Graphic

  6. 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.

  7. Save your work if you have not already done so.

  8. Halt the operating system.

  9. Power off by pressing the power switch on the back panel of the system to the off (0) position.


    Note -

    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.


Process Suspend Failure

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.

To Respond to a Process Suspend Failure
  1. Select Cancel.

    If you have not already saved your work, do so now. Retry Suspend again.

  2. 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.

  3. 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.


    Caution - Caution -

    Save your work if you have not already done so.


  4. 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.

Shortage of Disk Space

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.

To Respond to a Disk Space Limitation
  1. 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.

  2. 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.

  3. 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.


    Caution - Caution -

    Save your work if you have not already done so.


  4. 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.

Abnormal Conditions

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.

To Respond to an Abnormal Condition
  1. 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.

  2. 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.

  3. 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.


    Caution - Caution -

    Save your work if you have not already done so.


  4. 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.

Disabling the Screen Lock

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.


Note -

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.


To Disable the Screen Lock After Using the Power Key to Suspend
  1. 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).


    Caution - Caution -

    Save your work if you have not already done so.


  2. Exit the current windowing session and restart.

    In place of this step, you may also kill the speckeysd daemon and then restart the daemon.