Solaris Common Desktop Environment: User's Guide

Using the Suspend-Resume Feature

This section discusses the issues to consider when you use the Suspend-Resume feature, for example:

This section points out the 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 –

The Solaris operating environment also provides a command line interface so that a system administrator can change the default settings and idleness definition of a system. 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 you 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 can not be delivered for more than three days, then the mail 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 might not receive messages that the mail application has sent 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 sent back to the sender.

Remote Login Issues

While your machine is suspended, you can not access the machine by remote dial-in. In other words, you can not use rlogin(1) to connect to a machine while that machine is suspended.

Networked Software Issues

The Suspend-Resume feature might have an impact on a networked application. A networked program might fail if the program 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 the application on a second system. If the Power Management software suspends the second system, the application software might fail.

Solstice AutoClient Issues

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

ATM Issues

The Power Management software is not supported on SunATM™ devices. The ATM protocol requires that 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 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 the queue of cron jobs. The cron process 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. You should also take into account how an increase in power cycling affects 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 prevents an excessive number of automatic power-cycle requests to the hardware.

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 can also 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 can also take some time. With the Suspend-Resume feature, you can power off your system and save all your current work-in-progress 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 might be affected while your system is suspended. Before you use the Suspend-Resume feature, read Choosing to Use Suspend-Resume.


Note –

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:


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 23–7 and Figure 23–8.

    Figure 23–7 Example of Power Key Location on Sun Type 5 and Type 6 Keyboards

    Graphic

    Figure 23–8 Power Key Location on Sun Compact 1 Keyboard

    Graphic

    After you press the Power key, the confirmation window shown in Figure 23–9 is displayed.

    Figure 23–9 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 synchronizes 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 23–7 or Figure 23–8 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-suspen
    #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 immediately shuts down the system.


    In a windowing environment, the confirmation window shown in Figure 23–10 is displayed.

    Figure 23–10 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 synchronizes 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 23–9.

  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 run a windowing system, such as 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 23–10. 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 23–7 or Figure 23–8 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

You can use the Dtpower program to 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 –

Read Choosing to Use Suspend-Resume before you change the AutoShutdown settings.


AutoShutdown uses the Suspend feature to automatically power off your system. When the system powers up again, the system resumes in the state in which the system was suspended.

Through the Dtpower window, you can activate or deactivate the AutoShutdown and AutoWakeup features. You can also specify the following values:

Figure 23–11 AutoShutdown Configuration for All Day

Graphic


Note –

AutoWakeup does not occur after you suspend a system manually. AutoWakeup 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 Enable AutoShutdown.

  4. Click Edit.

    The AutoShutdown window is displayed.

    Figure 23–12 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 23–12, the AutoShutdown occurs after 1 hour 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 are 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 Enable AutoShutdown.

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

  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 restarts is the second time you specify 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 Enable AutoShutdown.

  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 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 need to start the key processing daemon.

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


    % /usr/openwin/bin/speckeysd

Troubleshooting 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 appears similar to the following figure.

Figure 23–13 Suspend Failed Window

Graphic

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

To Respond to a Device Suspend Failure
  1. When the Suspend Failed window appears saying Device error during suspend, select Cancel.

    If you have not already saved your work, do so now. Take the following corrective action before you try to suspend your system again:

  2. Check for more information in the console window in the workspace.

    An unsupported device or a device performing nonresumable activity might be the cause of this problem.

    If the device specified by the console message is performing a nonresumable activity, stop the activity and try to suspend again.

    If your system contains devices in addition to the default configuration, then these devices might not support the Suspend feature. In that case, continue with the next step.

  3. Unload the device driver.

    Before you try to suspend again, you must attempt to unload the device driver. Perform the following 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.

    • You must unload another driver first, such as audio(7I) and dbri(7D).

    • The device is 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 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, you can suspend your system. You can select Power Off to shut down the system properly without causing file system damage. When you power on again, your system automatically reboots.

    Your data is not saved unless you save the data manually.

    If you select Power Off and the command fails, your system does not support software power off. An alert window is then displayed with information about the power-off failure, as shown in the following figure:

    Figure 23–14 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, obtain and install a device driver that supports Suspend features, to solve the problem for that device in the future.


To Respond to a Process Suspend Failure
  1. Select Cancel when the Suspend Failed window appears with the following message: Process cannot be stopped

    If you have not already saved your work, do so now. Try to suspend again.

  2. Check for more information in the Console window in the Workspace.

    If a process is a real-time process or is performing certain special network operations, that process might refuse to suspend gracefully. In most cases, this is only a temporary condition that you can correct by trying to suspend again.

    However, if the problem persists, stop the offending process, as specified in the console message, and try to 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 window is displayed again.


    Caution – Caution –

    Save your work if you have not already done so.


  4. Select Power Off.

    Your data is not saved unless you save the data manually.

    When you power on again, your system automatically reboots.

To Respond to an Abnormal Condition
  1. Select Cancel when the Suspend Failed window appears with the following message: Abnormal condition during suspend,

    You must 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 might 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 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.

    Your data is not saved unless you save the data manually.

    When you power on again, your system automatically reboots.

Troubleshooting a Shortage of Disk Space

When you execute a Suspend command, your system creates a statefile to preserve the current state of your system. If the file system that contains the statefile is full, a Suspend Failed window appears with 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 must 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 must have a minimum of 10 Mbytes of free space. Clean up a partition before you try to 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 window appears 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.

    Your data is not saved unless you save the data manually.

    When you power on again, your system automatically reboots.

Disabling the Screen Lock

After a Resume, the system 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.