Summary: | changing charge-thresholds for laptop battery is not reflected in upower | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | slartibart70 |
Component: | Power management & brightness | Assignee: | Plasma Bugs List <plasma-bugs-null> |
Status: | CONFIRMED --- | ||
Severity: | minor | CC: | john.kizer, jpetso, kde, natalie_clarius, nate |
Priority: | NOR | ||
Version First Reported In: | 6.3.3 | ||
Target Milestone: | 1.0 | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
slartibart70
2025-03-30 12:11:36 UTC
and, the percentage: 84% reported by upower is also not aligned with the charge-end-threshold. Is there a user-facing problem here? Updating status as this is pending a reply from the reporter, thanks! oh, the question was addressed to me? not sure what you mean with 'user facing problem' I'm just using the tools the distro provides... upower is printing stats, systemsettings is setting/visualizing stats for battery.... so, any help please? as i already wrote above: systemsetting battery-settings are winning over the data provided by 'upower -d' I'm just complaining about the misalignment. (and, of course, the 'magic' systemsettings does behind the curtain: where is this persisted? udev-rules? sth. else?) (In reply to slartibart70 from comment #5) > systemsetting battery-settings are winning over the data provided by 'upower -d' > I'm just complaining about the misalignment. This is true, and the reason is that UPower does not read from the battery's own state. It gets its values from 1. an entry in "hwdb" (via system-wide config file) for the particular hardware, or 2. if no particular entry exists, a fallback which is the 75%-80% range that you see. UPower will apply this to the battery, however it doesn't adopt any existing battery settings. UPower also doesn't (currently) offer an API for desktops to customize the system-wide settings, which is one reason why we can't yet switch to UPower by default as a backend / source of truth for charge limits. > (and, of course, the 'magic' systemsettings does behind the curtain: where > is this persisted? udev-rules? sth. else?) System Settings in its current state has no magic at all, it writes the values straight to the battery/firmware (via kernel file interface) and hopes that they get stored there. If the firmware doesn't persist the thresholds, System Settings forgets everything. This is what UPower promises to solve. I proposed a change that will give users a config file option to use UPower for charge limits: https://invent.kde.org/plasma/powerdevil/-/merge_requests/574 - a first step in this direction. If this is enabled, users will only have a checkbox for optimized battery charge behavior in System Settings, instead of configurable percentages. In return, UPower will apply battery charge thresholds on every boot, and there won't be any misalignment obviously. For the time being, users who opt into this can only customize thresholds via hwdb config file. |