SavingTheWorld
5538
Comment:
|
9121
|
Deletions are marked like this. | Additions are marked like this. |
Line 7: | Line 7: |
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. | 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. |
Line 17: | Line 17: |
$ bzr branch http://package-import.ubuntu.com/x/xproject/jaunty localfix | `$ bzr branch http://package-import.ubuntu.com/x/xproject/jaunty localfix` |
Line 19: | Line 19: |
$ rgrep timeout_add * | `$ rgrep timeout_add *` |
Line 21: | Line 21: |
$ bzr commit -m "Saving the world" $ dch -i $ debuild |
`$ bzr commit -m "Saving the world"`<<BR>> `$ dch -i`<<BR>> `# aptitude build-dep xproject`<<BR>> `$ debuild` |
Line 26: | Line 27: |
$ bzr diff -r ancestor: | `$ bzr diff -r ancestor:` |
Line 31: | Line 32: |
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. | [1] Note that [[http://bugzilla.gnome.org/show_bug.cgi?id=547119|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. |
Line 34: | Line 39: |
||<rowbgcolor="#FFEBBB"> '''Package''' || '''Assignee''' || '''Upstream Bug''' || ||<rowbgcolor=yellow>foo (example)|| Andrewsomething || [[http://bugzilla.gnome.org/|GNOME Bug XXXXXX]] || |
||<rowbgcolor="#ccc"> '''Package''' || '''Assignee''' || '''Upstream Bug''' || ||<rowbgcolor="#ff9">foo (example)|| Andrewsomething || [[http://bugzilla.gnome.org/|GNOME Bug XXXXXX]] || ||'''a'''tomix || || || ||avahi || || || ||'''b'''acula || || || ||<rowbgcolor="#9f9">brasero || || [[http://bugzilla.gnome.org/564397|GNOME Bugzilla #564397]] || ||'''c'''onsolekit || || || ||<rowbgcolor="#9f9">'''d'''bus-python || [[https://launchpad.net/~khaeru|Paul Kishimoto]] || All test/example code || ||deskbar-applet || || || ||<rowbgcolor="#9f9">dia || [[https://launchpad.net/~arunanbala|Arunan Bala]] || [[http://bugzilla.gnome.org/show_bug.cgi?id=573921|GNOME Bugzilla #573921]] || ||'''e'''kiga || || || ||<rowbgcolor="#ff9">evolution || [[https://launchpad.net/~marcelstimberg|Marcel Stimberg]] || [[http://bugzilla.gnome.org/573830|GNOME Bugzilla #573830]] || ||evolution-exchange || || || ||'''g'''amin || || || ||gcompris || || || ||<rowbgcolor="#9f9">gconf || [[https://launchpad.net/~khaeru|Paul Kishimoto]] || [[http://bugzilla.gnome.org/show_bug.cgi?id=565312|GNOME Bugzilla #565312]] || ||gdm || || || ||<rowbgcolor="#9f9">gedit || [[https://launchpad.net/~khaeru|Paul Kishimoto]] || [[http://bugzilla.gnome.org/show_bug.cgi?id=565127|GNOME Bugzilla #565127]] || ||gegl || || || ||<rowbgcolor="#ff9">gftp || [[https://launchpad.net/~arunanbala|Arunan Bala]] || [[http://bugzilla.gnome.org/show_bug.cgi?id=573727|GNOME Bugzilla #573727]] || ||gimp || || || ||gksu || || || ||<rowbgcolor="#9f9">gnome-applets || BryanQuigley || [[http://bugzilla.gnome.org/show_bug.cgi?id=573604|GNOME Bugzilla #573604]] || ||<rowbgcolor="#ff9">gnome-games || ||[[http://bugzilla.gnome.org/show_bug.cgi?id=564202|GNOME Bugzilla #564202]] || ||<rowbgcolor="#ff9">gnome-mount || [[https://launchpad.net/~arunanbala|Arunan Bala]] || [[http://bugzilla.gnome.org/show_bug.cgi?id=577812|GNOME Bugzilla #577812]] || ||gnome-netstatus || || || ||gnome-pilot || || || ||<rowbgcolor="#9f9"> gnome-power-manager || [[https://launchpad.net/~khaeru|Paul Kishimoto]] || [[http://bugzilla.gnome.org/show_bug.cgi?id=565076|GNOME Bugzilla #565076]] || ||gnome-screensaver || || || ||gnome-system-monitor || || || ||gnome-system-tools || || || ||gnome-utils || || || ||gnumeric || || || ||gstreamer || || || ||gthumb || || || ||<rowbgcolor="#9f9">gtksourceview || [[https://launchpad.net/~arunanbala|Arunan Bala]] || Reviewed, only use is in debug code (Gnome SVN trunk 24/2/09) || ||<rowbgcolor="#9f9">gvfs || Awalton || [[http://bugzilla.gnome.org/show_bug.cgi?id=564052|GNOME Bugzilla #564052]] || ||'''h'''al || || || ||'''i'''rssi || SteveLangasek || || ||'''j'''ockey || || || ||'''l'''dm || || || ||libbonoboui || || || ||libbtctl || || || ||libgnomecups || || || ||libgnomeprintui || || || ||libgnomeui || || || ||libgtkhtml || || || ||libhildonfm || || || ||<rowbgcolor="#9f9">liferea || [[https://launchpad.net/~arunanbala|Arunan Bala]] || Already fixed upstream, all timeouts over 1s using g_timeout_add_seconds in SVN trunk [[http://liferea.svn.sourceforge.net/viewvc/liferea?view=rev&revision=4342|Fixes for noted instances]] || ||<rowbgcolor="#9f9">'''m'''etacity || BryanQuigley || [[http://bugzilla.gnome.org/show_bug.cgi?id=573718|GNOME Bugzilla #564073]] - Closed, Unneeded - Look at bug for more || |
Line 37: | Line 90: |
||metacity || || || ||libgnomecups || || || ||gnome-power-manager || || || |
||'''n'''autilus || AWalton || should not be needed , [[http://bugzilla.gnome.org/show_bug.cgi?id=574033|GNOME Bugzilla #574033]] || ||nautilus-cd-burner || || || ||<rowbgcolor="#ff9">nautilus-sendto || [[https://launchpad.net/~arunanbala|Arunan Bala]] || [[http://bugzilla.gnome.org/show_bug.cgi?id=578030|GNOME Bugzilla #578030]] || ||network-manager || || || ||<rowbgcolor="#ff9">network-manager-applet || BryanQuigley ||[[http://bugzilla.gnome.org/show_bug.cgi?id=573604|GNOME Bugzilla #573604]] || ||nvidia-setting || || || ||'''o'''em-config || || || |
Line 41: | Line 98: |
||'''p'''an || || || ||pbbuttonsd || || || ||<rowbgcolor="#9f9">pidgin || [[https://launchpad.net/~arunanbala|Arunan Bala]] || [[http://developer.pidgin.im/ticket/8831|finch #8831]] [[http://developer.pidgin.im/ticket/8834|pidgin #8834]] [[http://developer.pidgin.im/ticket/8875|libpurple #8875]] || ||pigment-python || || || ||policykit || [[https://launchpad.net/~arunanbala|Arunan Bala]] || Patch sent to f.d.o development mailing list, mail currently pending approval || ||policykit-gnome || || || ||<rowbgcolor="#ff9">'''s'''abayon || || [[http://bugzilla.gnome.org/564405|GNOME Bugzilla #564405]] || ||screem || || || ||screen-resolution-extra || || || ||<rowbgcolor="#9f9">seahorse || || [[http://bugzilla.gnome.org/564403|GNOME Bugzilla #564403]] || ||system-config-cluster || || || ||system-config-printer || || || ||'''t'''hin-client-manager || || || ||<rowbgcolor="#9f9">totem || Philip Withnall || [[http://bugzilla.gnome.org/564073|GNOME Bugzilla #564073]] || ||<rowbgcolor="#9f9">tracker || [[https://launchpad.net/~marcelstimberg|Marcel Stimberg]] || [[http://bugzilla.gnome.org/573834|GNOME Bugzilla #573834]] || ||<rowbgcolor="#9f9">transmission || Andrewsomething || [[http://trac.transmissionbt.com/ticket/1585|Ticket #1585]] || ||tsclient || || || ||twisted || || || ||'''u'''biquity || || || ||update-notifier || || || |
|
Line 42: | Line 119: |
||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 || || || |
||'''v'''im || || || ||<rowbgcolor="#9f9">vinagre || [[https://launchpad.net/~khaeru|Paul Kishimoto]] || all instances < 1000 ms || ||vino || || || ||'''w'''ebkit || || || ||'''x'''chat-gnome || || || |
Line 83: | Line 125: |
||nautilus || || || ||evolution-exchange || || || ||transmission || || || ||thin-client-manager || || || ||gconf || || || ||libbonoboui || || || ||seahorse || || || ||twisted || || || ||gnome-applets || || || ||gedit || || || ||bacula || || || ||vino || || || ||gftp || || || ||gcompris || || || ||libbtctl || || || ||gimp || || || ||gvfs || || || ||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 || || || |
|
Line 117: | Line 126: |
||gnome-system-tools || || || ||gnome-games || || || ||network-manager || || || ||gksu || || || ||gnome-screensaver || || || |
||'''z'''enity || || || |
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 [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.
Take one of the packages in the list above and find it in the package repository (instructions).
- Branch it:
$ bzr branch http://package-import.ubuntu.com/x/xproject/jaunty localfix
- Find the instances that might be causing the problem.
$ rgrep timeout_add *
- Commit and build a package:
$ bzr commit -m "Saving the world"
$ dch -i
# aptitude build-dep xproject
$ debuild
- Test it on your system, make sure things still work reasonably.
- Generate a patch:
$ bzr diff -r ancestor:
[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 |
|
atomix |
|
|
avahi |
|
|
bacula |
|
|
brasero |
|
|
consolekit |
|
|
dbus-python |
All test/example code |
|
deskbar-applet |
|
|
dia |
||
ekiga |
|
|
evolution |
||
evolution-exchange |
|
|
gamin |
|
|
gcompris |
|
|
gconf |
||
gdm |
|
|
gedit |
||
gegl |
|
|
gftp |
||
gimp |
|
|
gksu |
|
|
gnome-applets |
||
gnome-games |
|
|
gnome-mount |
||
gnome-netstatus |
|
|
gnome-pilot |
|
|
gnome-power-manager |
||
gnome-screensaver |
|
|
gnome-system-monitor |
|
|
gnome-system-tools |
|
|
gnome-utils |
|
|
gnumeric |
|
|
gstreamer |
|
|
gthumb |
|
|
gtksourceview |
Reviewed, only use is in debug code (Gnome SVN trunk 24/2/09) |
|
gvfs |
Awalton |
|
hal |
|
|
irssi |
|
|
jockey |
|
|
ldm |
|
|
libbonoboui |
|
|
libbtctl |
|
|
libgnomecups |
|
|
libgnomeprintui |
|
|
libgnomeui |
|
|
libgtkhtml |
|
|
libhildonfm |
|
|
liferea |
Already fixed upstream, all timeouts over 1s using g_timeout_add_seconds in SVN trunk Fixes for noted instances |
|
metacity |
GNOME Bugzilla #564073 - Closed, Unneeded - Look at bug for more |
|
midbrowser |
|
|
nautilus |
AWalton |
should not be needed , GNOME Bugzilla #574033 |
nautilus-cd-burner |
|
|
nautilus-sendto |
||
network-manager |
|
|
network-manager-applet |
||
nvidia-setting |
|
|
oem-config |
|
|
openoffice.org-l10n |
|
|
pan |
|
|
pbbuttonsd |
|
|
pidgin |
||
pigment-python |
|
|
policykit |
Patch sent to f.d.o development mailing list, mail currently pending approval |
|
policykit-gnome |
|
|
sabayon |
|
|
screem |
|
|
screen-resolution-extra |
|
|
seahorse |
|
|
system-config-cluster |
|
|
system-config-printer |
|
|
thin-client-manager |
|
|
totem |
Philip Withnall |
|
tracker |
||
transmission |
Andrewsomething |
|
tsclient |
|
|
twisted |
|
|
ubiquity |
|
|
update-notifier |
|
|
usb-creator |
|
|
vim |
|
|
vinagre |
all instances < 1000 ms |
|
vino |
|
|
webkit |
|
|
xchat-gnome |
|
|
xsane |
|
|
xscreensaver |
|
|
zenity |
|
|
SavingTheWorld (last edited 2013-05-31 17:42:34 by brian-murray)