[Discuss] PowerTop & Conky, how to combine?

Arjan van de Ven arjan at linux.intel.com
Tue Nov 6 22:33:17 PST 2007


Carlos R. Mafra wrote:
> BasaBuru wrote:
>> El Tuesday 06 November 2007 16:58:46 Arjan van de Ven escribió:
>>
>>> many desktop environments, including gnome, kde and xfce, have their
>>> own power meter / battery monitor tool.... I would expect that you
>>> already have one of these in your system..
>> I'm finding for one app what show the power usage, like powertop "Power usage 
>> (5 minute ACPI estimate) : 21.3 W (1.9 hours left)"
>>
>> I'm look for in Debian and Net........ i can't find one.
> 
> I had this problem also, and I didn't want to use kde or gnome. So I modified
> the wmlaptop app to show the power usage of my laptop (also CPU temperature, 
> CPU frequency, cpuload, battery % etc).
> 
> First I had to modify wmlaptop to use the ondemand cpu governor, and then I
> copied the relevant powertop source code regarding the power usage into
> wmlaptop.
> 
> You can check how wmlaptop looks with my modifications here:
> 
> While battery is charging the power usage is 'green':
> http://www.ift.unesp.br/users/crmafra/wmlaptop_ondemand1.png
> 
> The power usage is written in red when battery is discharging:
> http://www.ift.unesp.br/users/crmafra/wmlaptop_ondemand2.png
> 
> You can download this modified wmlaptop (version 1.5) there too.
> 
> Note that my modified wmlaptop generates a few wakeups, because
> it polls the cpu frequency and all that. 
> 
> I really would like to know if there is a kernel mechanism which  
> would notify some application whether the cpu frequency changed.
> I tried to use dnotify to check the scaling_cur_freq file in /sys,
> but that didn't work (and I think that doesn't make sense :-))

the problem is that the frequency can (and will) change thousands of 
times per second.. the overhead of notifying userspace for that is ... 
immense.



More information about the Power mailing list