SavingTheWorld

Differences between revisions 64 and 65
Revision 64 as of 2009-05-03 18:54:17
Size: 9617
Editor: cm154118
Comment:
Revision 65 as of 2009-05-03 20:00:05
Size: 9969
Editor: cm154118
Comment: Add link to Gnome Upstream page
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

(Please, for gnome-relateed packages use this upstream page: [[http://live.gnome.org/GnomeGoals/UseTimeoutAddSeconds|http://live.gnome.org/GnomeGoals/UseTimeoutAddSeconds]])
Line 14: Line 16:
(Please, for gnome-relateed packages use this upstream page: [[http://live.gnome.org/GnomeGoals/UseTimeoutAddSeconds|http://live.gnome.org/GnomeGoals/UseTimeoutAddSeconds]])

From http://gould.cx/ted/blog/Saving_the_world_one__w_at_a_time

(Please, for gnome-relateed packages use this upstream page: http://live.gnome.org/GnomeGoals/UseTimeoutAddSeconds)

Saving the world one uW at a time

I'm here at UDS and joined a session between the kernel and desktop teams talking about power. Like all of such sessions the kernel team thinks that the desktop should fix all the problems and vice versa. At their suggestion, I took an action item.

One of the features of GTK+ is that it provides two timeout functions: gtk_timeout_add and gtk_timeout_add_seconds [1]. The difference is much more important than not having to add a "* 1000" in one and not the other. The important thing that the second function does is that it tried to group wake-ups to ensure that the program wakes up as little as possible. This is never perfect, but it's a small thing that can help to save some power and reduce the number of wake-ups.

So I looked through the Ubuntu main archive to figure out how many applications use the more precise function, but just pass in several seconds as the parameter. I figured this would be a few apps, and I'd submit a couple patches, then I could go back to blaming the kernel team for all our problems. There are more than a couple packages. There are a lot of packages. The results of the grep and a cleaned up list of packages that are likely to have easy fixes.

I realize now that I can't do this by myself, the only hope is to document how to fix it.

So if you'd like to help save a little power on your machine, follow these instructions. (Please, for gnome-relateed packages use this upstream page: http://live.gnome.org/GnomeGoals/UseTimeoutAddSeconds)

  1. Take one of the packages in the list above and find it in the package repository (instructions).

  2. Branch it:
    • $ bzr branch http://package-import.ubuntu.com/x/xproject/jaunty localfix

  3. Find the instances that might be causing the problem.
    • $ rgrep timeout_add *

  4. Commit and build a package:
    • $ bzr commit -m "Saving the world"
      $ dch -i
      # aptitude build-dep xproject
      $ debuild

  5. Test it on your system, make sure things still work reasonably.
  6. Generate a patch:
    • $ bzr diff -r ancestor:

  7. Submit it upstream!


[1] Note that PyGObject has timeout_add_seconds() but it was not documented.


Add your name to the Assignee column if you wish to tackle that package. After you have submitted the patch upstream, change row's background to yellow by adding <rowbgcolor="#ff9"> in the first cell of the column. After the patch has been commited upstream, change row's background to green by adding <rowbgcolor="#9f9"> in the first cell of the column. This will let people know that the package in that row has been hugged.

Package

Assignee

Upstream Bug

foo (example)

Andrewsomething

GNOME Bug XXXXXX

atomix

avahi

bacula

brasero

Debarshi Ray

GNOME Bugzilla #564397

consolekit

dbus-python

Paul Kishimoto

All test/example code

deskbar-applet

JavierJardon

Gnome Bugzilla #581207

dia

Arunan Bala

GNOME Bugzilla #573921

ekiga

False alarm.

evolution

Marcel Stimberg

GNOME Bugzilla #573830

evolution-exchange

gamin

gcompris

gconf

Paul Kishimoto

GNOME Bugzilla #565312

gdm

gedit

Paul Kishimoto

GNOME Bugzilla #565127

gegl

gftp

Arunan Bala

GNOME Bugzilla #573727

gimp

gksu

gnome-applets

BryanQuigley

GNOME Bugzilla #573604

gnome-games

GNOME Bugzilla #564202

gnome-mount

Arunan Bala

GNOME Bugzilla #577812

gnome-netstatus

gnome-pilot

gnome-power-manager

Paul Kishimoto

GNOME Bugzilla #565076

gnome-screensaver

gnome-system-monitor

Debarshi Ray

GNOME Bugzilla #581099

gnome-system-tools

gnome-utils

gnumeric

gstreamer

gthumb

gtksourceview

Arunan Bala

Reviewed, only use is in debug code (Gnome SVN trunk 24/2/09)

gvfs

Awalton

GNOME Bugzilla #564052

hal

irssi

SteveLangasek

jockey

ldm

libbonoboui

libbtctl

libgnomecups

libgnomeprintui

libgnomeui

libgtkhtml

libhildonfm

liferea

Arunan Bala

Already fixed upstream, all timeouts over 1s using g_timeout_add_seconds in SVN trunk Fixes for noted instances

metacity

BryanQuigley

GNOME Bugzilla #564073 - Closed, Unneeded - Look at bug for more

midbrowser

nautilus

NelsonBenitez

Fixed, GNOME Bugzilla #574033

nautilus-cd-burner

nautilus-sendto

Arunan Bala

GNOME Bugzilla #578030

network-manager

network-manager-applet

JavierJardon

GNOME Bugzilla #580693

nvidia-setting

oem-config

openoffice.org-l10n

pan

pbbuttonsd

pidgin

Arunan Bala

finch #8831 pidgin #8834 libpurple #8875

pigment-python

policykit

Arunan Bala

Patch sent to f.d.o development mailing list, mail currently pending approval

policykit-gnome

sabayon

Debarshi Ray

GNOME Bugzilla #564405

screem

screen-resolution-extra

seahorse

Debarshi Ray

GNOME Bugzilla #564403

system-config-cluster

system-config-printer

thin-client-manager

totem

Philip Withnall

GNOME Bugzilla #564073

tracker

Marcel Stimberg

GNOME Bugzilla #573834

transmission

Andrewsomething

Ticket #1585

tsclient

twisted

ubiquity

update-notifier

usb-creator

vim

vinagre

Paul Kishimoto

all instances < 1000 ms

vino

JavierJardon

GNOME Bugzilla #581204

webkit

xchat-gnome

JavierJardon

GNOME Bugzilla #581094

xsane

xscreensaver

zenity

SavingTheWorld (last edited 2013-05-31 17:42:34 by brian-murray)