Events for power management sleep and resume

David Eriksson twogood at users.sourceforge.net
Sat May 28 15:34:54 PDT 2005


Hi,

For one of my projects I think it might be beneficial to get a
notification when the computer goes into sleep/suspend/hibernation, and
another notification when it later resumes from that state.

As I use both D-BUS and HAL already, I thought that maybe D-BUS signals
for these events would be nice. However, as the signals are asynchronous
a "sleep" signal might not be delivered until after resuming!

The actual details are somewhat distro-specific I think, but both for
APM and ACPI a script can be executed on these events. This script could
make D-BUS method calls that waited for a reply, before allowing the
computer to sleep.

Maybe my none-use of signals would be a suitable pattern for this? (I
have planned to elaborate on why I did like that, but I haven't, yet...)

  http://lists.freedesktop.org/archives/dbus/2005-May/002671.html

Any ideas or comments?

-- 
Regards,
               -\- David Eriksson -/-

        SynCE - http://synce.sourceforge.net
      ScummVM - http://scummvm.sourceforge.net
     Desquirr - http://desquirr.sourceforge.net



More information about the dbus mailing list