LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices



Reply
 
Search this Thread
Old 11-30-2011, 01:12 PM   #1
prabhuraj
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, 06:53 PM   #2
padeen
Member
 
Registered: Sep 2009
Location: Perth, W.A.
Distribution: Slackware 14, Debian 7, FreeBSD, OpenBSD
Posts: 182

Rep: Reputation: 35
"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.)
 
  


Reply


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 06:45 PM
Battery indicator for Openbox? mjjzf Linux - Hardware 1 02-01-2008 09:25 AM
acer laptop battery indicator LinuxLala Linux - Hardware 4 04-17-2006 08:29 AM
IntelliMouse Battery Indicator jcook793 Linux - Hardware 0 08-23-2004 08:55 AM
Notebook battery indicator PlatinumRik Linux - Software 2 08-12-2003 09:57 PM


All times are GMT -5. The time now is 10:31 PM.

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