How to manually set thresholds for battery charge

Out of curiosity, I know with the default power profile daemon on KDE and these other services I added (thermald and auto-cpufreq), there’s still no option to force a charge limit on a laptop battery. I dont want to replace the daemon with tlp… but i found this thread that explains you can just edit the threshold files to stop charging at 80% when plugged in.

There are direct files you can write to that will change the thresholds. It’s what tlp uses. It should be /sys/class/power_supply/BAT0/charge_start_threshold and /sys/class/power_supply/BAT0/charge_stop_threshold. You can write a systemd service to set these on boot (you may be able to just set it once and forget a script)

This must be from a different OS because i can’t find those files. Could we go this route with native files, or is there any other way to stop batteries at 80%? I know my laptop doesn’t offer those settings, nor does my bios.

Thank you!

I think you should be disabling and masking power-profile-daemon for auto-cpufreq to work correctly.

https://github.com/AdnanHodzic/auto-cpufreq#aur

cpufreq doesnt actually control battery thresholds from what I have read, I was just throwing it out there as background to what’s managing my cpu and energy output. The thread is more to ask if there are any services that control battery thresholds without disabling power profile daemon, or if there’s a way to manually edit native files like the other thread I saw about it.

I know that.

I just noticed that you have several services enabled together which might interfere with each other thus leading to one effectively disturbing the functioning of the other.

The developer’s comment in the link I posted is explicit about that.

I did read that, thank you. I was temporarily trying out a few different options, and I plan on keeping services disabled so there are no conflicts.

However, none of these services offer battery charge thresholds. I read that this is more of a hardware limitation that comes with one’s laptop, or as an option in BIOS, but I made the thread to see if there are alternatives out there such as editing those files that tlp accesses. I just can’t find those files nor do i know if EOS has similar files to control thresholds.

As far as I know, the kernel must support that feature for your specific laptop.

For example, for my LG gram: https://www.lorenzobettini.it/2022/03/limiting-battery-charge-on-lg-gram-in-linux/

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.