What Upower DBus Signal is Emitted when Screen is Turned On or Off

Martin Pitt martin.pitt at ubuntu.com
Tue Apr 24 03:18:06 PDT 2012


Hello Mystilleef,

Mystilleef [2012-04-24  4:22 -0400]:
> What upower dbus signal do I need to listen to when my
> laptop screen is turned on or off by gnome-screensaver or
> gnome-power-manager?

None. This is not the domain of upower, nor kernel uevents. This is
not even an XRandR event (which also sends notifications, but
different ones). I believe gnome-screensaver just uses the equivalent
of "xset dpms force off" (through a library interface).

However, I am not aware that DPMS provides notifications, and [1] and
its lack of responses do not rise my hopes.

> The solution I've found so far is to run a script that
> resets the screen after a resume operation. Placing the
> script in /etc/sleep.d does the trick.

Indeed that is the recommended approach.

> However, this doesn't work when resuming the screen alone from
> sleep.

So I take it this "sleep" is not "suspend to RAM", but you mean
"switching off the monitor on idle"?

Martin

[1] http://www.mail-archive.com/xorg@lists.freedesktop.org/msg14972.html

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


More information about the devkit-devel mailing list