maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Pybattery - battery statusbar applet with candies (https://talk.maemo.org/showthread.php?t=24905)

pton 2008-11-12 23:48

Re: Pybattery - battery statusbar applet with candies
 
I got the same battery drain problem. My N800 battery was full before I sleep, and it woke me up with empty battery warning less than 6 hour later. I recharged it, and am now seeing the same behavior. The applet always shows CPUFreq(397.46), and temperature is always around 34-35 degree celcius.

I have python-launcher installed.

tso 2008-11-13 00:25

Re: Pybattery - battery statusbar applet with candies
 
a increase in clock will result in a increased voltage, yes? even if the cpu is doing nothing?

lcuk 2008-11-13 00:41

Re: Pybattery - battery statusbar applet with candies
 
tso, im not sure, but i never disable performance on mine and barring the once in a blue moon random overnight deaths when i come back after sleep+work its still on full battery
if i take it to work and use it its just the same
the killer for my homesystem is network.

lcuk 2008-11-13 00:43

Re: Pybattery - battery statusbar applet with candies
 
pton,
try setting to performance, and uninstall it.

GeneralAntilles 2008-11-13 00:52

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by tso (Post 241527)
a increase in clock will result in a increased voltage, yes? even if the cpu is doing nothing?

The voltage is different between 166 and 400MHz at 1% CPU usage. There is no difference in voltage at 0%.

412b 2008-11-13 01:12

Re: Pybattery - battery statusbar applet with candies
 
New version.22
Update is highly recomended.

lcuk 2008-11-13 01:23

Re: Pybattery - battery statusbar applet with candies
 
could this be transposed into rm_you and jotts advanced_backlight framework?
ie take a copy of the backlight project, rip out the backlight stuff and repush it.

I'm not sure how 412b is with c, but it would remove this cpu drain issue?
412b, thank you for this project i have been asked for a desktop applet for the cpu many times.

tso 2008-11-13 01:52

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 241541)
New version.22
Update is highly recomended.

nice, looks like it fixed the problem.

but as activating the menu will just bump the cpu up to 400, and the content of the menu cant be refreshed in real-time, its content is somewhat useless...

tso 2008-11-13 01:54

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by GeneralAntilles (Post 241536)
The voltage is different between 166 and 400MHz at 1% CPU usage. There is no difference in voltage at 0%.

ok. im just trying to figure out why i sometimes see the device survive overnight, while other times shutting down based on low battery...

412b 2008-11-13 14:06

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by lcuk (Post 241546)
could this be transposed into rm_you and jotts advanced_backlight framework?
ie take a copy of the backlight project, rip out the backlight stuff and repush it.

I'm not sure how 412b is with c, but it would remove this cpu drain issue?
412b, thank you for this project i have been asked for a desktop applet for the cpu many times.

Hmmm... As I wrote in header I DO think it should be in C. But I've got some problems with SDK and no time no dive into it. It won't be hard to port it.

2ALL

There's a big bad bug. CPU works at 400MHz on my n810, when I turn the sound on... It's strange... Damn strange... Some feedback about it on other devices is needed.

412b 2008-11-13 14:15

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by tso (Post 241549)
nice, looks like it fixed the problem.

but as activating the menu will just bump the cpu up to 400, and the content of the menu cant be refreshed in real-time, its content is somewhat useless...

When the menu is popping up it's updated, so some time needed to get battery value, free RAM value, internal temperature and uptime. Real-time updating wasn't planned because of CPU usage, it can be implemented, but IMO it's quite useless. If it's really needed, it can be added in .24/.26 stables.

lm2 2008-11-13 14:44

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 241651)
B]There's a big bad bug.[/B] CPU works at 400MHz on my n810, when I turn the sound on... It's strange... Damn strange... Some feedback about it on other devices is needed.

Thanks for the heads up. I was losing 3% every five minutes at idle. But I wasn't sure how to read the info presented. But I guess "CPUFreq: 400MHz" suggests I have the same problem as you.

Is there a way to check what the CPU is at without Advanced Battery? Some cli method? I'd be curious to know what it's at with Advanced Battery disabled.

dkwatts 2008-11-13 14:48

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by lm2 (Post 241663)
Thanks for the heads up. I was losing 3% every five minutes at idle. But I wasn't sure how to read the info presented. But I guess "CPUFreq: 400MHz" suggests I have the same problem as you.

Is there a way to check what the CPU is at without Advanced Battery? Some cli method? I'd be curious to know what it's at with Advanced Battery disabled.

Just installed HomeCPUSpeed

412b 2008-11-13 14:54

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by lm2 (Post 241663)
Thanks for the heads up. I was losing 3% every five minutes at idle. But I wasn't sure how to read the info presented. But I guess "CPUFreq: 400MHz" suggests I have the same problem as you.

Is there a way to check what the CPU is at without Advanced Battery? Some cli method? I'd be curious to know what it's at with Advanced Battery disabled.

Yep. Just run
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

lm2 2008-11-13 15:00

Re: Pybattery - battery statusbar applet with candies
 
xterm gave output: 165000.

Can I assume this is less than when Advanced Battery reports 400MHz?

412b 2008-11-13 15:02

Re: Pybattery - battery statusbar applet with candies
 
Nope. Advanced Power reads its frequency from that file. If you choose (with sound off) e.g. powersave governor in AP and wait a while it gonna show 165MHz.

lm2 2008-11-13 15:05

Re: Pybattery - battery statusbar applet with candies
 
So, AP is set to "On Demand" and reads "CPUFreq: 400Mhz". But cli method outputs 165000.

I've tried it three times. Same divergent results.

lm2 2008-11-13 15:07

Re: Pybattery - battery statusbar applet with candies
 
But, you're right, if I change to powersave, both say 165000. Why is this?

lcuk 2008-11-13 15:09

Re: Pybattery - battery statusbar applet with candies
 
lm2, running ondemand will speed the cpu up to 400 as demand increases over some present %age.

running a python GUI app tiself may trigger the increase and push cpu to 400mhz for reading the value.

using the command line is typically a LOT less strain on the system so the cpu will sit idle and be on slowest speed.

powersave should show 165 all the time, on demand should be variable, perforance should show 400 all the time.

lm2 2008-11-13 15:12

Re: Pybattery - battery statusbar applet with candies
 
Thanks. Which setting does the tablet use default out of the box. I had assumed it was Ondemand, simply because qole's turbo debian gives two options: ondemand and performance.

bluechalk 2008-11-13 15:39

Re: Pybattery - battery statusbar applet with candies
 
When I try to install 0.2.22 via the application manager, I get an error: Applications packages missing: python2.5-pgame. I'm running Nokia-N810-23-14 2.6.21-omap1 #2 Tue Sep 2 10:13:14. Where can I find this?

412b 2008-11-13 15:40

Re: Pybattery - battery statusbar applet with candies
 
All I can say is F**K...
It's not an Advanced Power bug as far as I got and I got even too deep...
With AP not installed/turned off my CPU freq is 400MHz if sound is on...
If sound is off everything is ok...

I think it's to be submitted to Bugzilla as addition to bug #2602. But still feedback needed, 'cause it can be a 3rd party app issue.

412b 2008-11-13 15:41

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by bluechalk (Post 241680)
When I try to install 0.2.22 via the application manager, I get an error: Applications packages missing: python2.5-pgame. I'm running Nokia-N810-23-14 2.6.21-omap1 #2 Tue Sep 2 10:13:14. Where can I find this?

Missing letter in dependencies? No reports about it... Or it's python2.5-pygame?

bluechalk 2008-11-13 15:45

Re: Pybattery - battery statusbar applet with candies
 
Sorry, my typo. It says that pygame is missing. I can't install.

412b 2008-11-13 15:52

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by bluechalk (Post 241684)
Sorry, my typo. It says that pygame is missing. I can't install.

Mmm... Nowadays it's a dependency of python2.5-runtime.
So it should be in extras (or -devel) in your case... But I'm not sure.
I'll update the .deb in couple of minutes, with no dependency on it.

tso 2008-11-13 16:18

Re: Pybattery - battery statusbar applet with candies
 
i have sound on all the time, and i dont recall ever seeing the cpu get stuck based on that...

ah, played around a bit and see now.

with sound of and ondemand as the governor, the cpu do not clock up when screen is poked or some other sound is played.

same effect can be observed if one turn of the touchscreen sound in control panel.

i hate to say this but i find homecpuspeed more useful as it will update the speed ever so often.

as long as pybattery only grabs cpu speed on menu opening, and it makes the cpu clock up, it will nearly always report max cpu...

heavyt 2008-11-13 16:33

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by tso (Post 241695)
i have sound on all the time, and i dont recall ever seeing the cpu get stuck based on that...

Same here. The problem only develop for me with the installation of Pybattery and stop with the removal of Pybattery (N800 ver 4.200836-5).

bluechalk 2008-11-13 17:24

Re: Pybattery - battery statusbar applet with candies
 
This is a great app! I have a suggestion. Could you add "Offline Mode" under Power Managment? I find it annoying to have to press the top button to go offline.

qole 2008-11-13 18:25

Re: Pybattery - battery statusbar applet with candies
 
Is it possible to make this app load into the system tray of another window manager? There's no good Internet Tablet battery applets for any of the other available window managers. I would specifically be interested in tweaking this to run in the system tray of LXDE.

412b 2008-11-13 18:40

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by bluechalk (Post 241716)
This is a great app! I have a suggestion. Could you add "Offline Mode" under Power Managment? I find it annoying to have to press the top button to go offline.

The main target right now is to solve battery drain issue. Right after that I'll take a look at the switching to Offline Mode.

qwerty12 2008-11-13 18:44

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 241742)
The main target right now is to solve battery drain issue. Right after that I'll take a look at the switching to Offline Mode.

When you do integrate it, here's the commands to save time :) :

Normal Mode:
Code:

run-standalone.sh /usr/bin/dbus-send --system --type=signal /com/nokia/mce/signal com.nokia.mce.signal.sig_device_mode_ind string:"normal"
Flight mode:
Code:

run-standalone.sh /usr/bin/dbus-send --system --type=signal /com/nokia/mce/signal com.nokia.mce.signal.sig_device_mode_ind string:"flight"

412b 2008-11-13 18:45

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by qole (Post 241733)
Is it possible to make this app load into the system tray of another window manager? There's no good Internet Tablet battery applets for any of the other available window managers. I would specifically be interested in tweaking this to run in the system tray of LXDE.

Well, there is no big problem in that. If you look into source, there are 2 classes. DBusMonitor is the class that gets and sets all the values and informs about events, so the main limitation is using of PyGTK and Hildon-specific objects. In other words: all you need to make it work in other manager is to replace the UI related stuff. And of course you need python support.

412b 2008-11-13 18:48

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by qwerty12 (Post 241747)
When you do integrate it, here's the commands to save time :) :

Normal Mode:
Code:

run-standalone.sh /usr/bin/dbus-send --system --type=signal /com/nokia/mce/signal com.nokia.mce.signal.sig_device_mode_ind string:"normal"
Flight mode:
Code:

run-standalone.sh /usr/bin/dbus-send --system --type=signal /com/nokia/mce/signal com.nokia.mce.signal.sig_device_mode_ind string:"flight"

Thanks. In fact all I needed is "/com/nokia/mce/signal" and "com.nokia.mce.signal.sig_device_mode_ind string" ;)

lcuk 2008-11-13 18:52

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 241742)
The main target right now is to solve battery drain issue. Right after that I'll take a look at the switching to Offline Mode.

412b, take your time :)
you may be bombarded with requests but thats because everybody sees great value in what you have started.

qole 2008-11-13 19:09

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 241748)
Well, there is no big problem in that. If you look into source, there are 2 classes. DBusMonitor is the class that gets and sets all the values and informs about events, so the main limitation is using of PyGTK and Hildon-specific objects. In other words: all you need to make it work in other manager is to replace the UI related stuff. And of course you need python support.

Well, you can use hildon UI stuff in alternate desktops, but you need to be able to start up the applet independently of Hildon-Desktop and the icon needs to show up in the systray... I'll see if I can start this applet up without Hildon Desktop running...

GeneralAntilles 2008-11-13 21:02

Re: Pybattery - battery statusbar applet with candies
 
OK, now that I have a little more time to go over this in detail. . . .

The UI needs some TLC. The presentation as it stands is a little stark and cluttered. Certain information should disappear (Version), other information needs to be adjusted ("pretty print" for the cpufreq settings—Apple calls this "Processor Performance" perhaps just "Mode" will do) , and some additional information might be added (voltage, mAh, anything else useful you can get out of retu).

I have some ideas floating around in my head if you'd like to see some mockups. ;)

Quote:

Originally Posted by lcuk (Post 241753)
you may be bombarded with requests but thats because everybody sees great value in what you have started.

Yes, definitely. Be worried when you don't get any response, not when you get a lot of them. ;)

pton 2008-11-14 02:19

Re: Pybattery - battery statusbar applet with candies
 
Hi, version 0.22 seems to have fixed my battery drain problem. I am not seeing any difference compared to before installation :) Thank you, 412b ;)

albright 2008-11-14 03:37

Re: Pybattery - battery statusbar applet with candies
 
I can second that - v.22 is working perfectly wrt battery
drain.

tso 2008-11-14 04:20

Re: Pybattery - battery statusbar applet with candies
 
either i was not paying attention, or pybattery dont know how to warn about anything but imminent shotdown from lack of battery.

im used to having small warning sounds from the tablet when the battery slips into something like 25% or lower.

but today all i got was the sound for when the battery is close to 0% (the menu showed 0,3%), and the icon was red.

btw, i found a interesting message when i hooked the tablet up to a usb charging cable the other day, "device not usb cable compatible" or something like that.

412b 2008-11-14 12:28

Re: Pybattery - battery statusbar applet with candies
 
2 ALL
If you experiencing problems with enabled sound (CPU frequency is constantly max, 400MHz for me), just disable screen tapping sound. I'm still digging it, so reenabling can be possible, if the solution will be found...



Quote:

Originally Posted by tso (Post 241897)
either i was not paying attention, or pybattery dont know how to warn about anything but imminent shotdown from lack of battery.

im used to having small warning sounds from the tablet when the battery slips into something like 25% or lower.

but today all i got was the sound for when the battery is close to 0% (the menu showed 0,3%), and the icon was red.

It warns you... It's just you the one not paying attention to it ;)
When battery level is less, then 12,5% the icon is partly red and notification sound is played.
When battery level is less, then 5% the icon is totaly red, notification sound is played and information banner is shown.
I can not add there an orchestra, or Big Ben, or a canon :)

Quote:

Originally Posted by tso (Post 241897)
btw, i found a interesting message when i hooked the tablet up to a usb charging cable the other day, "device not usb cable compatible" or something like that.

Not mine :)
Ask the Nokia's guys :)


All times are GMT. The time now is 10:40.

vBulletin® Version 3.8.8