ADC Home > Reference Library > Technical Notes > Legacy Documents > Hardware & Drivers >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

Little PowerBook in Slumberland

CONTENTS

The purpose of this Note is to describe the ramifications of resting, sleeping, and power-saving modes in the PowerBook family of Macintosh computers, how they may affect your application, and the appropriate ways to defeat them, when appropriate. It also describes some nonintuitive ramifications of working with a battery-powered computer.

[Oct 01 1992]






The Power Manager

In each PowerBook is a separate processor called the Power Manager. Its function is to monitor and control the power consumption and battery charging of the system. In doing this, it turns on and off various hardware subsystems, changes or stops the CPU's clock speed, watches the battery voltage, and, when charging, sets the bulk charge or trickle charge modes of the battery charging circuit. As you can see, the power draw of the system is a dynamically changing value, depending on which subsystems are currently in use, the speed of the processor, and whether or not charger circuit power is available. The Power Manager is designed to optimize for the maximum battery life and controls the various operating modes in response to user preferences that allow the user to override or push back in time the onset of these modes.

The Many Faces of the Power Manager

The PowerBook 100 (just like the original portable) has four operating modes: normal, rest, sleep, and shutdown.

The PowerBook 140 has four operating modes: normal, rest (power cycling), sleep, and shutdown.

The PowerBook 170 has five operating modes: normal, powersaver, rest (power cycling), sleep, and shutdown.

* Normal Mode:

In the normal operating mode the CPU is running at its full clock speed. There is no interface associated with running in this mode.

PowerBook 100 and 140: 16 MHz

PowerBook 170: 25 MHz

* Powersaver Mode:

PowerBook 100 and 140: This mode is not available.

PowerBook 170: This mode can be turned on and off from the Battery desk accessory. When powersaver mode is on, the clock speed is reduced from its normal 25 MHz to a less power consumptive 16 MHz.

* Rest Mode:

After a period of inactivity, the Power Manager will put the system into a rest mode.

Activity is defined as:

  • Any call to Read or Write (any I/O activity)
  • Having an ADB Completion Routine called (moving the mouse or hitting a key on the keyboard, for instance)
  • Any call to Post Event
  • Any call to OSEventAvail
  • Any sound generation
  • Any call to SetCursor with a new cursor (setting the same cursor does nothing)

Rest will also not be entered if the cursor is set to the system Watch cursor.

PowerBook 100: After 15 seconds of inactivity the Power Manager slows the processor clock down to an effective 1 MHz by inserting wait states.

A program can reset the 15-second countdown by calling IdleUpdate and can turn the countdown off and on with DisableIdle and EnableIdle. IdleUpdate is the preferred method. From the Finder the user can disable rest mode by Option-clicking the text in the Portable control panel device that says "Minutes Until Automatic Sleep." This brings up a dialog box that allows you to set "Rest" and "Don't Rest." Permanently disabling rest mode will reduce your battery's available operating time between charging.

PowerBook 140 and 170: This mode is implemented by using a power-saving method called power cycling. Power cycling reduces the CPU power draw by up to 90 percent during idle periods. Power cycling will start after 2 seconds when there is no user or input/output activity (screen updates do not count as I/O activity) as outlined above in rest mode. The CPU is then turned off. After a short break ,on the order of 1/2 to 3/4 second, the CPU power is restored. The system checks to see if any activity conditions have been met; if so, power cycling is stopped. If there is no activity, the power cycling time increases a small amount, up to a few seconds. The CPU will stay off for the power cycling duration or until an interrupt comes in.

Power cycling works as follows. The registers of the 68030 and the 68882 are saved, and power to them is turned off if no input activity is detected. The power cycle consists of turning the power to the CPU off and stopping the CPU clock, and then restoring power to the CPU after the varying wait period. When power is back on, the CPU registers are restored and the CPU monitors the system for activity.

* Sleep Mode:

PowerBook 100, 140, and 170: This mode stops processing by bringing the CPU clock to 0 MHz and turning off power to all subsystems except RAM memory and the Power Manager. Before entering and after leaving sleep mode, the system calls entries in the Sleep Queue to allow drivers and other processes to prepare for loss of power and the resetting of devices after power is restored.

Sleep mode can be prevented by checking the box labeled "Stay awake when plugged in" in the Portable control panel device and having the charger adapter of the PowerBook plugged in.

* Shutdown Mode:

PowerBook 100: Shutdown mode for the 100 is identical to sleep mode except that the operating system software must reboot before continuing.

PowerBook 140 and 170: Shutdown mode for 140 and 170 is the same as turning the power off on any other (nontransportable) Macintosh. All subsystems are off except that there is a vary small drain on the battery to maintain parameter RAM settings.

Defeating the Rest Mode Is Not Recommended

Regardless of the power source, the PowerBook is designed always to draw its power needs from the battery, not directly from an AC outlet. Because of this power architecture, the battery charge is constantly fluctuating. If the hardware power needs are met, the remaining voltage from the power adapter will trickle charge the battery. It is important to keep in mind that depending on use, the PowerBook may require the entire available power, not allowing for the battery to charge at all. For the PowerBook to recharge fully, the unit must be in either sleep or shutdown mode. One of the primary considerations in the design of the PowerBook 170 was power conservation. If the unit is running with the rest mode defeated, there is a possibility that charging will take longer than you might expect or you will actually drain your, or your customers, battery or your customers. This is because the Power Adapter is intended for battery charging and cannot accommodate the needs of a 68030 processor running at 100 percent speed and a hard disk running 100 percent of the time.

Back to top

References

Inside Macintosh, Volume VI, Power Manager

Macintosh PowerBook Family Developer Notes

Back to top

Downloadables

Acrobat gif

Acrobat version of this Note (52K)

Download


Back to top


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.