That’s the vim antifeature - the .swp file in the same directory in which is the file being edited. Not all directories are writable, but files in them might. And this is the case with /sys filesystem.
Try updating the file this way, as root: echo 90 > /sys/class/power_supply/BAT0/charge_control_start_threshold
sudo su then echo 90 >sys/... would work. sudo echo 90 >sys/... is not working, because first shell tries to open /sys/… (as regular user) and only then would execute the sudo. Since regular users can’t write to files in /sys, the shell get’s permission denied error, and does not even try to execute the sudo.
Any output redirections (the bits with a > sign) are not part of the command, but instruction for the shell, where output should go. So unless the shell itself runs as root, output redirections will not be able to write to restricted locations where only root can write.
sudo nano is admittedly simpler than sudo su; echo; exit (one command vs three).
If the value for /sys/class/power_supply/BAT0/charge_control_end_threshold is 0
Then run:
echo ‘40’ | sudo tee -a /sys/class/power_supply/BAT0/charge_control_start_threshold
echo ‘95’ | sudo tee -a /sys/class/power_supply/BAT0/charge_control_end_threshold
All seems to be working fine for me now. I will be curious if he next software update overwrites any of these changes. I’m new to all this, so not sure how it is handled.
Also I have noticed that first you have to update charge_control_end_threshold i.e. 95 only then you will be able to set charge_control_start_threshold 90.
Hi Dean, I don’t have the threshold files in my file directory to change. I updated my PureBoot, but when I tried to update Coreboot I got a warning saying that I would lose all of my Pureboot settings. If I choose to update Coreboot, does this mean I lose the functionality of the Librem Key, or can I still be using PureBoot after that? Updating only PureBoot has not given me the missing file.
I’m on Linux Mint 20.1 Cinnamon, I’m attempting to run sudo apt install librem-ec-acpi-dkms but I’m getting Unable to locate package librem-ec-acpi-dkms. Can someone point me to where I can add the librem-ec-acpi-dkms repository to my machine to be able to download it?
This is the only real hurdle I see to Linux adoption. Adding repos from other distros, and understanding all that this means is not easy.
Using the Pure OS repo on Mint might break your distro, or upgrade packages to be incompatible with Mint. However, I’m not sure you can add a repo and lock it only one file from that repo?
It would be great if Purism separated Coreboot into its own repo this way, you would have no problem updating it on whatever distro you used. (Perhaps Purism already does this, for this very reason. I don’t know.)
Ah dang, I thought Coreboot was separated out into it’s own repo. Ah well! Would I be able to boot up a live USB of PureOS and update Coreboot that way?