Logitech M310 mouse reporting incorrect battery level
I was getting endless complaints about my mouse battery being low (5%) on gnome-shell (3.28) on fedora 28, but the mouse was working perfectly so I was loath to change the battery. Today I broke down and put a fresh battery in the mouse (measured at 1.55V) and noticed that the battery level in gnome settings / power was only at 55%. This matches what upower is returning,
$ upower --dump
Device: /org/freedesktop/UPower/devices/mouse_hidpp_battery_0
native-path: hidpp_battery_0
model: M310
serial: 1024-22-71-40-8b
power supply: no
updated: Thu 22 Nov 2018 05:55:49 PM EST (113 seconds ago)
has history: yes
has statistics: yes
mouse
present: yes
rechargeable: yes
state: discharging
warning-level: none
battery-level: normal
percentage: 55%
icon-name: 'battery-good-symbolic'
Digging around in /sys/class/power_supply/hidpp_battery_0 I couldn't find any battery capacity related to 55%, the only value I found in there was,
$ cat capacity_level
Normal