PhotoWonder why your smartphone battery runs down, even when you aren't using the device? Chances are, it's not getting enough sleep.

Because smartphone functions are energy hogs, reducing battery life in normal operations, manufacturers have aggressively built in “sleep” functions. When the device detects no activity, the smartphone goes into sleep mode to save power.

But it's not entirely asleep. Various functions need to run in the background, such as checking with the email server to see if any new messages have arrived. While the phone is sleeping, an app springs into action every now and then and wakes up the phone just to see if it needs to perform a function.

And therein lies the problem. Under normal circumstances the app will do its job, then let the phone go back to sleep. But Charlie Hu, a Purdue University professor of electrical and computer engineering, says sometimes there's a glitch in the software and the phone stays awake.

Silent battery killer

"These energy bugs are a silent battery killer," Hu said. "A fully charged phone battery can be drained in as little as five hours."

Researchers have now proposed a method to automatically detect a new class of software glitches in smartphones called "no-sleep energy bugs."

Smartphone manufacturers have designed in application programming interfaces, or APIs, available to app developers. The developers insert the APIs into apps to instruct the phone to stay awake long enough to perform necessary operations.

Bad code

"App developers have to explicitly juggle different power control APIs that are exported from the operating systems of the smartphones," Hu said. "Unfortunately, programmers are only human. They make mistakes when using these APIs, which leads to software bugs that mishandle power control, preventing the phone from engaging the sleep mode. As a result, the phone stays awake and drains the battery."

Hu and his team of researchers are working on a tool to automatically detect the presence of these power-wasting glitches in smartphones.

Share your Comments