reducing power usage of Fedora - how you can help!

Colin Walters walters at
Fri Aug 10 19:24:04 UTC 2007

On Sat, 2007-08-11 at 00:43 +0530, Debarshi 'Rishi' Ray wrote:
> >>
> >>
> >> I had Firefox and XChat-GNOME running.
> > What particular python process was that?

All pygtk2 programs in Fedora right now have a 10Hz loop:

  /* This code (pygtk main watch) was copied with minor changes from
   * pygobject/gobject/pygmainloop.c */
static gboolean
pygtk_main_watch_prepare(GSource *source,
                         int     *timeout)
    /* Python only invokes signal handlers from the main thread,
     * so if a thread other than the main thread receives the signal
     * from the kernel, PyErr_CheckSignals() from that thread will
     * do nothing. So, we need to time out and check for signals
     * regularily too.
     * Also, on Windows g_poll() won't be interrupted by a signal
     * (AFAIK), so we need the timeout there too.
#ifndef PLATFORM_WIN32
    if (pyg_threads_enabled)
        *timeout = 100;

    return FALSE;

This wasn't updated from the corresponding gobject mainloop change which
dropped it to 1Hz.

Of course, ideally someone figures out how to kill this loop entirely.
A relevant bug is:

More information about the fedora-devel-list mailing list