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.


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.