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)

jkq 2009-10-31 18:37

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by JustNick (Post 357611)
It seems that the application stopped detecting swap&swap use with latest update...

Same here. It keeps saying "Swap is disabled", even though I have swap enabled (but not the 'standard' swap, I'm using ramzez).

I'm running ap 0.4.0-8 and apm 0.5.0-5. After installing both but before rebooting, it was showing swap properly (but the idle time was way off - ~600 days!). I reinstalled ap 0.3.6 (leaving apm 0.5.0 installed) and rebooted, but swap still shows as disabled. If I then reinstall apm 0.4.1 (without rebooting), swap is detected again.

Hope that helps.

-jkq

412b 2009-12-17 11:55

New versions in extras-devel
 
Updated AP (0.4.1), APM (0.5.1), translations (0.3.2), added source packages for AP and APM.
For smooth upgrading purging and cleaning up previous installs required (GConf, generally).
As usual feedback is highly appreciated.

Fionn 2009-12-18 14:07

Re: New versions in extras-devel
 
Quote:

Originally Posted by 412b (Post 431737)
As usual feedback is highly appreciated.

I removed my previous version using Application Manager.
I then deleted the advanced-power directory under /etc/osso-af-init/gconf-dir/apps/.
I installed the latest version from Application Manager after enabling maemo extras devel.

Again I got the rescuing software update message that I reported in my last install which may mean nothing much but is a bit alarming.

Other than that the install completed fine.

My main use of the application is to turn on flight mode and lock the keys and screen.
Would it be possible to add an option to do both of those together so that under "Device Mode" there would be options to:
  • Lock screen and keys
  • Flight mode
  • Reboot
  • Shutdown
  • Flight Mode + Lock Screen
or something similar?

412b 2009-12-18 16:48

Re: New versions in extras-devel
 
Quote:

Originally Posted by Fionn (Post 433378)
I removed my previous version using Application Manager.
I then deleted the advanced-power directory under /etc/osso-af-init/gconf-dir/apps/.

When removing using Application Manager you wiil need to also remove /var/lib/gconf/apps/advanced-power

Quote:

Originally Posted by Fionn (Post 433378)
Again I got the rescuing software update message that I reported in my last install which may mean nothing much but is a bit alarming.

I can increase timeout before reboot confirmation, so apt-worker could make a bit more. So no rescuing will be needed.

Quote:

Originally Posted by Fionn (Post 433378)
Other than that the install completed fine.

Nice

Quote:

Originally Posted by Fionn (Post 433378)
My main use of the application is to turn on flight mode and lock the keys and screen.
Would it be possible to add an option to do both of those together so that under "Device Mode" there would be options to:
  • Lock screen and keys
  • Flight mode
  • Reboot
  • Shutdown
  • Flight Mode + Lock Screen
or something similar?

Yes, it's very easy to implement. I'll add it the next build.

Fionn 2009-12-18 17:05

Re: New versions in extras-devel
 
Quote:

Originally Posted by 412b (Post 433571)
Yes, it's very easy to implement. I'll add it the next build.

That's great. Thanks. :)

gerstavros 2009-12-20 16:04

Re: Pybattery - battery statusbar applet with candies
 
Two thoughts:
1) Can you do something so that when items of menu doesn't fit in screen, menu instead of scrolling, splits in two sides?
2) It would be better if user could manage the submenus, like creating, puting items in them and changing the defaults (CPU policy, Device mode, Bluetooth etc)

And why don't you upload the new versions in garage?

412b 2009-12-20 22:04

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by gerstavros (Post 435358)
1) Can you do something so that when items of menu doesn't fit in screen, menu instead of scrolling, splits in two sides?

Well, all the versions have default GTK/Hildon behaviour. It can be done in such way, but it needs some more brainstorming.

Quote:

Originally Posted by gerstavros (Post 435358)
2) It would be better if user could manage the submenus, like creating, puting items in them and changing the defaults (CPU policy, Device mode, Bluetooth etc)

In some perspective. Experimental branch may have this, but at the moment I'm focused on Maemo 5 porting.

Quote:

Originally Posted by gerstavros (Post 435358)
And why don't you upload the new versions in garage?

I don't have enough time :( As soon as I get some, there gonna be fresh versions and sources.

corsac 2009-12-31 13:13

Re: Pybattery - battery statusbar applet with candies
 
Not sure if it has already been asked, but will advancer-power be available at one time for Fremantle? I miss percentage indication in statusbar (there is lshal or desktop widget, but I'd prefer it in the status area :/ )

412b 2009-12-31 13:41

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by corsac (Post 447879)
Not sure if it has already been asked, but will advancer-power be available at one time for Fremantle?

Will.
In fact almost all the insides work, the GUI part is not finished yet.

412b 2010-01-04 21:24

Re: Pybattery - battery statusbar applet with candies
 
For interested in Advanced Power on N900...
As I finally have some free time, could anybody test advanced-power-monitor-src from Diablo extras-devel (deb, but source of that package is preferable) on N900. All you need is to run
Code:

sudo ./AdvancedPowerMonitorDaemon.py start
in APM sources folder.
And post here the output.

born2wonder 2010-01-04 21:35

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 453123)
For interested in Advanced Power on N900...
As I finally have some free time, could anybody test advanced-power-monitor-src from Diablo extras-devel (deb, but source of that package is preferable) on N900. All you need is to run
Code:

sudo ./AdvancedPowerMonitorDaemon.py start
in APM sources folder.
And post here the output.

Code:

/usr/src/advanced-power-monitor $ sudo ./AdvancedPowerMonitorDaemon.py start
Starting...
Loading modules...
LOADED:    CPUFrequency
LOADED:    TotalRAM
/usr/src/advanced-power-monitor $ LOADED:    CPUGovernor
LOADED:    CPUGovernors
FAILED:    OSVersion
LOADED:    FreeMemory
FAILED:    Temperature
LOADED:    TotalSwap
LOADED:    FreeRAM
LOADED:    Diskspace
FAILED:    LightSensor
LOADED:    TotalMemory
LOADED:    FreeSwap
LOADED:    DeviceName
LOADED:    Uptime
done

Loading wrappers...
Loading packages list...
FAILED:    SmartQx
LOADED:    Nokia's BME
FAILED:    Dummy
FAILED:    BME Free
USING:    Nokia's BME

LOADED:    HAL USB
FAILED:    Dummy
ERROR:dbus.proxies:Introspect error on :1.11:/org/freedesktop/Hal/devices/usb_device_0_0_musb_hdrc: dbus.exceptions.DBusException: org.freedesktop.Hal.NoSuchDevice: No device with id /org/freedesktop/Hal/devices/usb_device_0_0_musb_hdrc
USING:    HAL USB

FAILED:    Dummy
LOADED:    Nokia's MCE
FAILED:    Powerlaunch
USING:    Nokia's MCE

FAILED:    Dummy
FAILED:    BlueZ
USING:    None

done


/usr/src/advanced-power-monitor $


412b 2010-01-04 21:42

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by born2wonder (Post 453134)
Code:

/usr/src/advanced-power-monitor $ sudo ./AdvancedPowerMonitorDaemon.py start

Nice :)
So APM couldn't get only OSVersion (easy to fix), Temperature (easy to fix), LightSensor (easy to fix), USB Control (well, as far as I can see no support for N900) and Bluetooth Control (needs more investigation.

Battery info is available as I supposed :)

corsac 2010-01-06 14:33

Re: Pybattery - battery statusbar applet with candies
 
As soon as I find some time to get the sources and test, I'll paste the output.

412b 2010-01-07 12:39

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by corsac (Post 455577)
As soon as I find some time to get the sources and test, I'll paste the output.

Please, wait a bit, I have some things to be found on a real device :), so there will be another testing sources in couple of days.

412b 2010-01-08 23:19

Re: Pybattery - battery statusbar applet with candies
 
APM 0.5.1-3 will be in Diablo's extras-devel in 30-45 minutes.
Testing on N900 is highly appreciated.
A bit later I'm going to move it to Fremantle's extras-devel.

tso 2010-01-09 05:59

Re: Pybattery - battery statusbar applet with candies
 
not sure if it needs a reboot or not, but right now device mode is not working on n800.

412b 2010-01-09 10:30

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by tso (Post 460705)
not sure if it needs a reboot or not, but right now device mode is not working on n800.

What is not working?
Anyway, try restarting the APM daemon, if no changes seem to be, post the output of restarting.

tso 2010-01-09 10:34

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 460846)
What is not working?
Anyway, try restarting the APM daemon, if no changes seem to be, post the output of restarting.

the "device mode" submenu stuff, tho a device reboot fixed the issue.

corsac 2010-01-09 14:03

Re: Pybattery - battery statusbar applet with candies
 
Running on an N900 (from ssh as root):

Code:

Nokia-N900-42-11:/usr/src/advanced-power-monitor# ./AdvancedPowerMonitorDaemon.py start
Starting...
Nokia-N900-42-11:/usr/src/advanced-power-monitor# Loaded modules: CPUFrequency TotalRAM CPUGovernor CPUGovernors OSVersion_Maemo FreeMemory Temperature_N900 TotalSwap FreeRAM Diskspace LightSensor_N900 TotalMemory FreeSwap DeviceName Uptime

Loading wrappers...
Loading packages list...
FAILED:        SmartQx
FAILED:        Nokia's BME
FAILED:        Dummy
FAILED:        BME Free
USING:        None

FAILED:        HAL USB OS2008
Traceback (most recent call last):
  File "/usr/src/advanced-power-monitor/AdvancedPowerMonitorDaemon.py", line 23, in <module>
    daemon.process_args()
  File "/usr/src/advanced-power-monitor/Daemon.py", line 108, in process_args
    self.start()
  File "/usr/src/advanced-power-monitor/Daemon.py", line 64, in start
    self.run()
  File "/usr/src/advanced-power-monitor/AdvancedPowerMonitorDaemon.py", line 18, in run
    self.apm = AdvancedPowerMonitor.apm()
  File "/usr/src/advanced-power-monitor/AdvancedPowerMonitor.py", line 90, in __init__
    self.init_wrappers()
  File "/usr/src/advanced-power-monitor/AdvancedPowerMonitor.py", line 161, in init_wrappers
    self.check_wrapper(key)
  File "/usr/src/advanced-power-monitor/AdvancedPowerMonitor.py", line 181, in check_wrapper
    wrapper = wr(self.bus, True)
  File "/usr/src/advanced-power-monitor/wrappers/usb_mode/AbstractUSBMode.py", line 13, in __init__
    AbstractWrapper.__init__(self, bus, check)
  File "/usr/src/advanced-power-monitor/wrappers/AbstractWrappers.py", line 23, in __init__
    self.check_available()
  File "/usr/src/advanced-power-monitor/wrappers/AbstractWrappers.py", line 61, in check_available
    if not System.is_package_version_valid(dp, self.dep_packages[dp]):
TypeError: list indices must be integers


gerstavros 2010-01-09 21:28

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by jkq (Post 362568)
Same here. It keeps saying "Swap is disabled", even though I have swap enabled (but not the 'standard' swap, I'm using ramzez).[...]

At me, using ramzez, shows wrong values. Exactly apm doesnīt understand the space used by ramzswap. It seems that it takes the values from "free". 412b, when you complete your current work, it would be nice to try to make apm to take the memory state from /proc/meminfo (where values are right)

412b 2010-01-09 22:00

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by gerstavros (Post 461630)
At me, using ramzez, shows wrong values. Exactly apm doesnīt understand the space used by ramzswap. It seems that it takes the values from "free". 412b, when you complete your current work, it would be nice to try to make apm to take the memory state from /proc/meminfo (where values are right)

It does take it from /proc/meminfo, so deeper investigation needed.

412b 2010-01-09 22:09

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by corsac (Post 461035)
Running on an N900 (from ssh as root)

What version are you using? 0.5.1-3?
I think, I'm gonna add extra version info in output :)
And try run it directly on device. It shouldn't make any difference, but all can happen ;)

EDIT: -src packages had wrong files :( Fixed the building script, so everything should be right.

gerstavros 2010-01-10 11:32

Re: Pybattery - battery statusbar applet with candies
 
Can we upgrade normally, or we still need to remove completely the previous version? (Although i donīt see any problem)

EDIT: i couldnīt upgrade. I īll reinstall

gerstavros 2010-01-10 12:01

Re: Pybattery - battery statusbar applet with candies
 
Big problem here. I removed advanced-power, but cannot remove or reinstall the advanced-power-monitor! What can i do?
Code:

Upgrading advanced-power-monitor 0.5.1-3 to 0.5.1-4
Selecting previously deselected package advanced-power-monitor.
(Reading database ... 21840 files and directories currently installed.)
Preparing to replace advanced-power-monitor 0.5.1-3 (using .../advanced-power-monitor_0.5.1-4_all.deb) ...
invoke-rc.d: not a symlink: "/etc/rc2.d/S60apmonitord"
invoke-rc.d: dangling symlink: "/etc/rc2.d/S60apmonitord"
dpkg: warning - old pre-removal script returned error exit status 102
dpkg - trying script from the new package instead ...
invoke-rc.d: not a symlink: "/etc/rc2.d/S60apmonitord"
invoke-rc.d: dangling symlink: "/etc/rc2.d/S60apmonitord"
dpkg: error processing /media/mmc2/.apt-archive-cache/advanced-power-monitor_0.5.1-4_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 102
invoke-rc.d: not a symlink: "/etc/rc2.d/S60apmonitord"
invoke-rc.d: dangling symlink: "/etc/rc2.d/S60apmonitord"
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 102
Errors were encountered while processing:
 /media/mmc2/.apt-archive-cache/advanced-power-monitor_0.5.1-4_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Code:

Uninstalling advanced-power-monitor 0.5.1-3
dpkg: error processing advanced-power-monitor (--remove):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
Errors were encountered while processing:
 advanced-power-monitor
E: Sub-process /usr/bin/dpkg returned an error code (1)


412b 2010-01-10 12:43

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by gerstavros (Post 462235)
Big problem here. I removed advanced-power, but cannot remove or reinstall the advanced-power-monitor! What can i do?

Hmmm... You didn't made the symlinks fix as I can see... Well, nevertheless you can download advanced-power-monitor-0.5.1-3, install and then remove it, after that install 0.5.1-4. E.g.:
Code:

sudo apt-get --reinstall install advanced-power-monitor && sudo apt-get remove advanced-power-monitor && sudo apt-get install advanced-power-monitor
It's kinda proper way. And make symlinks fix :)

EDIT: Btw, I've installed ramzez. All seems to be OK.

Saturn 2010-01-10 16:39

Re: Pybattery - battery statusbar applet with candies
 
You can also fix it by doing the following (as root):

Code:

mv /etc/rc2.d/S60apmonitord /etc/rc2.d/S60apmonitord.old
apt-get update
apt-get -f install
apt-get install advanced-power-monitor
mv /etc/rc2.d/S60apmonitord.old /etc/rc2.d/S60apmonitord

hope is helps.

gerstavros 2010-01-10 17:02

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 462274)
Hmmm... You didn't made the symlinks fix as I can see... Well, nevertheless you can download advanced-power-monitor-0.5.1-3, install and then remove it, after that install 0.5.1-4. E.g.:
Code:

sudo apt-get --reinstall install advanced-power-monitor && sudo apt-get remove advanced-power-monitor && sudo apt-get install advanced-power-monitor
It's kinda proper way. And make symlinks fix :)

EDIT: Btw, I've installed ramzez. All seems to be OK.

I can't install neither advanced-power-monitor nor advanced-power (any versions)

412b 2010-01-10 17:10

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by gerstavros (Post 462539)
I can't install neither advanced-power-monitor nor advanced-power (any versions)

What did you try? Fixing symlinks? Reinstalling via apt-get?

gerstavros 2010-01-10 17:20

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by Saturn (Post 462511)
You can also fix it by doing the following (as root):

Code:

mv /etc/rc2.d/S60apmonitord /etc/rc2.d/S60apmonitord.old
apt-get update
apt-get -f install
apt-get install advanced-power-monitor
mv /etc/rc2.d/S60apmonitord.old /etc/rc2.d/S60apmonitord

hope is helps.

It fixed, but the "apt-get install advanced-power-monitor" has no meening, it's already installed. And the "mv /etc/rc2.d/S60apmonitord.old /etc/rc2.d/S60apmonitord" wiil overwrite the new S60apmonitord

gerstavros 2010-01-10 17:25

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 462556)
What did you try? Fixing symlinks? Reinstalling via apt-get?

reinstalling via apt-get. But now everything seems ok

As about ramzez, at me apm shows that i have ,for example 70 MB free RAM, but according to meminfo i have 30, because 40 MB are used by ramzswap.

Saturn 2010-01-10 17:29

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by gerstavros (Post 462568)
It fixed, but the "apt-get install advanced-power-monitor" has no meening, it's already installed. And the "mv /etc/rc2.d/S60apmonitord.old /etc/rc2.d/S60apmonitord" wiil overwrite the new S60apmonitord

Nice..

The second installation i've put it since I didnt know at which point/version you have been stuck. If you were in the latest version it wouldn't do anything but if you where in an older it would upgrade.

Are you sure there is a new S60apmonitord? strange..

gerstavros 2010-01-10 17:49

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by gerstavros (Post 462208)
Can we upgrade normally, or we still need to remove completely the previous version?

Well, as i saw, we still need to remove firstly the previous version completely, right???

@Saturn, yes, after reinstalling apm, the S60apmonitord was created again, so i deleted the apmonitord.old

412b 2010-01-10 19:24

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by gerstavros (Post 462605)
Well, as i saw, we still need to remove firstly the previous version completely, right???

Nope. All you need is to fix the dangling symlinks.
E.g. read this.

gerstavros 2010-01-10 20:12

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 462704)
Nope. All you need is to fix the dangling symlinks.
E.g. read this.

A, i didn't know about it. Thanks

KristianW 2010-01-29 17:08

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 462704)
Nope. All you need is to fix the dangling symlinks.
E.g. read this.

I have been using APM 0.4.1 + AP 0.3.6 .
Only problem: sometimes the battery level laggs, sometimes it increases after reboot.

I have several times tried to install APM 0.5.0 + AP 0.4.0 ,
but never had the icon appear on the statusbar.
( Also tried with apt-get remove --purge + apt-get install. )

Now, after following the instructions referred to above,
(whatever they mean),

I have got APM 0.5.0-5 + AP 0.4.0-8 working.
But I had to use apt-get install; after installing with the app. man. I had no icon.
( To be on the safe side I first did apt-get remove --purge. )
I have not done anything in the file system.


Suggestions :

With a list of more than 11 items,
when I first open the options window there is 1-2 lines of empty space at the top.
After scrolling up-down the first item is at the top.
If that were the case from the start, a longer list would be visible right away.

With a list of 12 items, when scrolling down all the way,
the Settings window opens without being clicked.
Possibly because then there is no up arrow below "Settings".

KristianW 2010-01-30 00:40

Re: Pybattery - battery statusbar applet with candies
 
After installing APM 0.5.0-5 and AP 0.4.0-8 , (as described in my post #435),
I have been using my N810 (OS 43-7) for some hours.

Twice (during web surfing with Tear) all icons on top and to the left reverted to the standard setting.
The first time I got all back with "Panels" in "Control panel".

The second time I got all back, except the AP-icon.
Trying to get it back I first disabled it, then enabled it again (with "Panels").
>> The left and top edges of the screen turned grey for about (half) a second,
and then all icons were back to the standard setting.

( By the way, when I tried the standard battery icon, it showed a full battery when it was 1/4-1/2 according to AP.)

Any guess at what I should have done more before installing ?

412b 2010-02-01 20:29

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by KristianW (Post 501249)
Only problem: sometimes the battery level laggs, sometimes it increases after reboot.

It's Nokia's BME issue.

Quote:

Originally Posted by KristianW (Post 501249)
Suggestions :

With a list of more than 11 items,
when I first open the options window there is 1-2 lines of empty space at the top.
After scrolling up-down the first item is at the top.
If that were the case from the start, a longer list would be visible right away.

With a list of 12 items, when scrolling down all the way,
the Settings window opens without being clicked.
Possibly because then there is no up arrow below "Settings".

A GTK+/Hildon issue as far as I inspected. If you scroll accuratelly up and down arrows dissapear. And after that "Settings" becomes the last element so you click it instead of disappeared down arrow.


Quote:

Originally Posted by KristianW (Post 501879)
Twice (during web surfing with Tear) all icons on top and to the left reverted to the standard setting.

It's a Hildon Desktop restart. Mainly it happens due to low RAM.

Quote:

Originally Posted by KristianW (Post 501879)
The second time I got all back, except the AP-icon.
Trying to get it back I first disabled it, then enabled it again (with "Panels").
>> The left and top edges of the screen turned grey for about (half) a second,
and then all icons were back to the standard setting.

Any guess at what I should have done more before installing ?

Again a Hildon Desktop restart. Hmmm... Try version from extras-devel. Perhaps, you'll need to clean up GConf.
Btw, did you make the reboot as it was proposed?

Quote:

Originally Posted by KristianW (Post 501879)
By the way, when I tried the standard battery icon, it showed a full battery when it was 1/4-1/2 according to AP.

Different calculating :) As you can inspect standard battery applet can rapidly change to low battery level, when it seemed to be full.

DaSilva 2010-02-05 10:20

Re: Pybattery - battery statusbar applet with candies
 
I am little bit confused after all these pages.
I cannot find Pybattery or Power Monitor in the extras repository for the N900. Is it not yet available there?

412b 2010-02-05 11:12

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by DaSilva (Post 511585)
I am little bit confused after all these pages.
I cannot find Pybattery or Power Monitor in the extras repository for the N900. Is it not yet available there?

It's called Advanced Power and isn't released for Fremantle at the moment. Advanced Power Monitor (main daemon) is to be released for Fremantle this month.
Nearest Roadmap:
1. Promote stable for Diablo Extras.
2. Release new AP and APM in Extras Devel (fully customizable with user defined menus, info and actions).
3. Release GUI for Fremantle, based on Extras Devel release.

gerstavros 2010-02-05 23:44

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by 412b (Post 511645)
It's called Advanced Power[...]

Can't you edit the title of the thread?


All times are GMT. The time now is 18:58.

vBulletin® Version 3.8.8