Closed pramodhrachuri closed 9 months ago
Ok. Looking into it. I just to confirm. Let me know if the statement i make below is correct.
2.bho off = no threshold = threshold at 100%
bho on = (what ever you set the threshold).
value of threshold can be any value between 50 to 80. Can I set value to 51?
What is you path to the charger? usually is it at /sys/class/power_supply/ could be example AC0 or AC1 or ADP0 or may be some custom name. it should have a node/file called online inside which reads 1 when charger is plugged in or 0 when charger is disconnected.
Also what version of Gnome are you using? I will send a test version when it is ready. Let me know.
EDIT: I read further. and the values supported are in multiples of 5 And path for charger is /sys/class/power_supply/AC0/online Just confirm it though
You got all of them correct, lol.
I use 42.9 on Ubuntu 22.04.3.
And thank you very much for the hard work you are putting into this!
Also I want to know what does read command output when bho is off. Can you run the 3 command below in that order/sequence and give me the output of the command
razer-cli write bho on 70 razer-cli write bho off razer-cli read bho
Ah. I forgot to include that in the first comment. Here you go
pramodh@darkhold:~➤ razer-cli write bho on 70
RES: SetBatteryHealthOptimizer { result: true }
Battery health optimization is on with a threshold of 70
pramodh@darkhold:~➤ razer-cli write bho off
RES: SetBatteryHealthOptimizer { result: true }
Successfully turned off bho
pramodh@darkhold:~➤ razer-cli read bho
RES: GetBatteryHealthOptimizer { is_on: false, threshold: 80 }
Battery health optimization is off
Please test this test.zip
Run ./install.sh
if you get and msgfmt error install gettext
sudo apt install gettext
Test the extension, if it doesnt work send me the output of journalctl -f -o cat /usr/bin/gnome-shell
from terminal.
Try different level of threshold. Check the extension on reboot / login
Also test the charging icon behaviour.
Works well! I have cross-checked if the limits are being applied using the read command, which works!
A few nitpicks
this.endBalancedRangeMax = 80;
this.endBalancedRangeMin = 65;
this.endMaxLifeSpanRangeMax = 80;
this.endMaxLifeSpanRangeMin = 50;
I will do the reboot, logout-login testing and update you.
It seems pretty stable even after three reboots and a couple of logout-logins. Thank you very much! Let me know whenever you push the update to extensions.gnome.org. I will let others in the Razer-Linux community
Edit: the charging indicator works too
Thanks for adding compatibility to Razer in the main branch. I just got the update from Gnome Extensions. However, some parameters still need to be changed in Razer.js.
Razer-cli doesn't need root access.
this.deviceNeedRootPermission = true;
The supported range of percentages is 50 to 80, both included.
this.endBalancedRangeMax = 80;
this.endBalancedRangeMin = 65;
this.endMaxLifeSpanRangeMax = 80;
this.endMaxLifeSpanRangeMin = 45;
Razer-cli doesn't need root access.
I will have look at this. And try to implement it at the next update.
The supported range of percentages is 50 to 80, both included.
I didnt understand, can you explain it better? this.endMaxLifeSpanRangeMin is set already set 50 and not 45
Do you also want me to change this.endBalancedRangeMin to 50?
this.endMaxLifeSpanRangeMin is set already set 50 and not 45
Sorry my bad. Confused with the behaviour of the extension due to the old version. The current endMaxLifeSpanRangeMin is correct. But endBalancedRangeMax and endMaxLifeSpanRangeMax have to be changed to 80. My apolories for the confusion.
I can experiment with deviceNeedRootPermission and let you know if the extension works without it.
No. I wont work.
Lol. I am blind. I didnt realise it was 85.. and not 80
Uninstall Polkit rules from extension settings since razer-cli doesnt need root. Uninstall the extension.
Install test-no-root.zip Log off Log in Check if it works. It should not show any notification regarding polkit rules In extension settings, It should not display an option to install / remove polkit rules. Let me know
Works! There is no notification regarding polkit rules and no option in the settings.
I have uploaded new verion on gnome extension site. If all works well, kindly close this issue. Thanks for the information and testing
Everything works. Thanks for the awesome extension!
You add compatibility to razer by using the following repo https://github.com/Razer-Linux/razer-laptop-control-no-dkms
Example commands