LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-18-2011, 05:18 PM   #1
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Please explain acpi and similar battery status reports


There are various commands and apps that will read and report the status of a laptop battery. I don't believe that the battery has smart-parts that software can query, so:

where are the smarts that know what is going on with the battery?

Do these smarts remember battery details and need some sort of hard reset from time to time -- for example, battery replacement or swapping "identical" batteries among "identical" laptops?

Thanks in advance,
~~~ 0;-Dan
 
Old 07-18-2011, 06:48 PM   #2
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
I found this as background...
http://batteryuniversity.com/learn/a..._smart_battery

~~~ 0;-Dan
 
Old 07-19-2011, 10:39 AM   #3
Bill Gates 666
Member
 
Registered: Dec 2003
Location: Cambridge
Distribution: Arch, Gentoo, OpenSUSE
Posts: 70

Rep: Reputation: Disabled
Go straight to the source. The /proc file structure!!

On my ASUS laptop (that I'm writing this message on):
Code:
$ cat /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mW
remaining capacity:      35673 mWh
present voltage:         12386 mV
$
$ cat /proc/acpi/battery/BAT0/info 
present:                 yes
design capacity:         51260 mWh
last full capacity:      36817 mWh
battery technology:      rechargeable
design voltage:          11100 mV
design capacity warning: 5126 mWh
design capacity low:     506 mWh
cycle count:              0
capacity granularity 1:  506 mWh
capacity granularity 2:  506 mWh
model number:            F8---24
serial number:            
battery type:            LIon
OEM info:                ASUSTEK
That should be fairly reliable as the /proc filesystem is a virtual filesystem maintained by the kernel. I would believe that output. If the kernel doesn't know about a Smart battery, or your battery isn't SMART, you will simply see less file/directories under the /proc/acpi folder (assuming you have ACPI support at all ).

Run some tests with the battery. Change the power draw (put on a flash video ). If the power-drain goes up and the capacity goes down - you are at least seeing that the basics work.

I guess battery monitoring software checks stuff like the design capacity of the battery vs. actual capacity. Naturally you have to fully drain the battery charge to check the current capacity (accurately). Not sure what else it might have access to?

Hope that's useful!

Mr Gates
 
1 members found this post helpful.
Old 07-19-2011, 03:56 PM   #4
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Thanks for the /proc details. I am looking for information one layer below this.

The /proc data gets written by something -- a driver/module? This software interrogates
specific hardware. My brain dates back to the days when every "device" was a set of addresses in memory or specific numbered "ports". One used move instructions to read memory contents. There were I.O instructions that read numbered "ports".

What happens in the modern (sic) battery powered workstation? Is there a "device" that knows all about voltages and temperatures, battery present or absent, AC power present or absent, and so on? Does this "device" have a "driver" other than acpi parts? Does the same "device" track battery temperature &c details that tracks CPU temperature &c details? Again, is that acpi or some other "driver"?

Thanks in advance,
~~~ 0;-Dan


The background article indicates that there is some sort of conversation between the battery pack "firmware" and other "software" running on the workstation.
 
  


Reply



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
Debian Reports Non-optimal RAID Status carlosinfl Debian 7 03-23-2011 03:18 PM
apm and acpi -> battery status problem jasone Linux - General 3 10-20-2010 04:20 AM
LXer: Battery Status 0.1 Released - Improved Battery Applet For The Gnome Desktop LXer Syndicated Linux News 0 05-21-2010 06:30 PM
is there an x battery status applet for woody with acpi?! tortenteufel Linux - Software 0 02-22-2004 12:48 PM
battery status with ACPI cornucopiae Linux - Laptop and Netbook 5 08-03-2003 11:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:49 AM.

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
Open Source Consulting | Domain Registration