Re: GNOME Battstat applet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2003-11-12 at 06:34, Robert Brimhall wrote:
> Is there anyway to keep the battstat applet from polling battery info
> every second? Seems like every 30 seconds or so would do it and would
> greatly increase battery life IMO. It's also using 5-11% of the cpu each
> time it checks.

There are some patches that have been submitted upstream
(http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=104292), and if you
search the archives of fedora-test-list you'll find some discussion:

-----Forwarded Message----- 
> From: Shawn Houston <mhouston@xxxxxxx>
> To: fedora-test-list@xxxxxxxxxx
> Subject: Re: battery app using much cpu
> Date: Sat, 11 Oct 2003 21:04:43 -0800
> 
> Downloaded and installed. This package definately uses less cpu, but I
> am getting periodic mouse (touchpad) freezes when using it. I am using
> the following script until a working battery applet is found:
> 
> #!/bin/sh
>  
> CAPACITY=`grep 'design capacity:' /proc/acpi/battery/BAT0/info|awk '{
> print $3 }'`
> STATE=`grep 'remaining capacity:' /proc/acpi/battery/BAT0/state|awk '{
> print $3 }'`
> AC_ADAPTER=`awk '{ print $2 }' /proc/acpi/ac_adapter/AC/state`
>  
> CHARGE=$(( ( $STATE * 100 ) / $CAPACITY ))
> if [ $AC_ADAPTER = "on-line" ]; then
>         echo "Plugged in"
>         echo "Current charge: $CHARGE %"
> else
>         RATE=`grep 'present rate:' /proc/acpi/battery/BAT0/state|awk '{
> print $3 }'`
>         echo "Running on battery"
>         TIME_LEFT_H=$(( $STATE / $RATE ))
>         if [ $STATE -gt $RATE ]; then
>                 TIME_LEFT_M=$(( ( ( $STATE - $RATE ) * 100 ) / $RATE ))
>         else
>                 TIME_LEFT_M=$(( ( $STATE * 100 ) / $RATE ))
>         fi
>         TIME_LEFT_M=$(( ( $TIME_LEFT_M * 60 ) / 100 ))
>         echo "Battery charge remaining: $CHARGE %"
>         echo "Time left to run: $TIME_LEFT_H hours $TIME_LEFT_M minutes"
> fi
>  
> Some of the lines got wrapped by evolution, and the time left to run
> output is a work of fiction...probably needs an 80% multipier.
> 
> -Shawn
> 
> On Sat, 2003-10-11 at 09:15, Joel Young wrote:
> > Patched gnome-applets at:
> > 
> > http://www.translingual.com:8080/~jdy/RPMS/
> > 
> > patched according to:
> > 
> > http://www.its.caltech.edu/~dmoore/battstat/
> > 
> > bugzilla entry:
> > 
> > http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=104292
> > 
> > Joel
> > 
> > 
> > --
> > fedora-test-list mailing list
> > fedora-test-list@xxxxxxxxxx
> > http://www.redhat.com/mailman/listinfo/fedora-test-list




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux