Battery left reported in percentage instead of time on Lucid w/ natty backport kernel

Bug #824912 reported by Steve Atwell
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
upower (Ubuntu)
Fix Released
Undecided
Unassigned
Lucid
Fix Released
Medium
Steve Langasek

Bug Description

Release: 10.04
Codename: lucid
upower 0.9.1-1
kernel 2.6.38-10-generic

On a Lucid laptop, with the linux-image-generic-lts-backport-natty kernel installed, upower reports remaining battery charge in percentage rather than in time. This happens because some time between 2.6.32 and 2.6.38, the kernel replaced the current_now sysfs attribute with a new power_now attribute, and this information is required to determinate current utilization so that upower can compute time remaining.

See also http://<email address hidden>/msg00946.html.

Steps to reproduce:

1. Take a standard Lucid laptop install. In my case, I've reproduced this on a Thinkpad X200 and a Thinkpad X220, but I'm sure it affects many models.
2. Notice that the gnome battery applet reports battery time remaining in hours and minutes when AC is unplugged.
3. Install linux-image-generic-lts-backport-natty and reboot.
4. Notice that now the gnome battery applet reports percentage of battery remaining instead of time.

I'm attaching a patch against Lucid's upower 0.9.1 that fixes this. It integrates the upstream fix from http://cgit.freedesktop.org/upower/commit/?id=2af7a6e091bb62faff9cdda5bb7e3fb5dcc8d15a .

Revision history for this message
Steve Atwell (satwell) wrote :
Changed in upower (Ubuntu):
status: New → Confirmed
Revision history for this message
Charles Huber (genpfault) wrote :

Ran into this problem 45 minutes ago. Patch works perfectly for me on an X220. Thanks!

tags: added: patch
Steve Langasek (vorlon)
Changed in upower (Ubuntu):
status: Confirmed → Fix Released
Changed in upower (Ubuntu Lucid):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Steve Langasek (vorlon)
Revision history for this message
Martin Pitt (pitti) wrote :

Looks fine, but please reupload with a fixed LP bug syntax in the changelog (missing a '#')

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Steve, or anyone else affected,

Accepted upower into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in upower (Ubuntu Lucid):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Steve Atwell (satwell) wrote :

upower 0.9.1-1ubuntu1 in lucid-proposed fixes the bug for me. Thanks!

Steve Langasek (vorlon)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package upower - 0.9.1-1ubuntu1

---------------
upower (0.9.1-1ubuntu1) lucid-proposed; urgency=low

  * Backport support for the new "power_now" sysfs battery attribute in
    newer kernels, so that upower works correctly with the
    linux-image-generic-lts-backport-natty kernel packages. LP: #824912.
 -- Steve Langasek <email address hidden> Wed, 28 Sep 2011 00:18:32 -0700

Changed in upower (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.