| Author |
Message |
pakt

Joined: 04 Jun 2005 Posts: 1089 Location: Sweden
|
Posted: Sat 04 Nov 2006, 12:00 Post subject:
|
|
Rickrandom, what do you get if you run:
# ls /proc/acpi/battery/
I get 'BAT0 BAT1'
If you get 'BAT0', then run:
# cat /proc/acpi/battery/BAT0/state
What does that show?
_________________ Testing Puppy since v0.9.2 - my desktop OS since v1.0.7
Running SlaxerPup-4.12 - Puppy with a Slackware 12.2 heart 
|
|
Back to top
|
|
 |
Rickrandom
Joined: 21 Jan 2006 Posts: 195 Location: Bedfordshire, UK
|
Posted: Sat 04 Nov 2006, 13:01 Post subject:
|
|
I get:
sh-3.00# ls /proc/acpi/battery/
BAT1
sh-3.00# cat /proc/acpi/battery/BAT1/state
present: no
sh-3.00# cat /proc/acpi/battery/BAT01/state
cat: /proc/acpi/battery/BAT01/state: No such file or directory
sh-3.00#
sh-3.00# cat /proc/acpi/battery/BAT0/state
cat: /proc/acpi/battery/BAT0/state: No such file or directory
sh-3.00#
I managed to type BAT01 once
|
|
Back to top
|
|
 |
pakt

Joined: 04 Jun 2005 Posts: 1089 Location: Sweden
|
Posted: Sat 04 Nov 2006, 14:01 Post subject:
|
|
| Rickrandom wrote: | I get:
sh-3.00# ls /proc/acpi/battery/
BAT1
sh-3.00# cat /proc/acpi/battery/BAT1/state
present: no
sh-3.00# cat /proc/acpi/battery/BAT0/state
cat: /proc/acpi/battery/BAT0/state: No such file or directory
sh-3.00#
|
Strange that you don't get BAT0. That should be your main battery.
Many laptops can be fitted with a second battery, e.g. in place of the CD drive to increase battery running time. I believe BAT1 is a reference to that second battery. In your case, as in most cases, it isn't present.
I really don't know why BAT0 doesn't show up. This is why you are getting '-%'.
This is what I get on my Dell Inspiron 510m:
| Code: | # ls /proc/acpi/battery/
BAT0 BAT1
# cat /proc/acpi/battery/BAT0/state
present: yes
capacity state: ok
charging state: charged
present rate: unknown
remaining capacity: 32000 mWh
present voltage: 16157 mV
# cat /proc/acpi/battery/BAT1/state
present: no |
Paul
_________________ Testing Puppy since v0.9.2 - my desktop OS since v1.0.7
Running SlaxerPup-4.12 - Puppy with a Slackware 12.2 heart 
|
|
Back to top
|
|
 |
marksouth2000
Joined: 05 Apr 2006 Posts: 620
|
Posted: Sat 04 Nov 2006, 20:32 Post subject:
|
|
One cannot assume that a sole battery will be BAT0. The machine I'm typing this from has one battery, listed as BAT1.
I guess one needs to take the first entry returned from | Code: | | ls /proc/acpi/battery/ | as being the main battery, rather than assuming BAT0.
|
|
Back to top
|
|
 |
brad_chuck
Joined: 15 Aug 2005 Posts: 284 Location: Appalachian Mountains
|
Posted: Sat 04 Nov 2006, 20:55 Post subject:
The script does this |
|
Rickrandom, can you type
| Code: | | ls /proc/acpi/battery/BAT1 |
and post the output?
Then for all the files in that dir type
| Code: |
cat /proc/acpi/battery/BAT1/filename
|
About your ideas... They sound great. When I get more work done all this can be done with a shell script.
It is bad when your are using a live CD because as of right now your laptop will just turn off! Ouch!
marksouth2000, That is what the script does now. Whatever the first dir in /proc/acpi/battery/ is the one that it uses. I also have BAT1 ?????
|
|
Back to top
|
|
 |
Rickrandom
Joined: 21 Jan 2006 Posts: 195 Location: Bedfordshire, UK
|
Posted: Sun 05 Nov 2006, 06:27 Post subject:
|
|
Ok, did as you asked, after a bit of mis-typing:
sh-3.00# modprobe battery
sh-3.00# ls /proc/acpi/battery
BAT1
sh-3.00# ls /proc/acpi/battery/BAT1
alarm info state
sh-3.00# cat /proc/acpi/battery/BAT1/alarm
present: no
sh-3.00# cat /proc/acpi/battery/BAT1/info
present: no
sh-3.00# cat /proc/acpi/battery/BAT1/state
present: no
sh-3.00# modprobe ac
sh-3.00# ls /proc/acpi/ac
ls: /proc/acpi/ac: No such file or directory
sh-3.00# ls /proc/acpi/ac_adaptor
ls: /proc/acpi/ac_adaptor: No such file or directory
sh-3.00# ls /proc/acpi/ac_adapter
ACAD
sh-3.00# ls /proc/acpi/ac_adaptor/ACAD
ls: /proc/acpi/ac_adaptor/ACAD: No such file or directory
sh-3.00# ls /proc/acpi/ac_adapter/ACAD
state
sh-3.00# cat /proc/acpi/ac_adapter/ACAD/state
state: off-line
sh-3.00#
|
|
Back to top
|
|
 |
brad_chuck
Joined: 15 Aug 2005 Posts: 284 Location: Appalachian Mountains
|
Posted: Sun 05 Nov 2006, 10:46 Post subject:
try this |
|
Ok, well this means that your kernel module is not loading. So we need to work on that.
Try one more thing.......
reboot and use
| Code: |
insmod battery
insmod ac
|
see if anything changes. When it works it will work so you can use batmon to test if your module is loaded. No need to type all that junk in the console.
What version of Puppy are you using?
Thank you for your patience.
|
|
Back to top
|
|
 |
Rickrandom
Joined: 21 Jan 2006 Posts: 195 Location: Bedfordshire, UK
|
Posted: Sun 05 Nov 2006, 12:56 Post subject:
|
|
sh-3.00# insmod battery
insmod: can't read 'battery': No such file or directory
sh-3.00# insmod ac
insmod: can't read 'ac': No such file or directory
sh-3.00# modprobe battery
sh-3.00# insmod battery
insmod: can't read 'battery': No such file or directory
sh-3.00# modprobe ac
sh-3.00# insmod ac
insmod: can't read 'ac': No such file or directory
I'm using Puppy 2.10, booting from CD, with a pupsave file on the NTFS hard drive.
If you want me to look in the BIOS or elsewhere for anything, let me know, but I've no idea what to look for.
|
|
Back to top
|
|
 |
marksouth2000
Joined: 05 Apr 2006 Posts: 620
|
Posted: Sun 05 Nov 2006, 13:37 Post subject:
Re: The script does this |
|
| brad_chuck wrote: | | marksouth2000, That is what the script does now. Whatever the first dir in /proc/acpi/battery/ is the one that it uses. I also have BAT1 ????? |
Thanks brad_chuck. It's very rare for my feedback ever to get an acknowledgement, let alone result in a change in the code, so I'm over the moon to hear this!
Cheers,
Mark
|
|
Back to top
|
|
 |
brad_chuck
Joined: 15 Aug 2005 Posts: 284 Location: Appalachian Mountains
|
Posted: Mon 06 Nov 2006, 09:13 Post subject:
Try this! |
|
Rickrandom, You almost have me stumped. But try to boot the CD with the startup option "puppy prefix=ram". If you can't do that make a new CD and boot that.
Then boot and try the batmon-0.0.2.tar.gz
Report results...
Just a note I have batmon-0.1.0 80% done.
|
|
Back to top
|
|
 |
amish
Joined: 24 Sep 2006 Posts: 616
|
Posted: Mon 06 Nov 2006, 09:35 Post subject:
Re: Try this! |
|
sadly i'm not going to be able to test this, because i won't have access to the machine i did the script on. (my laptop has power management turned off)
_________________ sadly, it is not possible to separate politics from free software. free software - politics = unfree software.
|
|
Back to top
|
|
 |
kirk
Joined: 11 Nov 2005 Posts: 1333 Location: florida
|
Posted: Sun 12 Nov 2006, 22:44 Post subject:
|
|
Tried batmon-0.0.2.tar.gz in 212beta2. Does not display in the tray, Shows up on the desktop.
|
|
Back to top
|
|
 |
brad_chuck
Joined: 15 Aug 2005 Posts: 284 Location: Appalachian Mountains
|
Posted: Mon 13 Nov 2006, 16:17 Post subject:
hi kirka |
|
Yes, It will if you just run the exec. Check out the first post. Use the instructions to install it.
I have not put this into dotpup format yet because I don't think it is ready.
|
|
Back to top
|
|
 |
kirk
Joined: 11 Nov 2005 Posts: 1333 Location: florida
|
Posted: Mon 13 Nov 2006, 18:05 Post subject:
|
|
| Quote: | | Use the instructions to install it. |
Yep, I missed line. Sorry.
Now it switches between free memory and a long line of strange symbols.
/proc/acpi/battery/BAT0/state:
| Quote: | present: yes
capacity state: ok
charging state: charging
present rate: unknown
remaining capacity: 33310 mWh
present voltage: 16886 mV
|
I liked your original batmon with the seperate tray display. Could you re-post it?
Thanks
|
|
Back to top
|
|
 |
brad_chuck
Joined: 15 Aug 2005 Posts: 284 Location: Appalachian Mountains
|
Posted: Mon 13 Nov 2006, 21:37 Post subject:
yes |
|
Another user requested it a while back. It is posted about half way down on the second page of this "topic".
I also prefer the no switching... This is the one I am using now.
|
|
Back to top
|
|
 |
|