Closed daegalus closed 8 months ago
Yeah, I've got a similar issue three days ago, probably for the same source (I've got a bluetooth keyboard + mouse combo with battery reporting). I'll try to dig further if I can reproduce it again.
Oh, found the issue, it's here: https://github.com/giampaolo/psutil/blob/77e5b7445748d30d22c0e3b2e651414da96a88b4/psutil/_pslinux.py#L1476
They are checking if the nodes in the folder has the text 'battery' in them in the folder /sys/class/power_supply, but that includes also batteries reported from bluetooth hardware peripherals (since they have the format of hid-\<mac address>-battery), so they also match.
I'll see if I can pull additional information from a battery source, I might already have an idea for it.
PR is open: https://github.com/giampaolo/psutil/pull/2305
Per our conversation in discord.
On my system, ublue-update fails to run because the battery hardware check is noticing the battery of my bluetooth keyboard.
Digging into the folder, we find the following:
The workaround solution was to set
min_battery_percent
in/etc/ublue-update/ublue-update.toml
to 0, as suggested by Gerblesh.This might be an upstream issue with
psutil
not filtering outhid-
batteries, but needs more investigation.