Laptop Power Management - Battery
Compaq Armada E500 running Slackware 10.1 and KDE
I was wondering how my battery was doing. I didn’t want to boot into Windows to find out. How to do this in Linux on the above stated equipment/OS/Desktop?
- KDE Menu/Control Center/Power Control/Laptop Battery. If you see you see some graphics there that look like batteries and a Current Battery Status, you will be able to tell how your battery is doing. You can put a check by “Show Battery Monitor” to dock it in the Panel.
- If you see “Your computer doesn’t have the Linux APM…” you might find that the solution is as simple as it was for me: as root do ‘modprobe apm’ and that loads it. After that the Battery Monitor works nicely and shows me that my laptop is now charging.
- Make it permanent by editing /etc/rc.d/rc.modules and uncomment the line for APM: ‘/sbin/modprobe apm’ Then it will load when the system boots.
- Slackware’s files are set up a bit differently than other Linux distros, but the idea should be basically the same.
Same Machine with Debian Sid and Kernel 2.6.12
Introduction: I had the Battery Monitor working on Debian Sarge with 2.4 kernel. I used apm and found that I needed to also install lm-sensors and i2c. These could be found at the Debian repositories and I chose the ones with the same suffix as my kernel.
So, I upgraded to Debian unstable (Sid) and then got the 2.6.12 kernel. I noticed immediately that the battery monitor no longer worked. I’ll spare you the details of how I found the solution. First thing to know is that lm-sensors and i2c are now kernel modules. I looked for the modules with the suffix 2.6.12 and could not find them. At http://www.lm-sensors.nu in FAQ 3.3 I found that I should run:
#sensors-detect
This did a series of probes and came up with the modules I needed to be loaded. It then offered to write them for me into /etc/modules.
Part two was to load the apm module. For some reason that wasn’t loading even though I’m running apmd. I found out it wasn’t running when I installed another program and got the message that apm was not loaded. My theory is that apmd failed to load the module, because the lm-sensors and i2c modules were not loaded. At any rate ‘apm’ was appended at the bottom of /etc/modules and when that module was loaded, the battery monitor went from an empty thing saying 0% to a nice green thing showing a full charge like it was.
For the curious, the two modules that sensors-detect showed that I needed were: eeprom and i2c-piix4
— Anita Lewis 2005/09/06 00:30
Copyright (c) by the authors.
Prior to editing, authors agreed to license their contributions by the terms of the GPL.
See our licensing page for details.
Linux® is a registered trademark of Linus Torvalds.
tutorials/using/power_management_and_battery.txt · Last modified: 2008/07/20 19:08
Welcome to LinuxBasics.org - The online community that helps people to get Linux installed and running.
During this tour, we will guide you through our website, which has many facets which wait to be explored
The biggest project we are running is our Linux course, based on the LBook.
The book is stored in wiki-format, which enables us to update and correct it as we go.
Discussion for the course is on our Forum
Our Forum is used for discussion of Linux and for questions and answers.
Search the mailing-list that was used prior to the Forum.
The questions and answers from the list are stored in the list's archives in order to help others with the same problems.
Every weekend, we meet to chat in IRC. These meetings are NOT mandatory, but are a nice chance to get to know each other better.
IRC is also a great tool to solve many problems, since it is very quick and easy to ask for more details if you need them.
The tutorials are one of the oldest sections on the LBo-website.
Here you find explanations on how to do specific tasks in Linux. Many of the tutorials were created after a certain problem
has been discussed (and usually solved :) on the mailing-list.
The tutorials are categorized in
In the links section, you find outbound links to other valuable resources.
One of our later additions to the site. We maintain a mirror of the Linux Documentation Project. This is our contribution to the "home of the HOWTOs"
Another later addition is the LBlog which focuses on how to do stuff on the Linux Desktop. It begins with the basics on installing Ubuntu.
Using the integrated site-search, you can search the tutorials, the LBook and all other wiki-pages
Simply type the search term into the box in the upper-right corner of our webpages
As a community, we depend on your feedback and collaboration. So, if you have something to share with others, please contact us. If you have a suggestion for a topic you would like to see covered here, please add it on the Wishlist.
There are many ways to contribute: You can answer questions on the Forum, you can write a complete tutorial or just a step-by-step documentation on how you completed a specific task using linux. Ask questions if the information on this site is not clear, tell us if we got something wrong, spell-check our writings, whatever.
We are looking forward to meeting you at LinuxBasics.org
Anita, Jisao, Sam and Stefan