GNOME Power Manager 2.15.3 Documentation

Richard Hughes


            
          

Version 2.15.3


Table of Contents

1. DBUS Interface
Introduction
Compatibility
Methods
Suspend
Hibernate
Shutdown
Reboot
AllowedSuspend
AllowedHibernate
AllowedShutdown
AllowedReboot
SetDpmsMode
GetDpmsMode
Inhibit
UnInhibit
GetOnAc
Signals
DpmsModeChanged
OnAcChanged
2. Icon naming scheme
Icon indexes
Icon Names

Chapter 1. DBUS Interface

This API is currently unstable and is likely to change in the future.

Introduction

Power Manager exposes a DBUS API for programs to obtain information about the DPMS state and to change it if required.

The following constants are used to uniquely refer to the PowerManager object when making DBUS method calls:

DBUS Service:org.gnome.PowerManager
DBUS Object Path:/org/gnome/PowerManager
DBUS Interface:org.gnome.PowerManager

Compatibility

Since gnome-power-manager version 2.14.x the API has changed in the following way:

2.14.x method name2.15.x method name
CanSuspendAllowedSuspend
CanHibernateAllowedHibernate
InhibitInactiveSleepInhibit
AllowInactiveSleepUnInhibit
getOnAcGetOnAc
getDpmsModeGetDpmsMode
setDpmsModeSetDpmsMode
(none)Reboot
(none)AllowedShutdown
(none)AllowedReboot

Methods

These are the DBUS methods.

Suspend

This call will attempt to suspend the system.

DirectionTypeDescription
outbooleanSuccess value

Hibernate

This call will attempt to hibernate the system.

DirectionTypeDescription
outbooleanSuccess value

Shutdown

This call will attempt to shutdown the system.

DirectionTypeDescription
outbooleanSuccess value

Reboot

This call will attempt to reboot the system.

DirectionTypeDescription
outbooleanSuccess value

AllowedSuspend

If the current user in the session is able to suspend, and has permission to do so. This may fail if the admin has locked down the session.

DirectionTypeDescription
outbooleanIf we are able to suspend

AllowedHibernate

If the current user in the session is able to hibernate, and has permission to do so. This may fail if the admin has locked down the session.

DirectionTypeDescription
outbooleanIf we are able to hibernate

AllowedShutdown

If the current user in the session is able to shutdown, and has permission to do so. This may fail if the admin has locked down the session.

DirectionTypeDescription
outbooleanIf we are able to shutdown

AllowedReboot

If the current user in the session is able to reboot, and has permission to do so. This may fail if the admin has locked down the session.

DirectionTypeDescription
outbooleanIf we are able to reboot

SetDpmsMode

DPMS is a standard from the VESA consortium for managing the power supply of monitors. This call requests a change in the state of DPMS for the current screen.

DirectionTypeDescription
instring 
 on100% power usage
 standby<80% power usage
 suspend<30W power usage
 off<8W power usage

GetDpmsMode

Returns the DPMS mode state.

DirectionTypeDescription
outstring 
 on100% power usage
 standby<80% power usage
 suspend<30W power usage
 off<8W power usage

Inhibit

Inhibits the computer from performing the idle sleep action. Useful if you want to do an operation of long duration without the computer suspending.

DirectionTypeDescription
instringthe application name, e.g. "nautilus"
instringthe localised reason to inhibit, e.g. "indexing files"
outintegerthe cookie

A cookie is a random UINT32 used to identify the inhibit.

UnInhibit

Allows the computer to perform the idle sleep action. Applications that quit without calling this method will be automatically unregistered, but this is not recommended as the user may be warned.

DirectionTypeDescription
inintegerthe cookie

GetOnAc

Finds out if the computer is on AC power, i.e. is not running on primary battery or UPS power.

DirectionTypeDescription
outbooleanIf we are on AC power

Signals

These are the DBUS signals.

DpmsModeChanged

Signals the value of the current DPMS state.

DirectionTypeDescription
outstring 
 on100% power usage
 standby<80% power usage
 suspend<30W power usage
 off<8W power usage

OnAcChanged

Signals the new AC power state.

DirectionTypeDescription
outboolThe new AC power state

Chapter 2. Icon naming scheme

Table of Contents

Icon indexes
Icon Names

Icons need to be present in tango style and in 16x16, 22x22, and svg versions.

Icon indexes

Indexes are ranges specified by the specification. A percentage scale is divided into 6 index groups:

IndexRange
0000% - 10%
02011% - 30%
04031% - 50%
06051% - 70%
08071% - 90%
10091% - 100%

A wireless device scale is divided into 4 csr groups:

IndexRange
000CSR0,CSR1
030CSR2,CSR3
060CSR4,CSR5
100CSR6,CSR7

Icon Names

These are the icon names.

NameDescription
gpm-ac-adapterAC adapter icon
gpm-primary-{index}Laptop battery icon
gpm-primary-{index}-chargingLaptop battery icon, on AC power
gpm-primary-chargedLaptop battery icon 100% fill, on AC power
gpm-primary-missingLaptop battery missing or state invalid
gpm-ups-{index}UPS battery icon
gpm-ups-{index}-chargingUPS battery icon, charging
gpm-ups-chargedUPS battery icon 100% fill, on AC power
gpm-ups-missingUPS battery missing or state invalid
gpm-mouse-{wireless}CSR mouse icon
gpm-keyboard-{wireless}CSR keyboard icon
gpm-hibernateHibernate icon
gpm-suspendSuspend icon
gpm-brightnessBrightness icon