Bug 204908 - Xorg XDPMS extension doesn't seen change events, which forces gnome-power-manager to poll
Summary: Xorg XDPMS extension doesn't seen change events, which forces gnome-power-man...
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-power-manager
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Adam Jackson
QA Contact:
Depends On:
Blocks: wakeup F9Target 418441
TreeView+ depends on / blocked
Reported: 2006-09-01 09:29 UTC by Arjan van de Ven
Modified: 2009-05-19 19:26 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-05-19 19:26:51 UTC
Type: ---

Attachments (Terms of Use)

Description Arjan van de Ven 2006-09-01 09:29:19 UTC
Description of problem:

gnome power manager asks the X server twice per second what the current video
mode is to find out if it changed. On a power aware system (tickless idle etc)
this is causing the system to eat more power than needed (since this breaks up
the cpu sleeps, and causes several context switches as well).

The frequency for this polling is clearly much to high, you can hardly even
change your physical mode that fast.

In addition, X sends apps an event when the mode changes, so there isn't even
really a need to poll for this!

At minimum I would like to ask the g_timeout_add delay to be increased from 500
to 5000 or so to get rid of the bigger power usage problem, but ideally the
entire polling should go away.

Comment 1 Richard Hughes 2006-09-01 13:25:37 UTC
> ...but ideally the entire polling should go away.

Ohh I agree completely. 

>In addition, X sends apps an event when the mode changes

It does? That part of the code was written by Jon McCann (cc'ing) so I'm not
aware of all the funnies.


Comment 2 jmccann 2006-09-01 13:54:55 UTC
To make the polling go away we need to fix the DPMS extension to send events on
changes.  Until then we need it.

The requirements for most user visible effects is a response time of under two
seconds.  We'd need to carefully look at this.  Please file this bug upstream
with xorg and gnome-power-manager.  Thanks.

Comment 3 jmccann 2006-09-01 13:56:39 UTC
Also, please point to code or docs where X sends an event on DPMS changes.  Even
Keith Packard wasn't aware of this when I asked him at GUADEC.  Thanks.

Comment 4 Matthias Clasen 2006-09-01 17:01:05 UTC
Unfortunately, XDPMS seems event-less:

#define DPMSNumberEvents	0

Comment 5 Need Real Name 2006-09-01 17:20:28 UTC
So fix the X screen saver extension to send DPMS related events like it does for
other screen saver events. Patches gratefully accepted; X.org 7.2 closes in two

Comment 6 Richard Hughes 2006-09-02 14:24:41 UTC
This is beyond my skills I'm afraid. Could someone with higher code-fu hack
x.org a little? Thanks.

Comment 7 Matthias Clasen 2006-09-03 01:08:29 UTC
I can try to talk ajax into it...

Comment 8 jmccann 2006-09-05 17:56:41 UTC
It would be nice to make the DPMS extension send events on its own without
having to rely on and add more confusion to the screensaver extension.

Comment 9 Adam Jackson 2006-10-31 00:05:28 UTC
Yeah, it's just a DPMS protocol bump, no need to add junk to screensaver. 
Working on it.

Comment 10 Richard Hughes 2006-11-17 00:34:12 UTC
Any news on this guys? Anything I can do to help?

Comment 11 Ray Strode [halfline] 2007-05-12 23:50:29 UTC
Any news, Adam? If this is making g-p-m use more battery than it saves we should
try to get this fixed sooner rather than later.

Comment 12 Richard Hughes 2007-05-14 08:34:01 UTC
I'm getting some bad publicity here: http://www.linuxpowertop.org/known.php#xorg

Not cool.

Ajax, have you got any ideas on how to do this - shall I talk to upstream about
if this is a good idea or just send a patch? If any of you guys have any
test-patches - can you make sure you attach them here. Thanks.

Comment 13 Matthias Clasen 2007-07-25 01:51:24 UTC
I believe the solution for this is going to arrive in the form of xrandr
obsoleting the dpms extension. xrandr seems to become the new Über-extension.

Comment 14 Bug Zapper 2008-04-03 18:06:19 UTC
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

Comment 15 Bug Zapper 2008-05-07 00:48:03 UTC
This bug has been in NEEDINFO for more than 30 days since feedback was
first requested. As a result we are closing it.

If you can reproduce this bug in the future against a maintained Fedora
version please feel free to reopen it against that version.

The process we're following is outlined here:

Comment 16 Bug Zapper 2008-05-14 02:19:03 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:

Comment 17 Adam Jackson 2009-05-19 19:26:51 UTC
The new IDLETIME sync counter is close enough.  We'll get per-output DPMS in RANDR someday too, which will probably get its own events.

Note You need to log in before you can comment on or make changes to this bug.