Librem14: battctl

Hey there,

Since the Librem 14 allows to control the charging behavior, I made a little daemon that listens to udev events relative to power supply state and will do the following (all timings and values are configurable)

  • if power supply is connected, wait 24h, then switch charging thresholds to 40/95
  • If power supply is disconnected, wait 30m then switch charging thresholds to 90/95

This allows to adapt the charging thresholds to help maximize battery life based on how mobile you are. It is available here:

On Arch, it’s published on the AUR and you can install battctl-git

Feedback and insults welcome!



What do you mean by that? Maximize the number of hours that you can run on battery i.e. time between charges? Or maximize the lifespan of the battery itself i.e. the number of years before it no longer holds adequate charge and has to be replaced?

lifespan of battery he means. :stuck_out_tongue:

I mean maximizing the lifespan of the battery. It basically automates what’s said in this post (§ Battery Control):


This is great. I really like that the Librem 14 is capable of this. It is an appealing feature.


I am happy that you produced such a tool. However, I would be happy if you could add a Makefile or at least a Description on how to compile it.

I probably should and certainly will. However this is a go tool, so it’s always the same:

  • install go (sometimes called golang by certain distro (or simply go there
  • clone my repo and cd into it
  • run go build and move the produced binary into your path (probably /usr/bin)