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)