Skip to content

Draft: RFC: Restore battery charge limits

Fabian Arndt requested to merge root-core/powerdevil:persistent into master

This is a draft for bug 450551 which describes that the battery charging thresholds gets reset on every boot.

I do not know enough about how such things are handled in KDE, so I am happy about feedback. This is just some experiment I wanted to share.

  • The changes include persisting the set values of the UI and restoring them.
  • This is realized via config parameters.
  • There is also a new setting, which controls if the settings should be persisted / restored.
  • If the persistence is deactivated, the actual value are shown / loaded.
  • Minor performance improvement: The values are only requested if the hardware supports the feature.
    • Can the configuration change if the battery is not present on boot? I can't test it myself as my laptop only supports the conservation mode of !248 (merged) and its battery is fixed.

The problem is - if persistence is active and the value differs - the user is asked to authenticate on every boot.

PS: This can easily be extended to include the changes of !248 (merged) - which is reset if the laptop is shut down AND the PSU is disconnected.

EDIT: I installed Linux on an old Thinkpad. It supports the thresholds, but the battery is broken. I can test the settings part though, once it finishes compilation.. well that will take quite some time.

Edited by Fabian Arndt

Merge request reports

Loading