With the help of a bunch of extra data and the Dell Latitude 7390 Owner's Manual, it looks like the BIOS is not configured to allow your battery to make use of some Advanced Power Management features such as charge_control_end_threshold
and charge_stop_threshold
.
The first clue was from the Permission denied
error when setting charge_control_end_threshold
, as we cannot add anything to /sys/class/
that does not already exist. When this same error appeared for charge_stop_threshold
, it forced a rethink to determine whether the battery was called BAT0
, BATT
, or BATC
(or BAT1
on a couple of Acer models). However, the final confirmation is seen with the output of the /sys/class/power_supply/BAT0/
pseudo-directory. These "files" are API interfaces when working with the battery, which is why we cannot add (or remove) any of them.
Unfortunately I do not have a Dell nearby to test this with but, according to the owner's manual, it may be possible to activate the features needed by tweaking a couple of settings in the BIOS.
Let's try this:
Reboot the machine
Enter the BIOS
⇢ Press F12 key when the Dell logo appears to access a boot menu with a list of the valid devices. Choose "Other Options" then enter "BIOS Setup"
Find "Power Management"
Find "Primary Battery Charge Configuration" and change the value to "Custom". As per the documentation:
If Custom Charge is selected, you can also configure Custom Charge Start and Custom Charge Stop.
Save the settings and boot back into Ubuntu
With this done, so long as your battery supports the ability to set (and display) charge thresholds, you should see charge_control_end_threshold
and/or charge_stop_threshold
in the /sys/class/power_supply/BAT0
location.
Hope this gives you what you're looking for 👍🏻
charge_control_end_threshold
option for any of my notebooks, but I do seecharge_stop_threshold
, which does trigger the battery to stop charging when it reaches that level. Which version of Ubuntu and what kind of notebook are you using?echo
command. That's just a typo from copying here, I hope. Have you confirmed that you have aBAT0
location in/sys/class/power_supply/
? Some installations report this asBATC
orBATT
...BAT0
directory? The "Permission denied" makes sense, as we cannot create files in these pseudo-directories. If your battery has a different set of feature descriptors, then they should appear when listing the contents ofBAT0
.