You are not logged in.
I'm having an issue with setting the battery charge limit to 80% in KDE Power Management (Settings → Power Management → Advanced → Charge Limit → Stop charging at 80%).
It works after setting (battery stops at ~80%), but after every reboot it resets to 100%. Doesn't help to reboot or change power profiles. Checked:
/sys/class/power_supply/BAT0/charge_control_end_threshold
100
After manual set:
echo 80 | sudo tee /sys/class/power_supply/BAT0/charge_control_end_threshold
Battery holds 80%, but after reboot back to 100.
System specs:
Kernel: 6.12.73+deb13-amd64 arch: x86_64 bits: 64 compiler: gcc v: 14.2.0
Desktop: KDE Plasma v: 6.3.6 tk: Qt v: N/A wm: kwin_wayland vt: 2 dm: SDDM
Distro: Q4OS 6.5.1-deb13u1 base: Debian GNU/Linux 13 (trixie)
Questions:
- Is there a native way in Plasma/Q4OS to make this limit persistent after reboot without TLP/asusctl/scripts?
- Does Plasma have a config option to save it permanently? (KDE bug 450551?)
- Or does Q4OS have a system service that handles this?
Offline
Is there a native way in Plasma/Q4OS to make this limit persistent after reboot without TLP/asusctl/scripts?
No, not reliably in current Plasma. The PowerDevil KDE component responsible for this does not persist the value across reboot on many laptops. KDE assumed that firmware or the kernel would remember the value once written, but many devices reset it on power cycle. So the behaviour you're seeing is exactly what is described in KDE bug 450551.
Does Plasma have a config option to save it permanently?
No. Plasma stores the value in its settings, but does not reapply it on boot. The current implementation only writes the threshold when you change the setting in the GUI.
Or does Q4OS have a system service that handles this?
No. Q4OS is essentially Debian + KDE, and it does not add any battery-threshold service.
Offline
@5k18a
I was able to achieve that on two old laptops, a Samsung and a Sony. But the way to do it is specific to each model. The key is to discover the right file to edit (with sudo rights) and to set its content to an appropriate value.
In both cases, the file resides in a subdirectory of /sys/devices/platform/:
- my Sony laptop: set /sys/devices/platform/sony-laptop/battery_care_limiter content to 80<Enter> (which means 80%)
- my Samsung laptop: set /sys/devices/platform/samsung/battery_life_extender content to 1<Enter> (which means "enabled")
Note that for the Sony laptop, only a very few values are recognized: 80% works, maybe 50% also works (not sure), other values (75%, 90%, ...) will not work. These values are the ones that were listed in a config tool provided by Sony and available for Windows only (that laptop was running Windows in the past).
You could also read https://www.baeldung.com/linux/limit-ba … arge-level or search the web for other tutos or information.
Q4OS machine: Samsung R519 - Pentium T4200 2.0 GHz - 4 GB RAM - 500 GB SSD
Offline