Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This feels like a stack exchange EE question, but it seems like it belongs here instead.

How is the charge of a notebook computer's battery reported to the operating system? Since all laptop batteries I've seen seem to be cross-platform, there must be some standard procedure to inform the kernel of the charge level.

The best I can think of is that some microcontroller has to maintain a serial connection and inform the OS of the battery's voltage, but I can't figure out how this applies to determining things like whether the AC is plugged in or how this information is reported to the OS.

This seems like such a basic problem, but Googling it just led me to consumers trying to increase their battery life.

share|improve this question
1  
Here's a page with good info: How laptop batteries work – TFM Jan 21 '13 at 18:57
up vote 2 down vote accepted

The specification you are referring to is the Smart Battery Specification, which reports the data to the System Management Bus. The SMBus is responsible for a whole host of things in addition to battery information such as temperatures, fan speed, etc.

There was a BlackHat presentation (link is PDF) that goes into the real details of how this system reports data, and how you can hack it for fun.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .