Battery monitor for Dingo Alpha5

Stuff that has yet to be sorted into a category.
Message
Author
disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#31 Post by disciple »

I guess this belongs here rather than a Dingo thread:
This runs automatically on my desktop pc (which has no battery) in Dingo alpha 7, but not alpha 6. My quick read of this thread suggests that it shouldn't run for me. Is this correct?
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#32 Post by kirk »

This runs automatically on my desktop pc (which has no battery) in Dingo alpha 7, but not alpha 6. My quick read of this thread suggests that it shouldn't run for me. Is this correct?
Yes and no, it does run at boot, but should not show up in the tray. I didn't think there was any changes between alpha 6 and alpha 7 that would effect it. If you have some time to investigate, first try booting up with the "puppy pfix=ram" option so we can make sure it's not something in your pup_save file. If it still shows up in the tray then I need some more info:

1) Are you booting with any acpi=XXXXXX boot options?

2) Open a terminal and type:

lsmod

Post the output here. To copy from rxvt, highlight the text and then hold down the shift key and hit the delete key.

3) From the terminal type:

ls /proc/acpi/battery

and post the output, if any, here.

4) If ls /proc/acpi/battery gave you BAT0 and or BAT1, then from the terminal type:

cat /proc/acpi/battery/BAT0/*

also do BAT1 if it was listed and post the output here.


Thanks

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#33 Post by disciple »

Yes, it still shows up with pfix=ram
1. No
2. # lsmod
Module Size Used by
lp 12616 0
snd_mixer_oss 16896 0
snd_seq_midi 8736 0
snd_seq_midi_event 7296 1 snd_seq_midi
snd_opl3_synth 15108 0
snd_seq_instr 7552 1 snd_opl3_synth
snd_seq_midi_emul 6784 1 snd_opl3_synth
snd_seq 48080 5 snd_seq_midi,snd_seq_midi_event,snd_opl3_synth,snd_seq_instr,snd_seq_midi_emul
snd_ainstr_fm 2560 1 snd_opl3_synth
tulip 51360 0
usblp 14080 0
apm 20304 0
lmc 28808 0
syncppp 16188 1 lmc
fm801_gp 4224 0
snd_fm801 19424 0
snd_tea575x_tuner 3840 1 snd_fm801
videodev 27904 1 snd_tea575x_tuner
v4l2_common 16896 1 videodev
v4l1_compat 14596 1 videodev
snd_opl3_lib 10624 2 snd_opl3_synth,snd_fm801
snd_hwdep 9220 1 snd_opl3_lib
snd_via82xx 28056 0
gameport 14856 3 fm801_gp,snd_via82xx
snd_ac97_codec 101668 2 snd_fm801,snd_via82xx
ac97_bus 2304 1 snd_ac97_codec
snd_pcm 75656 3 snd_fm801,snd_via82xx,snd_ac97_codec
snd_timer 22020 3 snd_seq,snd_opl3_lib,snd_pcm
snd_page_alloc 10120 2 snd_via82xx,snd_pcm
snd_mpu401_uart 8320 2 snd_fm801,snd_via82xx
snd_rawmidi 23584 2 snd_seq_midi,snd_mpu401_uart
snd_seq_device 8460 5 snd_seq_midi,snd_opl3_synth,snd_seq,snd_opl3_lib,snd_rawmidi
snd 52068 15 snd_mixer_oss,snd_opl3_synth,snd_seq_instr,snd_seq,snd_fm801,snd_tea575x_tuner,snd_opl3_lib,snd_hwdep,snd_via82xx,snd_ac97_codec,snd_pcm,snd_timer,snd_mpu401_uart,snd_rawmidi,snd_seq_device
soundcore 7520 1 snd
i2c_viapro 9236 0
i2c_core 22032 1 i2c_viapro
parport_pc 31716 1
parport 35528 2 lp,parport_pc
via_agp 10240 1
agpgart 34128 1 via_agp
fuse 44052 0
unionfs 83732 1
nls_iso8859_1 4224 2
nls_cp437 5888 2
usbhid 24928 0
usb_storage 83264 0
ehci_hcd 31116 0
ohci_hcd 21252 0
uhci_hcd 24076 0
usbcore 127128 7 usblp,usbhid,usb_storage,ehci_hcd,ohci_hcd,uhci_hcd
sr_mod 17188 0
ide_cd 39200 0
cdrom 36768 2 sr_mod,ide_cd
squashfs 46856 1

3. # ls /proc/acpi/battery
ls: cannot access /proc/acpi/battery: No such file or directory
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#34 Post by kirk »

Thanks for that. Looks like the the apm module is loaded. How old is your computer? Anyway, alpha7 changed to an older kernel. Maybe that kernel has a problem with the apm module or maybe this will be a common problem with apm computers.

Edit /root/.jwmrc-tray, you'll see this on line 23:

asapm -u 4

Change it to :

asapm -acpi -u 4

Save and then restart JWM.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#35 Post by disciple »

Yes, that made it go away.
Computer is 7 years old, but actually has ACPI support anyway. I'm not sure why Puppy doesn't realise that.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#36 Post by kirk »

Thanks for the feedback,

Hopefully we won't have to resort to that fix, since it just disables the battery monitor for apm. There may be a number of laptops around, that are over seven years old and would miss the battery monitor.

Barry was looking for 2.6.25 for Puppy 4 final, so maybe this is just a problem with with the apm module in 2.6.21.7. If not we could disable apm as I posted above or try to figure out when we're on a laptop if apm is loaded. I don't have a laptop that supports apm, so it's hard to test.

If one of the beta versions of Dingo gets a newer kernel would you mind giving more feedback?

Thanks again.

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#37 Post by HairyWill »

kirk wrote:I don't have a laptop that supports apm, so it's hard to test.
Try booting with acpi=off apm=on
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#38 Post by kirk »

kirk wrote:
I don't have a laptop that supports apm, so it's hard to test.

Try booting with acpi=off apm=on
Yes, I tried that. The apm module won't load.

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#39 Post by Dougal »

The guy who originally wrote asapm made it refresh the display 100 times a second! Much more than we need.
I fixed it to something more reasonable, so it wakes up the cpu less.
Last edited by Dougal on Sun 12 Apr 2009, 09:57, edited 1 time in total.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

Lanin
Posts: 11
Joined: Sat 10 May 2008, 02:19

#40 Post by Lanin »

I'm running Dingo on a Compaq Presario 1200, and I've tried all the configurations mentioned, and two different battery monitors. It appears that the monitors work fine, but the OS is just not recognizing my battery.

I'd send you the results of running lsmod, but the copy function you've discussed in rxvt doesn't work, either.

Edit: I did start up Windows and check, and I have an acpi battery.

kilakev
Posts: 7
Joined: Fri 01 Aug 2008, 06:56

#41 Post by kilakev »

I'm having the same problem as Lanin. I have a Compaq Presario 1200. The battery monitor shows up but only shows that it's connected the AC even if it isn't connected. I tihnk that it doesn't recognize my battery. I've done the modprobe battery and mod probe AC and both come up with these error messages:

FATAL: Error inserting ac (/lib/modules/2.6.21.7/kernel/drivers/acpi/ac.ko): No such device

and

FATAL: Error inserting battery (/lib/modules/2.6.21.7/kernel/drivers/acpi/battery.ko): No such device

Any help would be apreciated

-KiLaKeV

kilakev
Posts: 7
Joined: Fri 01 Aug 2008, 06:56

#42 Post by kilakev »

bump... i really need help with this since i don't know how long my battery lasts and it keeps just dying on me....

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#43 Post by kirk »

It looks like the Compaq Presario 1200 may only have apm. I googled it and it looks like it was made 1999-2000, I think acpi came out in 1999, so might not have it.. That's probably why the battery and ac modules won't load. Though Lanin says Windos is showing an acpi battery. You could try booting with acpi=force , just in case you do have acpi in there. You could also try one of the 4.1alphas. Puppy 4.1 has better hardware recognition.

Warning: On a laptop, when you start playing with acpi and apm, your cooling fan(s) might not work. So make sure your laptop is making all the normal noises.

Edit : Changed acpi=forced to acpi=force.
Last edited by kirk on Wed 06 Aug 2008, 21:05, edited 1 time in total.

Lanin
Posts: 11
Joined: Sat 10 May 2008, 02:19

#44 Post by Lanin »

I've done some looking on my own, and it appears that there is a general problem with the Compaq Presario 1200 and Linux. The machine was engineered to house Windows, and the BIOS doesn't play well with Linux in any form. Microsoft even had to issue a patch for XP before it would recognize the battery.

I'll try the booting with acpi=forced. Where do I enter that in?

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#45 Post by kirk »

If you're booting from CD, when the CD starts to boot, you're given a chance to enter boot options. Type puppy acpi=force.

If you're using grub, add it to the line that points to the kernel. Example:

kernel /puppy400/vmlinuz acpi=force

Lanin
Posts: 11
Joined: Sat 10 May 2008, 02:19

#46 Post by Lanin »

IT WORKS! Now I've got two battery meters, and they both work. Thank you, oh, thank you!

Take note, kilakev.

kilakev
Posts: 7
Joined: Fri 01 Aug 2008, 06:56

#47 Post by kilakev »

Mine is still not working. I tried the acpi=force boot option into the grub kernal line and now the battery monitor doesn't even show up. When i try the #asapm command i get this:

# asapm
asapm: open_apm_device_file: The file does not exist.
asapm: Neither ACPI nor APM are available!

in lsmod i get a "ac" and a "battery" but no acpi or apm modules.

I tried adding -acpi to the jwmtray but stil no luck.

anyone have any tips?

kilakev
Posts: 7
Joined: Fri 01 Aug 2008, 06:56

#48 Post by kilakev »

does the battery monitor simply not work with apm?

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#49 Post by kirk »

Open a terminal and type modprobe apm, then restart X. Again, make sure your fans work normally if you keep it this way.

Unfortunately your laptop was manufactured at about the same time that the acpi specification came out, so I'm not sure if it has acpi or apm or both. Looks like Lanin's has acpi.

kilakev
Posts: 7
Joined: Fri 01 Aug 2008, 06:56

#50 Post by kilakev »

I did the modprobe apm and the battery monitor shows up but it still only shows the ac icon lit up even when it's running on battery....

i'm gonna try to find out if i have an acpi battery...

Post Reply