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)

Estel 2011-12-13 18:48

Re: Pybattery - battery statusbar applet with candies
 
Neither stop/start performed as you described, or reboot solves the problem.

My way of loading bq27x00_battery is via /etc/modules - so, it is loaded very early during boot process. Rationale - this way, it loads before bme, and open path for i2c access for it - so, BME don't complain about something occupying i2c, doesn't generate possible (and dangerous) i2c conflicts, and overall doesn't "know" about neighbor using i2c. (Just for the record - using this method, it's still impossible to turn off and on BME during runtime - for example, via HEN - without modprobe -r bq27x00_battery).

Thinking about that, this is obvious "candidate" for "why APM doesn't see it". Still, it would be great to have option to use it that way, for mentioned reasons.

Thanks for looking into it!

/Estel

412b 2011-12-14 13:37

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by Estel (Post 1137142)
Neither stop/start performed as you described, or reboot solves the problem.

My way of loading bq27x00_battery is via /etc/modules - so, it is loaded very early during boot process. Rationale - this way, it loads before bme, and open path for i2c access for it - so, BME don't complain about something occupying i2c, doesn't generate possible (and dangerous) i2c conflicts, and overall doesn't "know" about neighbor using i2c. (Just for the record - using this method, it's still impossible to turn off and on BME during runtime - for example, via HEN - without modprobe -r bq27x00_battery).

Thinking about that, this is obvious "candidate" for "why APM doesn't see it". Still, it would be great to have option to use it that way, for mentioned reasons.

Thanks for looking into it!

/Estel

Do you use kernel-power? And what's the version (perhaps, 49)?
BQ modules depend on kernel-power >= 47 and it seems to be a bug in version parsing in APCommon.

Estel 2011-12-14 22:59

Re: Pybattery - battery statusbar applet with candies
 
Yes, I use KP49. Would like to provide more debug info, if it's needed - just tell me a way to gather it ;)

Estel 2011-12-15 17:10

Re: Pybattery - battery statusbar applet with candies
 
In case You're wondering, after latest update, bq(...)00 still isn't available, despite being listed in HAL.

/Estel

412b 2011-12-15 18:43

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by Estel (Post 1137904)
In case You're wondering, after latest update, bq(...)00 still isn't available, despite being listed in HAL.

/Estel

It's getting really interesting )
What is the content of the apmd log (~/apmonitord.log)?

Estel 2011-12-15 23:13

Re: Pybattery - battery statusbar applet with candies
 
Code:

Advanced Power Monitor 0.6.0-4
<unknown>

Loaded modules (2/2): DeviceName OSVersion_Maemo

Loading wrappers...

LOADING battery
Loading packages list...
[L] Nokia's BME Alternative
[L] Dummy
[F] BQ27200
[L] Nokia's BME
[F] BQ27200 Alternative
[U] Nokia's BME


LOADED
EXIT


yrannadx 2011-12-16 14:46

Re: Pybattery - battery statusbar applet with candies
 
For comparison, maybe it helps, my case where the BQ module is working with kp49:

Code:

Advanced Power Monitor 0.6.0
RX-51_2009SE_21.2011.38-1_PR_MR0

Loaded modules (2/2): OSVersion_Maemo DeviceName

Loading wrappers...

LOADING battery
Loading packages list...
[L] Nokia's BME
[L] BQ27200
[L] Dummy
[L] BQ27200 Alternative
[L] Nokia's BME Alternative
[U] Nokia's BME


LOADED
EXIT


Estel 2011-12-16 15:06

Re: Pybattery - battery statusbar applet with candies
 
yrannadx, how does you /etc/modules look like? If you're not loading bq27x00_battery from there, how do You do it? does it exist peacefully with bme (at least, until You try to restart bme)?

/Estel

yrannadx 2011-12-16 21:15

Re: Pybattery - battery statusbar applet with candies
 
Estel, /etc/modules contains bq27x00_battery only.

Seems both modules exist peacefully, at least I am concluding this from the fact that battery properties as reported by bq are different from those reported by bme, for example when bq shown 95% (which is accurate), bme shows 86% and so on.

Estel 2011-12-17 20:57

Re: Pybattery - battery statusbar applet with candies
 
As I'm also using /etc/modules (with bq27x00_battery there, and nothing else), I have no idea why GUI updates available options on Your device, and doesn't do the same on mine. 412b, any ideas?

412b 2011-12-18 21:54

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by Estel (Post 1138838)
As I'm also using /etc/modules (with bq27x00_battery there, and nothing else), I have no idea why GUI updates available options on Your device, and doesn't do the same on mine. 412b, any ideas?

well, the main difference in those logs is that yours has no OSVersion detected. At the moment I'm looking, if it is the case.

AndrewX192 2012-01-17 07:52

Re: Pybattery - battery statusbar applet with candies
 
Today I ran into an issue where advanced-power-monitor did not load when my system started. Executing `apt-get install --reinstall advanced-power-common` solved the issue.

nerfiaux 2012-03-07 14:55

Re: Pybattery - battery statusbar applet with candies
 
1 Attachment(s)
Hi,

I just translated into french the file from first post.
I attached it to the post.

Can it be possible to generate a deb package with this translated file ?
Thx

Nerfiaux

412b 2012-04-12 18:19

Re: Pybattery - battery statusbar applet with candies
 
Quote:

Originally Posted by nerfiaux (Post 1175938)
Hi,

I just translated into french the file from first post.
I attached it to the post.

Can it be possible to generate a deb package with this translated file ?
Thx

Nerfiaux

Sorry, but it took me so long to handle all the stuff...
I'll upload your translation today or tomorrow.

aliasnameless 2012-11-08 17:13

Error after update
 
Cant run Advanced Power Monitor after update 0.6.0-6

apmdaemon.py say
Code:

[1|root@Nokia-N900|~]python /opt/maemo/usr/lib/advanced-power-monitor/apmdaemon.py
Advanced Power Monitor 0.6.0-6
RX-51_2009SE_21.2011.38-1_PR_MR0

Loaded modules (2/2): OSVersion_Maemo DeviceName

Loading wrappers...

LOADING battery
Loading packages list...
[L] Dummy
[F] BQ27200
[L] Nokia's BME
[F] BQ27200 Alternative
[L] Nokia's BME Alternative
[U] Nokia's BME


LOADING device_mode
Traceback (most recent call last):
  File "/opt/maemo/usr/lib/advanced-power-monitor/apmdaemon.py", line 30, in <module>
    daemon.run()
  File "/opt/maemo/usr/lib/advanced-power-monitor/apmdaemon.py", line 16, in run
    self.apm = AdvancedPowerMonitor.apm()
  File "/opt/maemo/usr/lib/advanced-power-monitor/AdvancedPowerMonitor.py", line 91, in __init__
    self.__init_wrappers()
  File "/opt/maemo/usr/lib/advanced-power-monitor/AdvancedPowerMonitor.py", line 173, in __init_wrappers
    self.__check_wrapper(key)
  File "/opt/maemo/usr/lib/advanced-power-monitor/AdvancedPowerMonitor.py", line 194, in __check_wrapper
    wrapper = wr(self.__bus, True)
  File "/opt/maemo/usr/lib/advanced-power-monitor/wrappers/device_mode/AbstractDeviceMode.py", line 13, in __init__
  File "/opt/maemo/usr/lib/advanced-power-monitor/wrappers/AbstractWrappers.py", line 16, in __init__
    self.__type = self.get_type()
AttributeError: DeviceModePowerlaunch instance has no attribute 'get_type'
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
  File "/usr/lib/python2.5/threading.py", line 446, in run
  File "/usr/lib/python2.5/site-packages/advpowcommon/util/execn.py", line 23, in run_shell_command
  File "/usr/lib/python2.5/subprocess.py", line 444, in call
  File "/usr/lib/python2.5/subprocess.py", line 594, in __init__
  File "/usr/lib/python2.5/subprocess.py", line 1066, in _execute_child
  File "/usr/lib/python2.5/subprocess.py", line 969, in _set_cloexec_flag
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'FD_CLOEXEC'


aliasnameless 2012-11-08 17:15

Re: Pybattery - battery statusbar applet with candies
 
Cant run upmonitord after update 0.6.0-6

apmdaemon.py say
Code:

[1|root@Nokia-N900|~]python /opt/maemo/usr/lib/advanced-power-monitor/apmdaemon.py
Advanced Power Monitor 0.6.0-6
RX-51_2009SE_21.2011.38-1_PR_MR0

Loaded modules (2/2): OSVersion_Maemo DeviceName

Loading wrappers...

LOADING battery
Loading packages list...
[L] Dummy
[F] BQ27200
[L] Nokia's BME
[F] BQ27200 Alternative
[L] Nokia's BME Alternative
[U] Nokia's BME


LOADING device_mode
Traceback (most recent call last):
  File "/opt/maemo/usr/lib/advanced-power-monitor/apmdaemon.py", line 30, in <module>
    daemon.run()
  File "/opt/maemo/usr/lib/advanced-power-monitor/apmdaemon.py", line 16, in run
    self.apm = AdvancedPowerMonitor.apm()
  File "/opt/maemo/usr/lib/advanced-power-monitor/AdvancedPowerMonitor.py", line 91, in __init__
    self.__init_wrappers()
  File "/opt/maemo/usr/lib/advanced-power-monitor/AdvancedPowerMonitor.py", line 173, in __init_wrappers
    self.__check_wrapper(key)
  File "/opt/maemo/usr/lib/advanced-power-monitor/AdvancedPowerMonitor.py", line 194, in __check_wrapper
    wrapper = wr(self.__bus, True)
  File "/opt/maemo/usr/lib/advanced-power-monitor/wrappers/device_mode/AbstractDeviceMode.py", line 13, in __init__
  File "/opt/maemo/usr/lib/advanced-power-monitor/wrappers/AbstractWrappers.py", line 16, in __init__
    self.__type = self.get_type()
AttributeError: DeviceModePowerlaunch instance has no attribute 'get_type'
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
  File "/usr/lib/python2.5/threading.py", line 446, in run
  File "/usr/lib/python2.5/site-packages/advpowcommon/util/execn.py", line 23, in run_shell_command
  File "/usr/lib/python2.5/subprocess.py", line 444, in call
  File "/usr/lib/python2.5/subprocess.py", line 594, in __init__
  File "/usr/lib/python2.5/subprocess.py", line 1066, in _execute_child
  File "/usr/lib/python2.5/subprocess.py", line 969, in _set_cloexec_flag
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'FD_CLOEXEC'


aliasnameless 2012-11-08 17:20

Re: Pybattery - battery statusbar applet with candies
 
Cant run upmonitord after update 0.6.0-6

apmdaemon.py say
Code:

[1|root@Nokia-N900|~]python /opt/maemo/usr/lib/advanced-power-monitor/apmdaemon.py
Advanced Power Monitor 0.6.0-6
RX-51_2009SE_21.2011.38-1_PR_MR0

Loaded modules (2/2): OSVersion_Maemo DeviceName

Loading wrappers...

LOADING battery
Loading packages list...
[L] Dummy
[F] BQ27200
[L] Nokia's BME
[F] BQ27200 Alternative
[L] Nokia's BME Alternative
[U] Nokia's BME


LOADING device_mode
Traceback (most recent call last):
  File "/opt/maemo/usr/lib/advanced-power-monitor/apmdaemon.py", line 30, in <module>
    daemon.run()
  File "/opt/maemo/usr/lib/advanced-power-monitor/apmdaemon.py", line 16, in run
    self.apm = AdvancedPowerMonitor.apm()
  File "/opt/maemo/usr/lib/advanced-power-monitor/AdvancedPowerMonitor.py", line 91, in __init__
    self.__init_wrappers()
  File "/opt/maemo/usr/lib/advanced-power-monitor/AdvancedPowerMonitor.py", line 173, in __init_wrappers
    self.__check_wrapper(key)
  File "/opt/maemo/usr/lib/advanced-power-monitor/AdvancedPowerMonitor.py", line 194, in __check_wrapper
    wrapper = wr(self.__bus, True)
  File "/opt/maemo/usr/lib/advanced-power-monitor/wrappers/device_mode/AbstractDeviceMode.py", line 13, in __init__
  File "/opt/maemo/usr/lib/advanced-power-monitor/wrappers/AbstractWrappers.py", line 16, in __init__
    self.__type = self.get_type()
AttributeError: DeviceModePowerlaunch instance has no attribute 'get_type'
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
  File "/usr/lib/python2.5/threading.py", line 446, in run
  File "/usr/lib/python2.5/site-packages/advpowcommon/util/execn.py", line 23, in run_shell_command
  File "/usr/lib/python2.5/subprocess.py", line 444, in call
  File "/usr/lib/python2.5/subprocess.py", line 594, in __init__
  File "/usr/lib/python2.5/subprocess.py", line 1066, in _execute_child
  File "/usr/lib/python2.5/subprocess.py", line 969, in _set_cloexec_flag
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'FD_CLOEXEC'



All times are GMT. The time now is 17:30.

vBulletin® Version 3.8.8