Low-batt notification for Puppy? (Solved)

Using applications, configuring, problems
Message
Author
User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

Low-batt notification for Puppy? (Solved)

#1 Post by Mike Walsh »

Evening, everybody.

Been looking around the forum for a while, this afternoon, and not really found anything suitable.

There's quite a few different ways of monitoring battery levels in Puppy.....but are there any tools that will allow me to set a 'critical' low level, that would give me an on-screen notification when it's reached? (Or something along those lines...?)

Any advice, as always, will be appreciated.


Regards,

Mike. :wink:
Last edited by Mike Walsh on Mon 03 Aug 2015, 19:45, edited 1 time in total.

User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

#2 Post by 666philb »

this allows you to set a critical levelhttp://murga-linux.com/puppy/viewtopic.php?t=85475
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#3 Post by rcrsn51 »

Here is what you need to know about battery monitors: most of them are based on percentages. But 10% of a new large battery is entirely different than 10% of a small worn-out battery. And is it 10% of the original factory charge or 10% of the last charge?

So you need to set a meaningful threshold based on the current state of the battery. A more sensible approach is to set the threshold based on the estimated time remaining.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#4 Post by Mike Walsh »

Hi, guys.

@Phil:- I'll have a look at what you've given me the link for. Cheers!

@rcrsn51:- Eminently sensible suggestion, Bill. The battery in question is a high-capacity replacement for my old Dell laptop. The Dell's 13 yrs old; the original, factory-supplied Sony battery pack (yes, one of those that led to the well-documented class-action lawsuit against Dell, due to the infamous 'exploding battery' episodes.....though, thankfully, mine seemed to have escaped all that!) lasted 10 yrs, so it didn't do too badly.

I purchased the high-cap replacement about 3 yrs ago; at the last check with batmon, about 5 hours ago, it seems its current full capacity is 6060 mAH.....down from the original 6600mAH. Works out to a drop of 9% in 3 years; not too shabby! Mind you, I don't use the battery that much; she tends to run on the mains throughout the winter, and only goes on battery when I take her outside on nice days at this time of year. Although it's a 'lap'-top, I've always preferred sitting at a table when I use it.

So, it's in fairly reasonable condition for its age. I agree, time remaining is like as not as good a way as any to measure things.....but percentages are what most of them seem to work on.

C'est la vie. :roll:


Mike. :)
Last edited by Mike Walsh on Tue 12 Jan 2016, 00:34, edited 1 time in total.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#5 Post by Mike Walsh »

@666philb:-

Must have missed this one, for all my searching earlier on. Looks good. Will let you know how I get on with it.

Thanks!


Mike.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#6 Post by Mike Walsh »

@666philb:-

Nice one, Phil! That's just what I was looking for; xbatalarm has installed nicely, and would appear to be working fine. Thanks.

@rcrsn51:-

Thanks for batterup, Bill. It, too, appears to be working nicely here on the Dell. I've installed yours and Phil's side-by-side; no conflicts that I can see. Much appreciated. Phil's will give me an alarm, but yours actually makes better sense for seeing how much time you've got left.

Cheers, guys. I'll mark this one as solved, for the benefit of others.....but I will post an update, over the next few days, to confirm that everything's OK.


Mike.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#7 Post by Mike Walsh »

Just to confirm; xbatalarm and batterup are both working well, playing quite happily together. No conflicts at all.


Mike. :)

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#8 Post by rcrsn51 »

With all battery monitors, the crucial issue is whether they give a warning at a meaningful time. What's happening in your situation?

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#9 Post by Mike Walsh »

@ rcrsn51:-

In my case, I have xbatalarm running on the default setting of 15% to trigger a warning pop-up.....although I have changed the frequency of the pop-up to 60 second intervals rather than every 30 seconds.

This corresponds, on average, to a 'time remaining' range of anywhere from 12 mins to 17 minutes, as reported by batterup (depending on what the Dell is doing at that time, of course). I'm satisfied with this; I let xbatalarm provide the 'critical' warning.....but I use batterup to monitor time remaining during a session. Which, as I said further back in the thread, to me, at any rate, actually seems more logical.

I do prefer to discharge my battery fairly thoroughly each time I use it, as I have found, by long experience, that lithium-ion batteries will hold a charge for longer by undergoing a fuller re-charge period on each occasion. I try not to give my battery too many 'partial' charges; l-ion batteries, despite claims to the contrary, still work in much the same way as the original Ni-Cads, and their successor, the NiMhs......except they will hold their 'state' of charge for far longer between sessions. Works for me, at any rate.

The way I use them, they complement each other very well. Thanks for providing batterup!


Mike.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#10 Post by rcrsn51 »

So do you never get to see Batterup's warning?

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#11 Post by Mike Walsh »

Uh-oh... Now I'm embarrassed; I'd already forgotten there was a low-time limit warning included... :roll: :oops:

Reading the batterup thread just now, I concur with sheldonisaac; I have seen 'BAT0; Stopped charging', upon charge completion. Upon removal of the charger, the count-down then commences, so that's all working as expected. What I shall do (tomorrow, or over the weekend, time permitting; it's 2.30am here currently, so I'm off to bed!) is to lower the percentage in xbatalarm to 10%, and if batterup's warning hasn't shown by then, I shall continue until it does. That should give me some idea of what %age figure corresponds to the 10-minute warning.

Will post back, and let you know what I find out, as & when.... Bear with me.


Regards,

Mike. :wink:

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#12 Post by Mike Walsh »

@ rcrsn51:-

Hallo, Bill. Just given batterup a full test. I set the xbatalarm 'alarm' level to 8% (down from the default 15%). I've been browsing, and listening to a .pls stream on PeasyMP3 at the same time. As expected, once below about 40%, the levels started dropping more rapidly....that's normal for this battery. At some point, I looked at batterup, and noticed '11 mins remaining'. Sure enough, a minute or so later, up came batterup's warning notification; I looked at the battery icon, and this corresponded to approximately 9%.

Moments later, up came another warning; 'Battery VERY low!".....accompanied by the Puppy 'Woof-woof!'

It always starts off round about 223-225 mins, although in practice I usually get somewhere in the region of 140-150 mins (2hrs 20 to 2hrs 30). You have to remember that this P4 pulls something like 65w; Dell fitted desktop CPUs in these old Inspirons for some reason; I think the original Pentium M's were only just beginning to come onto the market at that time.

To conclude, I'm very pleased with the combination of xbatalarm and batterup. Together, they do everything I originally wanted them to. Nice one. And thanks again.


Mike. :wink:

User avatar
gjuhasz
Posts: 422
Joined: Mon 29 Sep 2008, 14:28

Xbatalarm combined with powerapplet_tray

#13 Post by gjuhasz »

Hi,

For those cannot get powerapplet_tray working, I referenced it in xbatalarm.
Among other changes, I applied new icons and forced the right one to appear in the tray.
Changed the default alarm level to 10%.
Tested in Puli, probably works for other puppies, too.

As powerapplet_tray is a built-in feature in many puplets, I also created a bare xbat-p.pet, see http://murga-linux.com/puppy/viewtopic. ... &start=154

Have fun!

Regards,

gjuhasz

Edit: first upload of the attachment failed, uploaded again.
Edit2: after bugfix, uploaded again
Edit3 on 29 Jan: after bugfix and some uplift, uploaded again. Thanks for the feedbacks.
Attachments
xbat.pet
MD5sum: 754de17b66e4578b661a233ae1d9018c
(8.64 KiB) Downloaded 201 times
Last edited by gjuhasz on Sat 30 Jan 2016, 02:14, edited 7 times in total.

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#14 Post by B.K. Johnson »

@rcrsn51
What's the link for batterup?
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#15 Post by Mike Walsh »

Hi, B.K.

As far as I recall, the 'link' for batterup is that you need to request it from rcrsn51. Bill does things this way with a lot of the .pets that he creates, because it usually means that folk who do request an item are more likely to be serious about testing it out, and reporting back with results!

Hope that helps. Just drop him a request by PM if you'd like to try it out. That's usually all it takes. Be patient; it may take him a little while to get back to you.


Mike. :wink:

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#16 Post by B.K. Johnson »

Mike Walsh wrote:
...Bill does things this way with a lot of the .pets that he creates, because it usually means that folk who do request an item are more likely to be serious about testing it out, and reporting back with results!
It's not the puppy forum way. :? :roll:

With apologies to the iconic quote from W.P. Kinsella's Field of Dreams: "If you build it, he will come."
Bill, "If you build it, they will come." "If you expose it, they will hear of it[find it]; don't and it stays hidden." :)
Hope that helps. Just drop him a request by PM if you'd like to try it out. That's usually all it takes. Be patient; it may take him a little while to get back to you.
Sure clears the air. Thanks Mike. Had you not made reference to batterup, nobody would have heard of it. It seems you were invited via PM to try it. Perhaps protocol would dictate that your test reports should have also been made in private. Naughty Mike! :P (kidding of course) As my lappy isn't working at the moment, no PM to Bill. I would not want to upset him by taking too long to report results. I'll just make a note in my archives that batterup is available on request. :wink:
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#17 Post by Mike Walsh »

Hi again, BK.
B.K.Johnson wrote:It's not the puppy forum way. :? :roll:

With apologies to the iconic quote from W.P. Kinsella's Field of Dreams: "If you build it, he will come."
Bill, "If you build it, they will come." "If you expose it, they will hear of it[find it]; don't and it stays hidden." :)
Well, I wouldn't exactly say it's hidden.....after all, there is a thread about it in plain sight on the forum:-

http://www.murga-linux.com/puppy/viewtopic.php?t=91019

.....and it's in the 'Utilities' section, right where you'd expect to find it. He's not hiding the fact that it exists; just being selective about who gets to test it, that's all. Makes sense to pick folks who are more likely to report back, I would have thought. But that's just me.

Some people just have their eccentricities; that's the way Bill prefers to do it.....seems to work well enough. He has made a lot of very useful contributions to the Forums, there's no denying that. I, myself, am using at least 7 of his pets that I can think of off the top of my head; all small, but very useful 'utilities' of various sorts.....that have made Puppy even more usable, if that's possible..!


Mike. :wink:

User avatar
corvus
Posts: 153
Joined: Fri 12 Jun 2015, 18:00
Location: In the peninsula shaped like a boot.

xbat and acpitool

#18 Post by corvus »

G'day gjuhasz, I tried your xbat-p.pet on an ASUS X555L laptop with Xanad's T64_Light-k_4.1.3 EmSee_x86-64 an Italian version derived from 666philb's Tahrpup64, It works very well, great job, Bravo. :D
The only drawback is that the icon of powerapplet in the tray remains the default (same with xbat.pet).
I have a request it's possible to modify xbat so as to suspend the laptop with acpitool's -s option when it reaches to a particular discharge percentage and to include this option in the xbatalarm-config?

Regards. :)

corvus
[b]We are waves of the same sea, leaves of the same tree, flowers of the same garden.[/b]

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#19 Post by Karl Godt »

Here is a modified version that tries to care for battery and emit a xmessage GUI
of /sbin/pup_event_frontend_d .

It is still the old script style, not the current binary exe.

I attach it to give you an idea .
If you want to install it, you may get problems even if set executable .
You can test it by pup_event_frontend_d restart option .

In the editor search for lines containing "BAT_0_CURRENT" .

The idea occured to me to check for battery inside pup_event_frontend_d, since it also
checks for the POWERTIMEOUT variable set in /etc/eventmanager .
If pup_event_frontend_d checks for mousecounts, it could also check for battery status .
Attachments
pup_event_frontend_d.gz
heavily modified
(13.81 KiB) Downloaded 227 times
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal :P

User avatar
gjuhasz
Posts: 422
Joined: Mon 29 Sep 2008, 14:28

Re: xbat and acpitool

#20 Post by gjuhasz »

corvus wrote:The icon of powerapplet in the tray remains the default (same with xbat.pet). I have a request it's possible to modify xbat so as to suspend the laptop with acpitool's -s option when it reaches to a particular discharge percentage and to include this option in the xbatalarm-config?
Dear corvus,

Hm... I created xbat.pet to force tray icon based visualization - but tested with 32-bit puplets only on Dell and HP laptops. The icon changes according to the (dis)charging level going thru all statuses (see icons at /usr/share/pixmaps/puppy).
Please give me some time to check with a 64-bit puplet (possibly slacko64). Also, I will play with acpitool -s option, first in 32-bit version.

Have fun!

Regards,

gjuhasz

Post Reply