Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-30-2011, 12:12 PM   #1
LQ Newbie
Registered: Aug 2011
Posts: 26

Rep: Reputation: Disabled
apm - battery indicator in linux

Hi all,
I am working on a module where in I have to read the power value (battery status) and pass the value to Gui. The linux box is using APM and typically if "cat /proc/apm" is used, then it should give all the info but in my case it is not happening. I also tried to open the driver and do ioctl to read the power value using C code but I am getting power value as '0'. There is no problem with the driver and when I do "top" I can see a PID with kapmd using the CPU resources.
Any suggestions regarding this?
Old 12-01-2011, 05:53 PM   #2
Registered: Sep 2009
Location: Perth, W.A.
Distribution: Slackware 14, Debian Sid, FreeBSD 10, OpenBSD
Posts: 195

Rep: Reputation: 38
"tried to open the driver ". What driver?

If you are using apm then I guess this is a very old machine. Does the battery even report its status (maybe it is just a dumb old battery with no smarts). Can you try using some other utility that reports battery life just to see if that one works.

(Also, is this a kernel module you are writing? Very Bad Idea to use any X or GUI code within a kernel module.)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
No battery indicator in Linux on my dual boot laptop dluzius Linux - Newbie 2 11-24-2011 05:45 PM
Battery indicator for Openbox? mjjzf Linux - Hardware 1 02-01-2008 08:25 AM
acer laptop battery indicator LinuxLala Linux - Hardware 4 04-17-2006 07:29 AM
IntelliMouse Battery Indicator jcook793 Linux - Hardware 0 08-23-2004 07:55 AM
Notebook battery indicator PlatinumRik Linux - Software 2 08-12-2003 08:57 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:19 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration