GNOME Shell shows outdated battery level for about a minute after a resume

Bug #1495190 reported by Marius Gedminas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu GNOME
Invalid
Low
Unassigned
gnome-shell (Ubuntu)
Expired
Undecided
Unassigned
Wily
Expired
Low
Unassigned

Bug Description

Steps to reproduce:

1. Let the battery run down so only 1 bar is showing (for dramatic effect).
2. Suspend the laptop
3. Plug in A/C power
4. Let the laptop charge overnight
5. Resume the laptop

Expected behavior:

- The battery level shows 100%

Actual behavior:

- The battery level shows 1 bar, leading to thoughts like "omg did I forget to plug it in? is my A/C charger broken?", and then, about 60 seconds later, suddenly jumps to 100%.

Since step 4 is rather long, for ease of reproduction you can use a different method:

1. Unplug A/C power, verify that the battery icon changes accordingly
2. Suspend laptop
3. Plug A/C power
4. Resume laptop

Expect: battery icon shows A/C power is on
Actual: battery icon shows battery for ~60 seconds, until the next poll interval, leading to the same kinds of stressful thoughts ("omg is it broken? did I forget to plug the other end into a wall outlet?").

Revision history for this message
Tim Lunn (darkxst) wrote :

is upower reporting the stale value? or gnome-shell taking time to poll?

you should be able to use `upower -d` or so to check.

Changed in ubuntu-gnome:
status: New → Confirmed
importance: Undecided → Low
milestone: none → wily
Revision history for this message
Marius Gedminas (mgedmin) wrote :
Download full text (4.7 KiB)

It is upower.

I followed the reproduction steps (battery at one bar out of four, suspended, plugged in to charge fully, unplugged, resumed).

It took me maybe 10 seconds to unlock the screen and open a terminal. I marked the time and ran upower -d:

mg@platonas: ~ $ date
Št Spa 3 12:39:49 EEST 2015

mg@platonas: ~ $ upower -d
Device: /org/freedesktop/UPower/devices/line_power_AC
  native-path: AC
  power supply: yes
  updated: 2015 m. spalio 02 d. 15:42:21 (75450 seconds ago)
  has history: no
  has statistics: no
  line-power
    warning-level: none
    online: no
    icon-name: 'ac-adapter-symbolic'

Device: /org/freedesktop/UPower/devices/battery_BAT0
  native-path: BAT0
  vendor: SANYO
  model: 42T4940
  serial: 13862
  power supply: yes
  updated: 2015 m. spalio 02 d. 19:21:57 (62274 seconds ago)
  has history: yes
  has statistics: yes
  battery
    present: yes
    rechargeable: yes
    state: discharging
    warning-level: none
    energy: 15,81 Wh
    energy-empty: 0 Wh
    energy-full: 59,04 Wh
    energy-full-design: 93,24 Wh
    energy-rate: 11,276 W
    voltage: 11,121 V
    time to empty: 1,4 hours
    percentage: 26%
    capacity: 63,3205%
    technology: lithium-ion
    icon-name: 'battery-low-symbolic'

Device: /org/freedesktop/UPower/devices/DisplayDevice
  power supply: yes
  updated: 2015 m. spalio 02 d. 19:21:57 (62274 seconds ago)
  has history: no
  has statistics: no
  battery
    present: yes
    state: discharging
    warning-level: none
    energy: 15,81 Wh
    energy-full: 59,04 Wh
    energy-rate: 11,276 W
    time to empty: 1,4 hours
    percentage: 26%
    icon-name: 'battery-low-symbolic'

Daemon:
  daemon-version: 0.99.3
  on-battery: yes
  lid-is-closed: no
  lid-is-present: yes
  critical-action: HybridSleep

Then I waited for the battery icon in gnome-shell to update and re-ran the two commands:

mg@platonas: ~ $ upower -d
Device: /org/freedesktop/UPower/devices/line_power_AC
  native-path: AC
  power supply: yes
  updated: 2015 m. spalio 02 d. 15:42:21 (75475 seconds ago)
  has history: no
  has statistics: no
  line-power
    warning-level: none
    online: no
    icon-name: 'ac-adapter-symbolic'

Device: /org/freedesktop/UPower/devices/battery_BAT0
  native-path: BAT0
  vendor: SANYO
  model: 42T4940
  serial: 13862
  power supply: yes
  updated: 2015 m. spalio 03 d. 12:40:15 (1 seconds ago)
  has history: yes
  has statistics: yes
  battery
    present: yes
    rechargeable: yes
    state: discharging
    warning-level: none
    energy: 58,82 Wh
    energy-empty: 0 W...

Read more...

Revision history for this message
Hairong (hairongxu) wrote :

I tried by following steps wrote in the bug tracker, seems on the latest 16.04 development release doesn't has this problem.

Tim Lunn (darkxst)
Changed in gnome-shell (Ubuntu Wily):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 15.10 (wily) reached end-of-life on July 28, 2016.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test.

Changed in gnome-shell (Ubuntu Wily):
status: Triaged → Incomplete
Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Changed in ubuntu-gnome:
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for gnome-shell (Ubuntu Wily) because there has been no activity for 60 days.]

Changed in gnome-shell (Ubuntu Wily):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for gnome-shell (Ubuntu) because there has been no activity for 60 days.]

Changed in gnome-shell (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Paul White (paulw2u) wrote :

Invalidating remaining task as other expired along time ago

Changed in ubuntu-gnome:
status: Incomplete → Invalid
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.