power icon does not indicate charging if booted without power connected

Bug #1845532 reported by Heather Ellsworth
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
upower (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hardware: Lenovo T590
OS: 19.10

When the power is not connected when the laptop boots, and then connected, the power icon in the top bar does not change to indicate that the laptop is now charging.

$ upower -d
Device: /org/freedesktop/UPower/devices/line_power_AC
  native-path: AC
  power supply: yes
  updated: Thu 26 Sep 2019 08:53:40 AM MDT (2107 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: SMP
  model: 02DL012
  serial: 1417
  power supply: yes
  updated: Thu 26 Sep 2019 09:28:33 AM MDT (14 seconds ago)
  has history: yes
  has statistics: yes
  battery
    present: yes
    rechargeable: yes
    state: discharging
    warning-level: none
    energy: 55.53 Wh
    energy-empty: 0 Wh
    energy-full: 57.21 Wh
    energy-full-design: 57.02 Wh
    energy-rate: 0.319173 W
    voltage: 12.932 V
    time to empty: 7.2 days
    percentage: 97%
    capacity: 100%
    technology: lithium-polymer
    icon-name: 'battery-full-symbolic'

Device: /org/freedesktop/UPower/devices/DisplayDevice
  power supply: yes
  updated: Thu 26 Sep 2019 09:22:33 AM MDT (374 seconds ago)
  has history: no
  has statistics: no
  battery
    present: yes
    state: discharging
    warning-level: none
    energy: 55.53 Wh
    energy-full: 57.21 Wh
    energy-rate: 0.319173 W
    time to empty: 7.2 days
    percentage: 97%
    icon-name: 'battery-full-symbolic'

Daemon:
  daemon-version: 0.99.11
  on-battery: yes
  lid-is-closed: no
  lid-is-present: yes
  critical-action: PowerOff

$ cat /sys/class/power_supply/BAT0/status
Unknown

However, if the laptop is booted with the power connected, then the battery icon in the top bar shows that it's charging and at 100%. If I unplug the power, it correctly shows that it is no longer charging but it goes back to saying I'm at 97% (the last reported state when booted without power).

ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: upower 0.99.11-1
ProcVersionSignature: Ubuntu 5.3.0-10.11-generic 5.3.0-rc8
Uname: Linux 5.3.0-10-generic x86_64
ApportVersion: 2.20.11-0ubuntu7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Thu Sep 26 10:24:38 2019
InstallationDate: Installed on 2019-09-13 (12 days ago)
InstallationMedia: Ubuntu 19.04 "Disco Dingo" - Release amd64 (20190416)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: upower
UpgradeStatus: Upgraded to eoan on 2019-09-19 (7 days ago)

Revision history for this message
Heather Ellsworth (hellsworth) wrote :
Revision history for this message
Heather Ellsworth (hellsworth) wrote :

The only difference in journalctl between when the system boots with power and without is that when the system boots without power, I see two journalctl messages:

Sep 26 10:53:27 fenrir dbus-daemon[793]: [system] Activating via systemd: service name='org.freedesktop.UPower' unit='upower.service' requested by ':1.37' (uid=123 pid=1052 comm="/usr/bin/gnome-shell " label="unconfined")
Sep 26 10:54:31 fenrir dbus-daemon[844]: [system] Activating via systemd: service name='org.freedesktop.UPower' unit='upower.service' requested by ':1.38' (uid=123 pid=1111 comm="/usr/bin/gnome-shell " label="unconfined")

When the system boots with power, I see only one similar journalctl message:
Sep 26 11:22:26 fenrir dbus-daemon[835]: [system] Activating via systemd: service name='org.freedesktop.UPower' unit='upower.service' requested by ':1.38' (uid=123 pid=1090 comm="/usr/bin/gnome-shell " label="unconfined")

Revision history for this message
Heather Ellsworth (hellsworth) wrote :

The following is the output of `journalctl | grep -i power` that covers the duration between the reboot command and login times.

Revision history for this message
Heather Ellsworth (hellsworth) wrote :

The following is the output of `journalctl | grep -i power` that covers the duration between the reboot command and login times.

Revision history for this message
Heather Ellsworth (hellsworth) wrote :

I tried this in a 19.04 live boot from a usb stick and the behavior was correct: if the system was booted without power, the charging symbol was not there. Then when I connected the power, the charging symbol appeared.

Also, when booting 19.04 without power connected, there is only the one dbus-daemon line in journalctl:
Sep 26 18:55:04 ubuntu dbus-daemon[1097]: [system] Activating via systemd: service name='org.freedesktop.UPower' unit='upower.service' requested by ':1.38' (uid=999 pid=1761 comm="/usr/bin/gnome-shell " label="u
nconfined")

So there is some regression between 19.04 and current 19.10.

19.04 kernel: 5.0.0.-13.14
19.10 kernel: 5.3.0-10.11

Revision history for this message
Heather Ellsworth (hellsworth) wrote :

In 19.10, with the error state, restarting upower fixes the issue. So if you've booted without power connected, then connect power and don't see the charging icon, execute `sudo systemctl restart upower` and see the charging symbol.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in upower (Ubuntu):
status: New → Confirmed
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.