Battery Monitoring Dotpup for JWM
I tried this on an IBM Thinkpad 560Z 128MB 300MHz pII, Puppy2.14, but it didn't work.
I installed the .pup and then click the batmonsetup.sh, which responds :
It looks like the modules for your battery are not installed. Yes to load at boot. No to load yourself. First of all I tried yes to load on boot, and rebooted but nothing. Then I tried batmonsetup.sh again and this time no to load yourself, asked me about Toshiba which I replied no and then restarted JVM. A -% appears, and if I hover mouse over it gives aasdf, but no indicator for the battery level.
Any advice?
I did read similar problems on page1 but as the pup has been updated since then I wasn't sure if it still applied or if you had fixed all previous bugs. Please give easy instructions to follow . Thanks.
(if I type in console ls /proc/acpi/battery it says: no such file or directory )
I installed the .pup and then click the batmonsetup.sh, which responds :
It looks like the modules for your battery are not installed. Yes to load at boot. No to load yourself. First of all I tried yes to load on boot, and rebooted but nothing. Then I tried batmonsetup.sh again and this time no to load yourself, asked me about Toshiba which I replied no and then restarted JVM. A -% appears, and if I hover mouse over it gives aasdf, but no indicator for the battery level.
Any advice?
I did read similar problems on page1 but as the pup has been updated since then I wasn't sure if it still applied or if you had fixed all previous bugs. Please give easy instructions to follow . Thanks.
(if I type in console ls /proc/acpi/battery it says: no such file or directory )
sh-3.00# modprobe batteryHairyWill wrote:What do you get at the console if you do
modprobe battery
ls /proc/acpi
FATAL: Error inserting battery (/lib/modules/2.6.18.1/kernel/drivers/acpi/battery.ko): No such device
sh-3.00# ls /proc/acpi
ls: /proc/acpi: No such file or directory
sh-3.00#
It is running on battery and has been for 30 minutes as I type this.
I don't think your model does ACPI though you may be able to monitor the battery using APM.
Have at a look at thinkwiki
http://www.thinkwiki.org/wiki/Category:560Z
http://www.thinkwiki.org/wiki/How_to_make_APM_work
I have no experience using APM and batmon doesn't monitor APM batteries. According to the second link you need to boot with the kernel parameter
acpi=off
and then install apmd though I know nothing about that
good luck
you might want to start a new topic asking about apm
please report back anything that you find
Have at a look at thinkwiki
http://www.thinkwiki.org/wiki/Category:560Z
http://www.thinkwiki.org/wiki/How_to_make_APM_work
I have no experience using APM and batmon doesn't monitor APM batteries. According to the second link you need to boot with the kernel parameter
acpi=off
and then install apmd though I know nothing about that
good luck
you might want to start a new topic asking about apm
please report back anything that you find
-
- Posts: 286
- Joined: Tue 16 Aug 2005, 03:47
- Location: Appalachian Mountains
All you have to do is figure out how to tell what your battery status is.
From there you can edit the batmon.sh script to use your battery.
Do some digging around and see if you can figure out how to tell. It should be in the form of xxxxxx mAh or something like that ( inside a file ie (cat filename) ). Look in the /proc/?????? dir.
Post questions if you get lost. I will try to monitor this thread for the next few days.
It would be great if you we could figure out how to use APM with batmon....
I don't have a clue as my system has ACPI.....
From there you can edit the batmon.sh script to use your battery.
Do some digging around and see if you can figure out how to tell. It should be in the form of xxxxxx mAh or something like that ( inside a file ie (cat filename) ). Look in the /proc/?????? dir.
Post questions if you get lost. I will try to monitor this thread for the next few days.
It would be great if you we could figure out how to use APM with batmon....
I don't have a clue as my system has ACPI.....
you could try using gkrellm
http://www.murga-linux.com/puppy/viewto ... 930&t=1588
This does have APM support.
If you edit the displayed data so that it only shows the battery I think it is possible to get it to swallow inside the jwm tray.
If gkrellm can't monitor your battery you might want to see if conky can, though it won't go in the tray it might give you some clues
http://www.murga-linux.com/puppy/viewto ... 92&t=16392
http://www.murga-linux.com/puppy/viewto ... 930&t=1588
This does have APM support.
If you edit the displayed data so that it only shows the battery I think it is possible to get it to swallow inside the jwm tray.
If gkrellm can't monitor your battery you might want to see if conky can, though it won't go in the tray it might give you some clues
http://www.murga-linux.com/puppy/viewto ... 92&t=16392
Thanks, I've tried both of those, but I can't see anything for battery in either - I have looked for an option to display battery but can't see anything to tick. I thought if it didn't work it would still have something showing 'Battery' but just not registering, but I can't see anything refering to battery in either of the running packages. Any ideas ?HairyWill wrote:you could try using gkrellm
http://www.murga-linux.com/puppy/viewto ... 930&t=1588
This does have APM support.
If you edit the displayed data so that it only shows the battery I think it is possible to get it to swallow inside the jwm tray.
If gkrellm can't monitor your battery you might want to see if conky can, though it won't go in the tray it might give you some clues
http://www.murga-linux.com/puppy/viewto ... 92&t=16392
-
- Posts: 286
- Joined: Tue 16 Aug 2005, 03:47
- Location: Appalachian Mountains
and if that works type
This should give you the output you are looking for.
You could try it before as well. It may work...
Code: Select all
apm
You could try it before as well. It may work...
For any Puppy developers who want to know, the inbuilt DSL linux desktop system monitors show an accurate indication of my battery power remaining. It is a nicely designed inbuilt system monitor that sits in the very top left of the desktop and shows some useful info (in this case the battery has just been fully charged to 99%)
It is called Torsmo and here is the web page
http://torsmo.sourceforge.net/
If I knew how to I would develop it as a pup, but that is way beyond me.
Thanks all for the input but this is a bit beyond me so I'll just do without for now.
It is called Torsmo and here is the web page
http://torsmo.sourceforge.net/
If I knew how to I would develop it as a pup, but that is way beyond me.
Thanks all for the input but this is a bit beyond me so I'll just do without for now.
Excellent. That displays the battery level perfectly, along with the other info but blinked every 5 secs when it updated, so I changed the update to 2 mins as described here :
http://www.murga-linux.com/puppy/viewto ... 72&t=15400
. Thanks.
To satisfy my/our curiosity in exchange for the advice given.
Please can you type "apm" in a console and post the output here, maybe we could make batmon apm aware. Also it would be interesting to see what you get for "ls /proc/apm"
It is interesting that torsmo works when conky didn't as conky is a fork of the no longer developed torsmo. I presume one of the things they have changed is the APM support, unless this is controlled at compile time.
<edit>conky does support APM so I'm unsure why it didn't work in this case</edit>
Please can you type "apm" in a console and post the output here, maybe we could make batmon apm aware. Also it would be interesting to see what you get for "ls /proc/apm"
It is interesting that torsmo works when conky didn't as conky is a fork of the no longer developed torsmo. I presume one of the things they have changed is the APM support, unless this is controlled at compile time.
<edit>conky does support APM so I'm unsure why it didn't work in this case</edit>
Last edited by HairyWill on Fri 13 Apr 2007, 08:04, edited 1 time in total.
Certainly, I'll watch the post for a few days, so post if you want any more info / terminal results / details ...... (just give me beginner instructions.) I wasn't sure whether conky worked or not - I just couldn't see anything referring to 'battery' anywhere ? If it was hidden somewhere? One reading on conky, MPD, said MPD not responding, I'm not sure what that means ?
sh-3.00# apm
sh: apm: command not found
sh-3.00# ls /proc/apm
/proc/apm
sh-3.00#
How can I easily confirm if the laptop uses ACPI or APM ?
sh-3.00# apm
sh: apm: command not found
sh-3.00# ls /proc/apm
/proc/apm
sh-3.00#
How can I easily confirm if the laptop uses ACPI or APM ?
As you have a file /proc/apm I think you can assume apm support. My laptop does acpi and has a directory in /proc called acpi with a whole load of files inside containing system info.setecio wrote:One reading on conky, MPD, said MPD not responding, I'm not sure what that means ?[/qote]I think that stands for Music Player Daemon
http://www.musicpd.org/
this isn't included in vanilla puppy and I don't think I've ever seen a dotpup / pet for itsorry I think I meantsh-3.00# ls /proc/apm
/proc/apmCode: Select all
cat /proc/apm
How can I easily confirm if the laptop uses ACPI or APM ?
thanks for that
After I posted last a light bulb came on in my head.
Just because I have acpi it doesn't mean I have to use it.
I changed my kernel boot parameters to include
acpi=off apm=on
and bingo I'm now using apm. For test purposes only as acpi is much more powerful.
so on battery I getand on charge I getFor the record I didn't need to modprobe apm the module was loaded automatically.
After I posted last a light bulb came on in my head.
Just because I have acpi it doesn't mean I have to use it.
I changed my kernel boot parameters to include
acpi=off apm=on
and bingo I'm now using apm. For test purposes only as acpi is much more powerful.
so on battery I get
Code: Select all
sh-3.00# cat /proc/apm
1.16ac 1.2 0x03 0x00 0x00 0x01 55% 29 min
Code: Select all
sh-3.00# cat /proc/apm
1.16ac 1.2 0x03 0x01 0x03 0x09 52% -1 ?
Last edited by HairyWill on Fri 13 Apr 2007, 01:32, edited 1 time in total.
To make batmon work for apm try replacing the contents of /root/my-applications/bin/batmon.sh with the following. Leaving Brads copyright intact of course.To make a batmon that supports apm and acpi just requires a test for /proc/apm or /proc/acpi before deciding which code to use.
Code: Select all
per=`awk '{print $7}' /proc/apm | awk -F % '{print $1}'`
if [ $per -lt "6" ]; then
if [ "`cat /tmp/batmon.warn.txt | grep warned`" == "" ]; then
Xdialog --msgbox "WARNING! Your battery is low." 0 0 &
echo "warned" >> /tmp/batmon.warn.txt
fi
fi
if [ $per -gt "5" ]; then
rm /tmp/batmon.warn.txt 2> /dev/null
fi
if [ `awk '{print $8}' /proc/apm` -gt 0 ]
then
acon="-"
else
acon="+"
fi
echo -n "${acon}${per}%"