GNOME Power Management Specification (with additions)

Richard Hughes


            
          

Version 2.19.x


Table of Contents

Overview
DBUS API
Compulsory Basic Interface
Optional Backlight Interface

Overview

A Power Management specification has been in used informally used for a few years on the GNOME desktop. There has never been any standardised nomenclature or API to allow desktops such as KDE and XFCE to interoperate. This has lead to technologies that have often been incompatible and resulted in poor integration of power management into desktop applications.

DBUS API

The interfaces are session-wide.

DBUS Service:org.freedesktop.PowerManagement

Compulsory Basic Interface

DBUS Interface:org.freedesktop.PowerManagement
DBUS Path:/org/freedesktop/PowerManagement

Methods on interface org.freedesktop.PowerManagement define a compulsory base layer for interoperability.

Table 1. Methods on interface org.freedesktop.PowerManagement

NameInput ParametersReturn ValuesThrows ErrorDescription
Suspend  PermissionDenied, NoHardwareSupportAttempt to suspend the system.
Hibernate  PermissionDenied, NoHardwareSupportAttempt to hibernate the system.
CanSuspend bool can_suspend If the current session user is able to suspend the system.
CanHibernate bool can_hibernate If the current session user is able to hibernate the system.

Optional Backlight Interface

NON STANDARDISED API

DBUS Interface:org.freedesktop.PowerManagement.Backlight
DBUS Path:/org/freedesktop/PowerManagement/Backlight

The org.freedesktop.PowerManagement.Backlight interface is optional, and allows a UI element to interact with the session daemon without using HAL directly.

By using the session dameon, rather than HAL any UI can have preference settings saved, without two policies being forced on one device.

Table 2. Methods on interface org.freedesktop.PowerManagement.Backlight

NameInput ParametersReturn ValuesThrows ErrorDescription
GetBrightness uint percentage_brightnessNoHardwareSupportReturns the current backlight brightness as a percentage.
SetBrightnessuint percentage_brightness DeniedByPolicy, NoHardwareSupport This may not immediately set the brightness if we are in a low power sleep mode, if the panel is switched off, or if the panel is in an idle dim state.

Table 3. Signals emitted from interface org.freedesktop.PowerManagement.Backlight

NameReturn ValuesDescription
BrightnessChangeduint percentage_brightnessSignals the value of the current brightness has changed.