Skip to content

Commit

Permalink
bat.d/system76: set default start threshold to 90%
Browse files Browse the repository at this point in the history
Due to EC firmware change made by the vendor.

Reference:
* system76/ec#401
  • Loading branch information
linrunner committed Aug 21, 2023
1 parent a5b2939 commit 48e32a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bat.d/45-system76
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ batdrv_init () {
_bn_stop=""
_batteries=""
# vendor defaults
_bt_def_start=0
_bt_def_start=90
_bt_def_stop=100

# iterate batteries and check for native kernel ACPI
Expand Down Expand Up @@ -502,7 +502,7 @@ batdrv_show_battery_data () {
esac
if [ "$_bm_thresh" != "none" ]; then
printf "Parameter value ranges:\n"
printf "* START_CHARGE_THRESH_BAT0: 0(off)..99\n"
printf "* START_CHARGE_THRESH_BAT0: 0(off)..90(default)..99\n"
printf "* STOP_CHARGE_THRESH_BAT0: 1..100(default)\n"
fi
printf "\n"
Expand Down
4 changes: 2 additions & 2 deletions unit-tests/charge-thresholds_simulate
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ Setting temporary charge thresholds for BAT0:
stop = 96 (no change)
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=system76 START_CHARGE_THRESH_BAT0="DEF" STOP_CHARGE_THRESH_BAT0="DEF"
Setting temporary charge thresholds for BAT0:
start = 0
start = 90
stop = 100
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=system76 NATACPI_ENABLE=0 TPACPI_ENABLE=0 START_CHARGE_THRESH_BAT0="DEF" STOP_CHARGE_THRESH_BAT0="DEF"
Error: battery charge thresholds not available.
Expand Down Expand Up @@ -576,7 +576,7 @@ Setting temporary charge thresholds for BAT0:
stop = 96 (no change)
$ sudo tlp setcharge DEF DEF -- X_BAT_PLUGIN_SIMULATE=system76
Setting temporary charge thresholds for BAT0:
start = 0
start = 90
stop = 100
$ sudo tlp setcharge BAT1 -- X_BAT_PLUGIN_SIMULATE=system76
Error: battery BAT1 not present.
Expand Down

0 comments on commit 48e32a9

Please sign in to comment.