SavingTheWorld

Revision 4 as of 2008-12-10 23:46:53

Clear message

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

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. 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.

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

  2. Branch it:
  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 $ 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!


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=yellow> in the first cell of the column. After the patch has been commited upstream, change row's background to green by adding <rowbgcolor=green> 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

midbrowser

metacity

libgnomecups

gnome-power-manager

openoffice.org-l10n

usb-creator

tsclient

sabayon

xchat-gnome

nvidia-setting

gnome-system-monitor

ldm

policykit-gnome

libgtkhtml

avahi

gstreamer

gnome-utils

hal

vim

gtksourceview

webkit

ubiquity

tracker

libhildonfm

dia

gegl

system-config-cluster

libgnomeui

dbus-python

network-manager-applet

pigment-python

system-config-printer

gnumeric

policykit

ekiga

screem

gnome-pilot

brasero

zenity

pan

gamin

pbbuttonsd

gdm

pidgin

lifera

update-notifier

xsane

nautilus

evolution-exchange

transmission

Andrewsomething

Ticket #1585

thin-client-manager

gconf

libbonoboui

seahorse

twisted

gnome-applets

gedit

bacula

vino

gftp

gcompris

libbtctl

gimp

gvfs

Awalton

bgo 564052

deskbar-applet

atomix

libgnomeprintui

jockey

screen-resolution-extra

gthumb

vinagre

totem

gnome-mount

consolekit

irssi

oem-config

gnome-netstatus

nautilus-sendto

nautilus-cd-burner

evolution

xscreensaver

gnome-system-tools

gnome-games

network-manager

gksu

gnome-screensaver