Hi Am 27.07.25 um 12:13 schrieb Renkas Mykhailo:
Package: upower Version: 1.90.3-1 Severity: important Tags: patch upstreamDear Maintainer, On systems with broken battery controllers, ACPI may report an invalid battery capacity value, specifically `-NaN`. This causes `upowerd` to crash repeatedly due to an invalid gdouble being passed to `g_object_set`. This leads to system instability or continuous reboots due to repeated crashes of systemd-managed services. The following patch adds a basic sanity check to clamp invalid values to 0.0. --- PATCH START --- --- upower-1.90.3.orig/src/linux/up-device-supply.c +++ upower-1.90.3/src/linux/up-device-supply.c @@ -313,6 +313,11 @@ up_device_supply_refresh_device (UpDevic if (percentage == 100.0) state = UP_DEVICE_STATE_FULLY_CHARGED;+ if (!isfinite(percentage) || percentage < 0.0 || percentage > 100.0) {+ g_warning("Invalid percentage value: %f, setting to 0.0", percentage); + percentage = 0.0; + } + g_object_set (device, "percentage", percentage, "battery-level", level,
It would be great if you can submit a merge request upstream at https://gitlab.freedesktop.org/upower/upowerWe avoid applying patches downstream as much as possible, especially if the issue is not Debian specific.
Regards, Michael
OpenPGP_signature.asc
Description: OpenPGP digital signature

