Bug reduces battery life by as much as 25%, says Microsoft

Google engineers earlier this week began working on a fix for a months-old Chrome bug that drains Windows' laptop batteries, the move triggered by a story on Forbes' website.

The Forbes piece ran Monday, when contributor Ian Morris pointed out that Chrome on Windows sets the "system clock tick rate" at a prodigious rate.

In Windows, as in other operating systems, events are often set to run at intervals, Morris noted. To save power, particularly on a laptop, the processor only "wakes" at those intervals to take care of business. Windows' default timer resolution is 15.6ms -- "ms" for millisecond, one-thousandth of a second -- which means the processor wakes up 64 times each second.

Chrome, however, changes that default globally to 1ms as soon as the browser's launched, so that the processor checks for chores 1,000 times each second, a jump of 1,463% in frequency. The tick rate doesn't return to the default until Chrome is completely shut down.

Other browsers, including Microsoft's Internet Explorer and Mozilla's Firefox, boost the tick rate only when necessary -- to prepare for playing Flash media, for instance -- and then restore the Windows' default when that job has been completed.

But because Chrome resets the tick rate Windows-wide, all applications, not just the browser, will then use the more-frequent interval.

Microsoft has told developers that high tick rates will impact power consumption. In January 2009, Steven Sinofsky, then the head of Windows 7 development -- he was ousted three years later after the launch of Windows 8 -- said, "We have observed a single application that keeps the timer resolution increased to 1ms can have up to a 10% impact on battery life on a typical notebook PC."

Elsewhere in the same long blog -- "long" was a Sinofsky trademark -- he cited increased batter consumption rates as high as 25%. A Windows hardware developers document (download Microsoft word document) from 2010 said the same. "The default timer resolution on Windows 7 is 15.6 milliseconds (ms). Some applications reduce this to 1 ms, which reduces the battery run time on mobile systems by as much as 25%," the document said.

The Chrome interrupt frequency problem is limited to Windows 7 and earlier, as OS X and Linux both use what's called "tickless timers," as do Windows 8 and 8.1.

The Chromium bug tracker -- Chromium is the open-source project that feeds code for the browser engine into Chrome itself -- posted a new thread in September 2012 on the 1ms tick rate, but the issue languished until Monday, when Morris' blog hit Forbes' website. Several commenters chimed in, telling Google to "Fix this" or "This should really be fixed!"

(Morris said he had found evidence of the bug in Chromium's bug tracker as far back as 2010; Computerworld was unable to locate such a thread.)

Later on Monday, July 14, Google assigned a developer to investigate the bug, closed the thread to new outside comments, and raised the problem's priority to "1." Google confirmed that today, with a spokesperson saying, "This bug has been assigned internally and our team is working to resolve it."

The Chromium bug tracker does not indicate when a flaw or problem will be fixed, or which version of Chrome will include the change. Google also declined to provide a timeline.