The power module provides an interface to powerd, a daemon that manages the aggressive suspend and wakeup policies for early OLPC laptops.
The module does nothing if powerd is not present. powerd is not required on laptops other than OLPC XO-1, XO-1.5, XO-1.75 and XO-4. Distributions of Sugar on other hardware need not include the powerd package.
- class sugar3.power.PowerManager¶
Control of automatic idle suspend, with reference counting.
Activities may call
inhibit_suspend()before playing music, video, speaking large amounts of text, collaborating, or waiting for response to network operations.
As an example, the Clock activity inhibits automatic idle suspend while it is active, so that the displayed clock-face continues to change. Otherwise it would freeze.
While automatic idle suspend is inhibited, powerd will continue to dim and blank the display.
powerd is resilient against failure to restore automatic idle suspend; it verifies an inhibit request and deletes it if the requesting process has terminated.
Inhibit automatic idle suspend until restored.
Check if automatic idle suspend is inhibited.
whether automatic idle suspend is inhibited.
- Return type
Possibly restore automatic idle suspend.
Shutdown the power manager.
Restores automatic idle suspend regardless of reference counting.
Does automatic idle suspend break collaboration with this toolkit? Yes. For future use by a toolkit with more resilient collaboration.