[Psi-Devel] Psi and power consumption
dion at inhex.net
Fri Sep 5 11:22:49 PDT 2008
On Fri, Sep 05, 2008 at 02:00:08AM +0400, Michail Pishchagin wrote:
>> Hi. Currently I'm trying to find, why Psi cause CPU to wake up so much
>> times. It takes second place in powertop "rating". (After Xorg) with
> One reason is auto-status-idle checks that happen every second. This is a
> bad thing (probably).
Currently I will share found problems. Maybe devs have some ideas how to
workaround/fix them correctly.
All founded issues are caused by using timers with too small interval.
Described below timers are started during psi startup and never stopped.
Maybe devs have some ideas how to workaround/fix them.
1. Autostatus timer, as noticed by Michail.
Interval=1000. As for me it's not so important to have so big precision
here. IMHO something around 10-30 seconds should be enough. I've set it to
2. FileTuneController timer.
Interval=3000. There is no way to disable it at startup time. It should
be possible to build psi without USE_PEP however I haven't found a way to
do this. Later tools/tunecontroller/plugins/psifile/psifilecontroller.cpp
change timer interval to 10000 msec. Since I don't use PEP, just disabling
this timer is easiest solution.
3. Some animation timer at contactview.cpp.
Interval=600. As far as I understand from code, this is blinking
notification about contact status changes. Generally this timer should be
turned off when there are no nicks to blink. I will try to fix it too. For
now I've just commented start() of this timer
4. Icon animation timer at tools/iconset/anim.cpp
Interval=100. This is the most problematic part IMHO. It's cause of 10
wakeups per second. Disabling this timer causes disappearing of animation
during initial connection to jabber server.
5. MetAlertIcon timer
Interval=600. This is about "Animation" option in configuration. Since
I don't use this animation at all, it was safe to just disable startup of
After disabling all of these timers disconnected PSI never wakeup CPU from
Here is patch that reduce power consumption to almost zero :)
There is still one background timer exists (autostatus one), but it's
wakeup interval is 5 minutes.
Yes, patch is ugly, but maybe it will be useful for laptop users, that
prefers longer battery life instead of some fancy UI effects :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: Digital signature
More information about the Psi-Devel