Battery Monitor
As I understand it, the "sources" from the BK repository are meant to be compiled for your particular puppy, not just extracted somewhere.
Try installing the 0.0.1 pet and see if it works for you. If so, you could try substituting the newer bevent, changing icons, etc. from that point. If it doesn't work, it's easy to uninstall the .pet.
Pbatt also shows time left on the battery, in the tooltip...
Try installing the 0.0.1 pet and see if it works for you. If so, you could try substituting the newer bevent, changing icons, etc. from that point. If it doesn't work, it's easy to uninstall the .pet.
Pbatt also shows time left on the battery, in the tooltip...
It installed, and informed me it did not have a menu entry. So I just go run it in Console? Does it run at bootup or do I have to load it each time?rcrsn51 wrote:@zaivala: Here is another battery monitor. This one shows the time left on the battery instead of the usual percent charge. When the battery gets low, it pops up a warning message.
Hopefully, this one will work for you. Please test and report.
Ah, I see a new icon already in my taskbar, shows I'm plugged in. I pulled the plug and it hasn't changed yet but I assume it will soon...
Edit: I rebooted... it still shows me as plugged in LOL. But at least I have an icon, is that progress?
Second Edit: Over an hour later, still shows it plugged in.
Last edited by zaivala on Tue 24 Dec 2013, 16:38, edited 1 time in total.
When you hover your mouse over the icon, does it show the remaining time?zaivala wrote:Second Edit: Over an hour later, still shows it plugged in.
I understand your confusion about the icon, but let me explain the software development process. My first objective was to get you a battery monitor that solved your problem. Until I know that the monitor works, there is no point in spending time on pretty icons.
See the new version posted above and the comment about the icon.
Interesting. Yes, I get something when I hover my mouse pointer over the icon.
If it's plugged in, it say 101 minutes left. If it isn't plugged in, it says 160 minutes left. As I've had it out of the house for a while, it may not be fully charged.
Am I guessing correctly that the minutes left while plugged in is minutes until fully charged? Nope, probably not, as that number is getting larger the longer it's plugged in, would be smaller.
If it's plugged in, it say 101 minutes left. If it isn't plugged in, it says 160 minutes left. As I've had it out of the house for a while, it may not be fully charged.
Am I guessing correctly that the minutes left while plugged in is minutes until fully charged? Nope, probably not, as that number is getting larger the longer it's plugged in, would be smaller.
Here's why. When you pull the plug and go on battery, laptops often switch to low-power mode - less backlight, etc. Yabatt estimates the time remaining by dividing the current charge in the battery by the usage rate at that moment. So the time that is displayed may increase.zaivala wrote:If it's plugged in, it say 101 minutes left. If it isn't plugged in, it says 160 minutes left.
No. The best way to know if the battery is fully charged is to look at the laptop's own indicator light.Am I guessing correctly that the minutes left while plugged in is minutes until fully charged?
Thanks for testing this.
LOL Well, the laptop's manual says it goes to a green light when it is at least 85% charged, so that's not the same as 100%. Thanks for all your help.
I was hoping for an indicator which WOULD show me, without mousing, so I would know when to plug in... as I said at the start of this thread, I get no warning that the battery is drained, other than my computer shutting off.
I was hoping for an indicator which WOULD show me, without mousing, so I would know when to plug in... as I said at the start of this thread, I get no warning that the battery is drained, other than my computer shutting off.
zaivala wrote:I was hoping for an indicator which WOULD show me, without mousing, so I would know when to plug in... as I said at the start of this thread, I get no warning that the battery is drained, other than my computer shutting off.
Please run a full test and verify that this works for you.rcrsn51 wrote:When the battery gets low, it pops up a warning message
- nilsonmorales
- Posts: 972
- Joined: Fri 15 Apr 2011, 14:39
- Location: El Salvador
thank you
sources please rcrsn51
[b][url=http://nilsonmorales.blogspot.com/]My blog |[/url][/b][b][url=https://github.com/woofshahenzup]| Github[/url][/b]
[img]https://i.postimg.cc/5tz5vrrX/imag018la6.gif[/img]
[img]http://s5.postimg.org/7h2fid8pz/botones_logos3.png[/img]
[img]https://i.postimg.cc/5tz5vrrX/imag018la6.gif[/img]
[img]http://s5.postimg.org/7h2fid8pz/botones_logos3.png[/img]
Re: thank you
The attachment has the source for yabatt_tray. It is a cut-down version of Pbatt. The compile command is listed inside. The other key file, yabatt_check, is a script.nilsonmorales wrote:sources please rcrsn51
Did the pop-up warning message work for you? I am still waiting for confirmation on this.
Zaivala has actually discovered a bug in the Puppy powerapplet_tray, which I also saw. If you let a battery completely discharge, it may start reporting its maximum capacity as zero. So when powerapplet_tray calculates the remaining charge as a percent of the maximum, it divides by zero and crashes. That's why yabatt calculates the remaining time instead.
[Edit] I looked at the powerapplet_tray code again and I'm not sure if I have the right explanation for the crash.
I am surprised that this situation has not been reported more often.
- Attachments
-
- yabatt_tray.c.tar.gz
- (1.15 KiB) Downloaded 183 times
As usual, I missed that line. I'm running a test now but it says I have 205 minutes...rcrsn51 wrote:zaivala wrote:I was hoping for an indicator which WOULD show me, without mousing, so I would know when to plug in... as I said at the start of this thread, I get no warning that the battery is drained, other than my computer shutting off.Please run a full test and verify that this works for you.rcrsn51 wrote:When the battery gets low, it pops up a warning message
# /proc/acpi/battery/BATx
bash: /proc/acpi/battery/BATx: No such file or directory
LOL see what an idiot I am... did cd /proc/acpi/battery , found BAT0, did ls and found there is a file... let me see if I can open it...
present: yes
design capacity: 0 mWh
last full capacity: 37752 mWh
battery technology: rechargeable
design voltage: 1 mV
design capacity warning: 14520 mWh
design capacity low: 3775 mWh
cycle count: 377
capacity granularity 1: -1 mWh
capacity granularity 2: -1 mWh
model number: ÿÿÿÿ
serial number: X550A26
battery type:
OEM info: LIon
bash: /proc/acpi/battery/BATx: No such file or directory
LOL see what an idiot I am... did cd /proc/acpi/battery , found BAT0, did ls and found there is a file... let me see if I can open it...
present: yes
design capacity: 0 mWh
last full capacity: 37752 mWh
battery technology: rechargeable
design voltage: 1 mV
design capacity warning: 14520 mWh
design capacity low: 3775 mWh
cycle count: 377
capacity granularity 1: -1 mWh
capacity granularity 2: -1 mWh
model number: ÿÿÿÿ
serial number: X550A26
battery type:
OEM info: LIon
There are some wonky things about your battery. Those numbers should be in mAh, not mWh. Is that just a typo?
[Edit] I found an example where the numbers were in mWh.
Could you please also post the "state" file from the same folder?
[Edit] I found an example where the numbers were in mWh.
This value is causing the "floating point exception" error. It should be the factory-fresh maximum capacity, not zero.design capacity: 0 mWh
This value triggers the warning message and is far higher than any of my batteries. That's why you are getting a warning with 66 minutes left.design capacity warning: 14520 mWh
Could you please also post the "state" file from the same folder?
@zaivala: Please try v1.3 above. It triggers the warning message 5 minutes from shutdown. If this time doesn't work properly with your system, you can set it to something else.
I'm hoping that this version also works with batteries that use mWh instead of mAh.
With older batteries like ours, trying to calculate the capacity during charging can be either misleading or dangerous. So I have removed it. Now the message just says "Battery is charging".
I'm hoping that this version also works with batteries that use mWh instead of mAh.
With older batteries like ours, trying to calculate the capacity during charging can be either misleading or dangerous. So I have removed it. Now the message just says "Battery is charging".