You are not logged in.
thats a very good point. i'll take a look at the battery_design as you did.
Regards
Matthew
"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson
Offline
I've now added 64bit support to the pkgbuild now and also changed from using the Charge_full to charge_design_full as pointed out. this should get a true reading now.
Let me know if you have any problems
Regards
Matthew
"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson
Offline
Thank you for your effort!
But I observed something quite strange:
When charging or discharging the battery, suddendly charge_full becomes the refrence for battery_now instead of charge_full_design.
So I think the first way to solve the problem (just giving 100% back, if the status gets higher than 100%) seems to be the better way. Furthermore I discovered, that the output of "acpi -b" gives the information one really needs. So if you know how to extract information from this output, you might be able to save some effort to get the right number.
Regards
nsb
Offline
my thinkpad also uses energy_full and energy_now. I edited the batterymon file in /usr/bin, and it seems to work fine now. gotta love python. lol.
Offline
This really is a great monitor. I like it much better than the one provided with LXDE. When I hover it with the mouse or when I left-click it, I only get the percentage of the battery remaining, not the time remaining. Is there a switch to add to the monitor command to have it?
Thanks,
Daedhel
Last edited by daedhel (2009-03-27 17:44:04)
Offline
i'm working on that but i'm trying to work out the best way to-do it. i think the gnome panel work it out based on how long it takes to drop 1percent.
i'll see if i can work this out and get back to you.
Regards
Matthew
"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson
Offline
This would probably be at the very bottom of your todo list, but I would fly to wherever you are to shake your hand if you added optional use of libnotify.
Offline
so you get the popup like every other power manager?
thats actualy not that hard to-do.
I've been a little busy the last couple of days but i'm planning on doing some work this weekend.
i'm very open to suggestion regarding improvments etc.
P.S i will fix the Thinkpad thing this weekend along wit the bug that NSB has reported.
Cheers
Matthew
"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson
Offline
I get this error:
More than one battery was found please pass -b BAT[number]
using battery BAT0
as default
/sys/class/power_supply/BAT0/status
Charging
Traceback (most recent call last):
File "/usr/bin/batterymon", line 243, in <module>
tray=systray()
File "/usr/bin/batterymon", line 69, in __init__
self.update()
File "/usr/bin/batterymon", line 134, in update
per = int(round(self.percent()))
File "/usr/bin/batterymon", line 82, in percent
FILE=open(batpath+BATnumber+"/charge_full_design","r")
IOError: [Errno 2] No such file or directory: '/sys/class/power_supply/BAT0/charge_full_design'
Ok, I checked it and the file /sys/class/power_supply/BAT0/charge_full_design does not exist on my system.
If I start it with the -b option I get this error with both -b BAT0 and -b BAT1
Traceback (most recent call last):
File "/usr/bin/batterymon", line 243, in <module>
tray=systray()
File "/usr/bin/batterymon", line 69, in __init__
self.update()
File "/usr/bin/batterymon", line 133, in update
cmd = self.status().strip()
File "/usr/bin/batterymon", line 73, in status
FILE=open(batpath+BATnumber + "/status","r")
IOError: [Errno 2] No such file or directory: '/sys/class/power_supply//status'
Seems the FILE=open line does not work correctly...
p.s.
I used the 0.5.8-3 PKGBUILD version.
Offline
Sid could you post the contents of /sys/class/power_supply/BAT0 for me?
pther that is on my to-do list.
Regards
Matthew
"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson
Offline
ls -l /sys/class/power_supply/BAT0/
-rw-r--r-- 1 root root 4096 29. Mär 23:20 alarm
-r--r--r-- 1 root root 4096 29. Mär 23:11 capacity
-r--r--r-- 1 root root 4096 29. Mär 23:11 current_avg
-r--r--r-- 1 root root 4096 29. Mär 23:20 current_now
lrwxrwxrwx 1 root root 0 29. Mär 23:20 device -> ../../../ACPI0002:00
-r--r--r-- 1 root root 4096 29. Mär 23:11 energy_full
-r--r--r-- 1 root root 4096 29. Mär 23:20 energy_full_design
-r--r--r-- 1 root root 4096 29. Mär 23:11 energy_now
-r--r--r-- 1 root root 4096 29. Mär 23:20 manufacturer
-r--r--r-- 1 root root 4096 29. Mär 23:20 model_name
drwxr-xr-x 2 root root 0 29. Mär 23:20 power
-r--r--r-- 1 root root 4096 29. Mär 23:11 present
-r--r--r-- 1 root root 4096 29. Mär 23:11 status
lrwxrwxrwx 1 root root 0 29. Mär 23:20 subsystem -> ../../../../../../../../../../class/power_supply
-r--r--r-- 1 root root 4096 29. Mär 23:20 technology
-r--r--r-- 1 root root 4096 29. Mär 23:20 temp
-r--r--r-- 1 root root 4096 29. Mär 23:20 type
-rw-r--r-- 1 root root 4096 29. Mär 23:11 uevent
-r--r--r-- 1 root root 4096 29. Mär 23:20 voltage_min_design
-r--r--r-- 1 root root 4096 29. Mär 23:11 voltage_now
Offline
Hi Sid,
do you own a thinkpad?
this has come up and is my 1st thing to fix.
should be an update in the next few days.
Sorry about the delay.
"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson
Offline
Just take it cool, you'll do it when you get the time...
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
okay i think i have fixed both issues.
i've now added support for thinkpad Laptops (at least i think i have) if you could let me know if it works okay
i've also fixed the problem with the -b option that Sid was having but would affect anyone using the -b option.
let me know how you get on.
i'm going to start work on the time remaing part next.
Thanks
Matthew
"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson
Offline
Hi,
The -b Option issue seems fixed.
But there is a typo in line 91. I get this error.
File "/usr/bin/batterymon", line 91, in percent
FILE=open(batpath+BATnumber+"/engergy_now","r")
IOError: [Errno 2] No such file or directory: '/sys/class/power_supply/BAT0/engergy_now'
After changing
FILE=open(batpath+BATnumber+"/engergy_now","r")
to
FILE=open(batpath+BATnumber+"/energy_now","r")
it works here.
p.s.
My laptop is a AcerExtensa3001WLMi.
Last edited by SiD (2009-03-30 09:43:57)
Offline
Thanks i'll fix that.
Regards
Matthew
"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson
Offline
Nice project, using it right now!
Last edited by froli (2009-03-31 17:14:06)
archlinux on Macbook Pro 10,1
Offline
Thanks i'm working with kremso at the moment on a new and improved version
"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson
Offline
In the name of all that is righteous and pure, please don't stuff it full of Gnome deps.
Last edited by MarCustomized (2009-04-01 00:12:02)
Offline
Hi! your project seems incouraging, but I would suggest to add support for AC-adapters.
When I start batterymon without a battery (i.e. only with AC plugged-in), the program won't start at all. It would be better to start it showing an icon of an adapter, or something similar. Info about presence of the adapter can be found (obviously) in /proc/acpi/ac_adapter/AC .
Cheers,
Fabio
Offline
Hi,
me and tomas are currently rewritting most of the program at the moment. It now uses the hal interface to get all it's infomration like ac adaptor status time remainging etc.
it now also has optinal notification support and the gnome icon them. as soon as we are finished i will let everone on here know. it's looking promising and is still realy light on dependancies.
Regards
Matthew
"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson
Offline
Can't wait for the next release! Continue your nice job guys!
archlinux on Macbook Pro 10,1
Offline
Nice app, but as it is /sys/class/power_supply doesn't seem to take something like tp_smapi into account (at least I think that's it):
/sys/class/power_supply/BAT0/status:Full <-- this is wrong
/sys/class/power_supply/BAT0/energy_full_design:84240000
/sys/class/power_supply/BAT0/energy_now:38620000
/sys/devices/platform/smapi/BAT0/remaining_percent:47
/sys/devices/platform/smapi/BAT0/start_charge_thresh:40
/sys/devices/platform/smapi/BAT0/state:idle
/sys/devices/platform/smapi/BAT0/stop_charge_thresh:80
(using settings from here)
Perhaps using hal will take care of this, but in case it doesn't, now you know.
Offline
Hi there Awesome program that fills a gap
Just wondering, what's the "theme" name it's looking for? Is it just "default" or the gtk theme/openbox theme I use?
When using:
./batterymon.py -t default -b BAT1
I get:
Theme not found please check the name and try again!
Thanks in advance
Last edited by Eax (2009-04-12 18:57:05)
Offline