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.
The interfaces are session-wide.
DBUS Service: | org.freedesktop.PowerManagement |
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
Name | Input Parameters | Return Values | Throws Error | Description |
---|---|---|---|---|
Suspend | PermissionDenied , NoHardwareSupport | Attempt to suspend the system. | ||
Hibernate | PermissionDenied , NoHardwareSupport | Attempt 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. |
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
Name | Input Parameters | Return Values | Throws Error | Description |
---|---|---|---|---|
GetBrightness | uint percentage_brightness | NoHardwareSupport | Returns the current backlight brightness as a percentage. | |
SetBrightness | uint 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
Name | Return Values | Description |
---|---|---|
BrightnessChanged | uint percentage_brightness | Signals the value of the current brightness has changed. |