Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 21 Jul 2019, 21:10
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
Battery Monitor
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 3 [37 Posts]   Goto page: Previous 1, 2, 3 Next
Author Message
rcrsn51


Joined: 05 Sep 2006
Posts: 12627
Location: Stratford, Ontario

PostPosted: Sun 22 Dec 2013, 22:01    Post subject:  

The battery on my netbook had completely discharged. But once I let it recharge a bit, powerapplet_tray started to work!
Back to top
View user's profile Send private message 
zaivala

Joined: 21 Mar 2011
Posts: 125

PostPosted: Mon 23 Dec 2013, 12:02    Post subject:  

Looks good but.. again, I'm pretty much a noob. Don't know where to unzip the files to, or do I put them in /temp and move them to the directories which are sorta "backwards" noted (i.e., pbatt-0.3.2/usr ... pbatt-0.3.2/usr/local ...) (I would assume they would be /usr/pbatt-0.3.2 and /usr/local/pbatt-0.3.2, etc.) This is why I love .pet files...
Back to top
View user's profile Send private message 
cimarron


Joined: 30 May 2013
Posts: 293

PostPosted: Mon 23 Dec 2013, 16:23    Post subject:  

You could try the .pet from the original thread (version 0.0.1). That may be all you need. The icons are installed in /usr/local/lib/X11/mini-icons if you want to substitute different ones (using the same size and filename).

I think I upgraded to 0.3.2 simply by taking bevent from the source (extract it anywhere and look in the extracted folder) and replacing the installed bevent from 0.0.1 (in /usr/local/bin). The newer version uses more icons with different filenames, so you would have to provide the extra icons, either from the /usr/local/lib/X11/mini-icons folder in the extracted source folder, or your own substitutions.

Let me know if you still have questions...
Back to top
View user's profile Send private message 
zaivala

Joined: 21 Mar 2011
Posts: 125

PostPosted: Tue 24 Dec 2013, 00:33    Post subject:  

You confused me with that response. Was I wrong in saying that I could just change the directories? (move the files to the directories as listed, but with the progname being the final, not first, directory name?) You just told me to get the original and replace a bunch of files... but I already have the latest version, just want to know where to extract it to.
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 12627
Location: Stratford, Ontario

PostPosted: Tue 24 Dec 2013, 08:42    Post subject:  

@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.

Note that the tray icon does NOT change with the status of the battery.
yabatt-1.3.pet
Description  Updated 2013-12-26
Improved battery checking
pet

 Download 
Filename  yabatt-1.3.pet 
Filesize  4.62 KB 
Downloaded  177 Time(s) 

Last edited by rcrsn51 on Thu 26 Dec 2013, 09:49; edited 6 times in total
Back to top
View user's profile Send private message 
cimarron


Joined: 30 May 2013
Posts: 293

PostPosted: Tue 24 Dec 2013, 08:50    Post subject:  

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...
Back to top
View user's profile Send private message 
zaivala

Joined: 21 Mar 2011
Posts: 125

PostPosted: Tue 24 Dec 2013, 11:34    Post subject:  

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.


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?

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, 12:38; edited 1 time in total
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 12627
Location: Stratford, Ontario

PostPosted: Tue 24 Dec 2013, 11:44    Post subject:  

Hover your mouse over the icon.
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 12627
Location: Stratford, Ontario

PostPosted: Tue 24 Dec 2013, 12:43    Post subject:  

zaivala wrote:
Second Edit: Over an hour later, still shows it plugged in.

When you hover your mouse over the icon, does it show the remaining time?

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.
Back to top
View user's profile Send private message 
zaivala

Joined: 21 Mar 2011
Posts: 125

PostPosted: Tue 24 Dec 2013, 22:03    Post subject:  

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.
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 12627
Location: Stratford, Ontario

PostPosted: Tue 24 Dec 2013, 22:28    Post subject:  

zaivala wrote:
If it's plugged in, it say 101 minutes left. If it isn't plugged in, it says 160 minutes left.

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.

Quote:
Am I guessing correctly that the minutes left while plugged in is minutes until fully charged?

No. The best way to know if the battery is fully charged is to look at the laptop's own indicator light.

Thanks for testing this.
Back to top
View user's profile Send private message 
zaivala

Joined: 21 Mar 2011
Posts: 125

PostPosted: Tue 24 Dec 2013, 22:42    Post subject:  

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.
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 12627
Location: Stratford, Ontario

PostPosted: Tue 24 Dec 2013, 23:53    Post subject:  

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.

rcrsn51 wrote:
When the battery gets low, it pops up a warning message

Please run a full test and verify that this works for you.
Back to top
View user's profile Send private message 
nilsonmorales


Joined: 15 Apr 2011
Posts: 946
Location: El Salvador

PostPosted: Wed 25 Dec 2013, 01:19    Post subject:  thank you  

sources please rcrsn51
_________________
My blog | | Github


Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 12627
Location: Stratford, Ontario

PostPosted: Wed 25 Dec 2013, 07:24    Post subject: Re: thank you  

nilsonmorales wrote:
sources please rcrsn51

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.

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.
yabatt_tray.c.tar.gz
Description 
gz

 Download 
Filename  yabatt_tray.c.tar.gz 
Filesize  1.15 KB 
Downloaded  153 Time(s) 
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 3 [37 Posts]   Goto page: Previous 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0642s ][ Queries: 12 (0.0182s) ][ GZIP on ]