upower setup seems broken

on my ThinkPad x250 with FreeBSD 14.3

Bash:
$ upower -i /org/freedesktop/UPower/devices/battery_BAT0
  native-path:          (null)
  power supply:         no
  updated:              Do.  1 Jan. 01:00:00 1970 (1755771752 seconds ago)
  has history:          no
  has statistics:       no
  unknown
    warning-level:       unknown
    battery-level:       unknown
    percentage:          0% (should be ignored)
    icon-name:          '(null)'

doesn't look right, does it?

How can I tell if a battery management (a la tlp) is in place and which?
acpi() doesn't give me clues.
 
I have no idea what upower is supposed to do or be useful for, but what information besides what acpiconf(8) already gives you are you looking for?

Code:
% acpiconf -i0
Design capacity:    86000 mWh
Last full capacity:    86860 mWh
Technology:        secondary (rechargeable)
Battery Swappable Capability:    Non-swappable
Design voltage:        15480 mV
Capacity (warn):    4343 mWh
Capacity (low):        200 mWh
Cycle Count:        41
Measurement Accuracy:    95%
Max Average Interval:    1000 ms
Min Average Interval:    500 ms
Low/warn granularity:    -1 mWh
Warn/full granularity:    -1 mWh
Model number:        5B10W51873
Serial number:         1088
Type:            LiP
OEM info:        Sunwoda
State:            charging
Remaining capacity:    9%
Remaining time:        unknown
Present rate:        76650 mW
Present voltage:    16445 mV


edit:
I just discovered that I also have upower installed on my laptop (a hard dependency of xfce4-settings for whatever reason...).
It seems that upower gives this bogus output for unknown/non-existing devices. "battery_BAT0" does not exist, but "battery_devxbatteryx0" does:
Code:
% upower --dump
Device: /org/freedesktop/UPower/devices/battery_devxbatteryx0
  native-path:          dev.battery.0
  vendor:               Sunwoda
  model:                5B10W51873
  serial:                1088
  power supply:         yes
  updated:              Thu Aug 21 13:32:44 2025 (8 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               charging
    warning-level:       none
    energy:              13.81 Wh
    energy-empty:        0.2 Wh
    energy-full:         86.86 Wh
    energy-full-design:  86 Wh
    energy-rate:         -76.114 W
    voltage:             16.525 V
    charge-cycles:       N/A
    time to full:        57.6 minutes
    percentage:          15%
    capacity:            100%
    technology:          lithium-polymer
    icon-name:          'battery-caution-charging-symbolic'
  History (charge):
    1755775934    15.000    charging
    1755775904    14.000    charging
    1755775874    13.000    charging
  History (rate):
    1755775964    -76.114    charging
    1755775934    -76.194    charging
    1755775904    -76.352    charging
    1755775874    -76.369    charging

yet again - apart from that "time to full" value (which is most likely just calculated from the current- and full-capacity and charging rate) there's no additional information to what acpiconf is already showing...
 
  • Thanks
Reactions: mro
Back
Top