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
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
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_stop_threshold in the
Hope this gives you what you're looking for 👍🏻