Score:0

charge_control_end_threshold not writable

bb flag

I was trying to put a charging threshold on my laptop (Huawei matebook 13), this functionality works on windows and worked on my previous linux install (Ubuntu 22.04 LTS). I tried doing the same stuff specified here, but I encountered the problem below. I tried to use bash -c echo 25 > /sys/class/power_supply/BAT0/charge_control_end_threshold even with root, but I always get the same permission denied error.

I checked this:

e@e:~$ ll /sys/class/power_supply/BAT0/charge_control_end_threshold \
-rw-r--r-- 1 root root 4096 May 10 11:40 /sys/class/power_supply/BAT0/charge_control_end_threshold

e@e:~$ ll /sys/class/power_supply/BAT0 \
lrwxrwxrwx 1 root root 0 May 10 11:39 /sys/class/power_supply/BAT0 -> ../[redacted]/power_supply/BAT0/

so the file should be writable, still it is not. Any suggestion?

  • OS: Ubuntu 23.04
  • I tried using TLP; it didn't worked (idk what to check)
Score:0
sh flag
Max

Not too sure but read althought this is present charge_control_end_threshold there are some issue where if charge_control_start_threshold is greater than charge_control_end_threshold you cannot set it. I am not sure if your issue is due to this.

For this Huawei devs have provide an option to set both start and end settings at the same time. If you want to set start threshold at 50 and end threshold at 60 you can use this command

echo "50 60" | sudo tee /sys/devices/platform/huawei-wmi/charge_control_thresholds

Alternatively you can use Battery Health Charging Gnome extension (if you are using gnome) to control threshold.

https://extensions.gnome.org/extension/5724/battery-health-charging/

It provides a GUI way to set threshold and supports most of the laptop brands on various distro's running gnome.

Another note. Do not set your threshold to 25%. Recomended values by most manufacturer are 50-60 or 70-80, (depending on your usage)

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.