My Librem 14 was failing to charge with PureOS. I switched out the power cord that goes into the provided transformer with a spare Australian cord I had laying around. The transformer says it supports 50Hz and 240v supply so that shouldn’t be a problem.
The solution was;
sudo apt install librem-ec-acpi-dkms
0. This is the problem as the laptop will only start charging when it is completely dead.
echo 90 | sudo tee /sys/class/power_supply/BAT0/charge_control_start_threshold
90 can be any value between 0 and 100. Your laptop should start to charge!
cat does not output a number or you get an error (no such file or directory, or permission denied) check the directory and file exists. If not, update CoreBoot.
All the battery settings are found in
p.s. There’s chat on L14-battery-constant-discharge-charge-in-qubes and I didn’t want to derail the conversation.
p.p.s. Got to love everything on Linux is a file.
Edit: changed nano to tee as its a nice solution.