Innacurate battery life reading

I have a Librem 15 v3 with Devuan ASCII 2.0 as my OS (running XFCE desktop environment). I notice that I get erratic battery life readings. If I leave it connected to AC power until 100% charge is displayed, it immediately goes to 97% once the cable is disconnected. Sometimes it will say that the battery is fully charged despite showing only 97%. The results from upower -d are displayed below:

With AC cable connected:

upower -d
Device: /org/freedesktop/UPower/devices/line_power_AC
native-path: AC
power supply: yes
updated: Sun 18 Aug 2019 10:53:54 PM EDT (367 seconds ago)
has history: no
has statistics: no
line-power
online: yes

Device: /org/freedesktop/UPower/devices/battery_BAT
native-path: BAT
vendor: TPS
model: S10
power supply: yes
updated: Sun 18 Aug 2019 10:57:43 PM EDT (138 seconds ago)
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: fully-charged
energy: 53.9904 Wh
energy-empty: 0 Wh
energy-full: 53.9904 Wh
energy-full-design: 48.84 Wh
energy-rate: 9.435 W
voltage: 12.368 V
percentage: 100%
capacity: 100%
technology: lithium-ion

Daemon:
daemon-version: 0.9.23
can-suspend: yes
can-hibernate: yes
on-battery: no
on-low-battery: no
lid-is-closed: no
lid-is-present: yes
is-docked: no

A few seconds later with cable disconnected (Now shows 95%):

upower -d
Device: /org/freedesktop/UPower/devices/line_power_AC
native-path: AC
power supply: yes
updated: Sun 18 Aug 2019 11:01:43 PM EDT (5 seconds ago)
has history: no
has statistics: no
line-power
online: no

Device: /org/freedesktop/UPower/devices/battery_BAT
native-path: BAT
vendor: TPS
model: S10
power supply: yes
updated: Sun 18 Aug 2019 11:01:47 PM EDT (1 seconds ago)
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: discharging
energy: 51.4374 Wh
energy-empty: 0 Wh
energy-full: 53.9904 Wh
energy-full-design: 48.84 Wh
energy-rate: 9.435 W
voltage: 12.258 V
time to empty: 5.5 hours
percentage: 95%
capacity: 100%
technology: lithium-ion
History (charge):
1566183605 95.000 discharging

Daemon:
daemon-version: 0.9.23
can-suspend: yes
can-hibernate: yes
on-battery: yes
on-low-battery: no
lid-is-closed: no
lid-is-present: yes
is-docked: no

Any ideas on what is going on here and what the possible solution may be? I assume there is some miscommunication between the battery/charge controller and the OS. When running on battery power alone it also seems to lose capacity much faster than I would expect (based on the tray icon).

How were things working before you replaced the OS and desktop?

1 Like

I’ve been using Devuan since the 1st week or so of owning the machine and I don’t recall if the issue was present during the short time I tested PureOS. I have owned the laptop for almost a year now but 1st started noticing this a couple of months ago. To be honest I never paid close attention to the battery monitor in the tray icon since I mostly use the machine connected to AC power. It’s possible that it has been doing it from the beginning. At first I thought the machine was somehow draining the battery even when turned off, but the erratic readings when powered on makes me think it is a communication issue. I will do some testing with a live usb image of other distros to see if it is OS specific.