• 0 Posts
  • 2 Comments
Joined 3M ago
cake
Cake day: Jun 04, 2025

help-circle
rss

You’ll have to try :) I’d be wary of having multiple daemons managing your battery, though - it sounds like a recipe for conflicts, infinite loops and such.


No idea about TLP, I’m not using that.

I created a systemd service for setting the charging threshold on boot, works for me.
This is NixOS syntax, but you get the idea:

	systemd.services.battery-charge-control = {  
		description = "Set battery charging behavior";  
		script = "echo 70 > /sys/class/power_supply/BAT0/charge_start_threshold; echo 81 > /sys/class/power_supply/BAT0/charge_stop_threshold";  
		wantedBy = [ "multi-user.target" ];  
	};