# laptop battery

## jere890

hey all,

i am a linux n00b and have a question im sure will seem silly. in linux is there a way i can see how much battery power is left when i am running on the battery. this would be very helpful as it would let me put in my other battery and save everything so that it wouldn't just shut off. is there hope for this or am i flat out of luck.

thanks

----------

## BitJam

There are a lot of options available.   You may need to recompile your kernel for laptop support.  Take a look under "Proccessor type and features".  You may also need to use either apm or acpi (under  "General Setup").

I currently have two ways of showing my laptop battery status: gkrellm and klaptop (comes with kde). 

Either of them can give me an alert if the battery runs and and then automatically put me into suspend mode if the battery situation gets critical. This has saved me from hard crashes a couple of times when my laptop was unplugged and I didn't know it.

I am using apm because even though I was able to get acpi working it didn't support the suspend feature (on my laptop with the gs-2.4.22 sources).

If you don't want to use the two solution I'm using there are many other options in portage.  An esearch -S -c battery gives these results: 

```
 [N] xbatt (1.2.1):  Notebook battery indicataor for X

[ N] power-applet (0.2):  GNOME Panel applet that shows the battery state on notebooks

[ N] battstat (2.0.13):  Battstat Applet, GNOME battery status applet.

[ N] acpi (0.06-r5):  Attempts to replicate the functionality of the 'old' apm command on ACPI systems, including battery and thermal information.

[ N] xbattbar (1.4.2):  Advanced Power Management battery status display for X

[MN] wmbatppc (1.0-r1):  wmbatppc is a small battery-monitoring dockapp. It works on G3/G4 Powerbooks and iBooks.

[ N] wmapm (3.1-r1):  WindowMaker DockApp: Battery/Power status monitor for laptops

[ N] wmbattery (1.2.1-r1):  A dockable app to report APM battery stats.

[ N] wmapmload (0.3.0):  dockapp that monitors your apm battery status.

[ U] xfce4-battery (0.2.0):  Xfce4 panel battery monitor plugin 
```

----------

## Sketchy

i just have to wait for my internal speaker to start beeping wildly and then save everything quickly as whatever i do i just can't seem to get the gnome applet to work it just stays blank the whole time...

----------

## jere890

thanks, but why am i having probelms getting either power applet or battstat to emerge

!!! Error: the gnome-base/gnome-session package conflicts with another package.

!!!        both can't be installed on the same system together.

!!!        Please use 'emerge --pretend' to determine blockers.

any ideas?

----------

## jere890

i was trying to configure battstat and got this error:

checking for apm_read in -lapm... no

configure: error: *** libapm not found.

whats this mean and how do i correct it?

thanks for any help

----------

## dave_euser

make sure you've emerged apmd, and have the kernel modules ready to go for apm support.....

does /proc/apm exist?

----------

## jere890

ive got the battstat applet shoing but it says that battery has no charge and dosnt show that it is plugged in... any way to reset it or soemthing. when i plug my laptop and run of battery it dosn't change.

----------

