File: charge-thresholds_simulate2

package info (click to toggle)
tlp 1.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,684 kB
  • sloc: sh: 15,870; python: 1,194; makefile: 367; perl: 314; xml: 52
file content (482 lines) | stat: -rwxr-xr-x 32,822 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
#!/usr/bin/env clitest
# Test charge thresholds for non-ThinkPads (simulated) - Part 2: Macbook..Toshiba
# Requirements:
# * Hardware: non-legacy ThinkPad
# Copyright (c) 2025 Thomas Koch <linrunner at gmx.net>.
# SPDX-License-Identifier: GPL-2.0-or-later
#
$ # +++ Apple Silicon Macbooks ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$ #
$ # --- initialize, simulation precautions for the start threshold
$ sudo tlp start -- START_CHARGE_THRESH_BAT0="60" STOP_CHARGE_THRESH_BAT0="100" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ #
$ # --- tlp start
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=macbook START_CHARGE_THRESH_BAT0= STOP_CHARGE_THRESH_BAT0= START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=macbook START_CHARGE_THRESH_BAT0="42" STOP_CHARGE_THRESH_BAT0="80" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=macbook START_CHARGE_THRESH_BAT0="0" STOP_CHARGE_THRESH_BAT0="9" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
Error in configuration at STOP_CHARGE_THRESH_BAT0="9": not specified or invalid (must be 80 or 100). Battery skipped.
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=macbook START_CHARGE_THRESH_BAT0="0" STOP_CHARGE_THRESH_BAT0="101" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
Error in configuration at STOP_CHARGE_THRESH_BAT0="101": not specified or invalid (must be 80 or 100). Battery skipped.
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=macbook START_CHARGE_THRESH_BAT0="DEF" STOP_CHARGE_THRESH_BAT0="DEF" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ #
$ # --- tlp setcharge w/o arguments
$ sudo tlp setcharge 60 100 > /dev/null 2>&1 # re-initialize
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=macbook START_CHARGE_THRESH_BAT0="77" STOP_CHARGE_THRESH_BAT0="80" X_SOC_CHECK=0
Setting temporary charge thresholds for battery BAT0:
  stop  =  80
  start =  75 (due to hardware constraint)
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=macbook START_CHARGE_THRESH_BAT0="66" STOP_CHARGE_THRESH_BAT0="80" X_SOC_CHECK=0
Setting temporary charge thresholds for battery BAT0:
  stop  =  80 (no change)
  start =  75 (no change)
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=macbook START_CHARGE_THRESH_BAT0="0" STOP_CHARGE_THRESH_BAT0="XYZZY"
Error in configuration at STOP_CHARGE_THRESH_BAT0="XYZZY": not specified or invalid (must be 80 or 100). Aborted.
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=macbook START_CHARGE_THRESH_BAT0="0" STOP_CHARGE_THRESH_BAT0="42"
Error in configuration at STOP_CHARGE_THRESH_BAT0="42": not specified or invalid (must be 80 or 100). Aborted.
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=macbook START_CHARGE_THRESH_BAT0="0" STOP_CHARGE_THRESH_BAT0="101"
Error in configuration at STOP_CHARGE_THRESH_BAT0="101": not specified or invalid (must be 80 or 100). Aborted.
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=macbook START_CHARGE_THRESH_BAT0="DEF" STOP_CHARGE_THRESH_BAT0="DEF"
Setting temporary charge thresholds for battery BAT0:
  stop  = 100
  start = 100 (due to hardware constraint)
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=macbook NATACPI_ENABLE=0 TPACPI_ENABLE=0 START_CHARGE_THRESH_BAT0="DEF" STOP_CHARGE_THRESH_BAT0="DEF"
Error: there is no hardware driver support for charge thresholds.
$ #
$ # --- tlp setcharge w/ arguments
$ sudo tlp setcharge 60 100 > /dev/null 2>&1 # re-initialize
$ sudo tlp setcharge 77 80 -- X_BAT_PLUGIN_SIMULATE=macbook X_SOC_CHECK=0
Setting temporary charge thresholds for battery BAT0:
  stop  =  80
  start =  75 (due to hardware constraint)
$ sudo tlp setcharge 66 80 -- X_BAT_PLUGIN_SIMULATE=macbook X_SOC_CHECK=0
Setting temporary charge thresholds for battery BAT0:
  stop  =  80 (no change)
  start =  75 (no change)
$ sudo tlp setcharge 0 XYZZY -- X_BAT_PLUGIN_SIMULATE=macbook
Error: stop charge threshold (XYZZY) for battery BAT0 is not specified or invalid (must be 80 or 100). Aborted.
$ sudo tlp setcharge 0 42 -- X_BAT_PLUGIN_SIMULATE=macbook
Error: stop charge threshold (42) for battery BAT0 is not specified or invalid (must be 80 or 100). Aborted.
$ sudo tlp setcharge 0 101 -- X_BAT_PLUGIN_SIMULATE=macbook
Error: stop charge threshold (101) for battery BAT0 is not specified or invalid (must be 80 or 100). Aborted.
$ sudo tlp setcharge DEF DEF -- X_BAT_PLUGIN_SIMULATE=macbook
Setting temporary charge thresholds for battery BAT0:
  stop  = 100
  start = 100 (due to hardware constraint)
$ sudo tlp setcharge DEF DEF -- X_BAT_PLUGIN_SIMULATE=macbook X_THRESH_SIMULATE_READERR="1"
Error: could not read current stop charge threshold for battery BAT0. Aborted.
$ sudo tlp setcharge BAT2 -- X_BAT_PLUGIN_SIMULATE=macbook
Error: battery BAT2 not present.
$ sudo tlp setcharge 0 3 BAT2 -- X_BAT_PLUGIN_SIMULATE=macbook
Error: battery BAT2 not present.
$ sudo tlp setcharge XYZZY ABCDE BAT2 -- X_BAT_PLUGIN_SIMULATE=macbook
Error: battery BAT2 not present.
$ #
$ # --- tlp-stat
$ sudo tlp-stat -b -- X_BAT_PLUGIN_SIMULATE=macbook X_THRESH_SIMULATE_START=100 | grep -E 'BAT0/charge_control'
/sys/class/power_supply/BAT0/charge_control_start_threshold           =    100 [%]
/sys/class/power_supply/BAT0/charge_control_end_threshold             =    100 [%]
$ sudo tlp-stat -b -- X_BAT_PLUGIN_SIMULATE=macbook X_THRESH_SIMULATE_READERR=1 | grep -E 'BAT0/charge_control'
/sys/class/power_supply/BAT0/charge_control_start_threshold           = (not available) [%]
/sys/class/power_supply/BAT0/charge_control_end_threshold             = (not available) [%]
$ #
$ # +++ MSI ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$ #
$ # --- initialize
$ sudo tlp start -- START_CHARGE_THRESH_BAT0="90" STOP_CHARGE_THRESH_BAT0="100" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ #
$ # --- tlp start
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=msi START_CHARGE_THRESH_BAT0= STOP_CHARGE_THRESH_BAT0= START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=msi START_CHARGE_THRESH_BAT0="70" STOP_CHARGE_THRESH_BAT0="90" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=msi START_CHARGE_THRESH_BAT0="0" STOP_CHARGE_THRESH_BAT0="9" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
Error in configuration at STOP_CHARGE_THRESH_BAT0="9": not specified, invalid or out of range (10..100). Battery skipped.
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=msi START_CHARGE_THRESH_BAT0="0" STOP_CHARGE_THRESH_BAT0="101" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
Error in configuration at STOP_CHARGE_THRESH_BAT0="101": not specified, invalid or out of range (10..100). Battery skipped.
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=msi START_CHARGE_THRESH_BAT0="97" STOP_CHARGE_THRESH_BAT0="97" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=msi START_CHARGE_THRESH_BAT0="95" STOP_CHARGE_THRESH_BAT0="96" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=msi START_CHARGE_THRESH_BAT0="DEF" STOP_CHARGE_THRESH_BAT0="DEF" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ #
$ # --- tlp setcharge w/o arguments
$ sudo tlp setcharge 70 100 > /dev/null 2>&1 # re-initialize
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=msi START_CHARGE_THRESH_BAT0="70" STOP_CHARGE_THRESH_BAT0="90" X_SOC_CHECK=0
Setting temporary charge thresholds for battery BAT0:
  stop  =  90
  start =  80 (due to hardware constraint)
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=msi START_CHARGE_THRESH_BAT0="70" STOP_CHARGE_THRESH_BAT0="90" X_SOC_CHECK=0
Setting temporary charge thresholds for battery BAT0:
  stop  =  90 (no change)
  start =  80 (no change)
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=msi START_CHARGE_THRESH_BAT0="0" STOP_CHARGE_THRESH_BAT0="XYZZY"
Error in configuration at STOP_CHARGE_THRESH_BAT0="XYZZY": not specified, invalid or out of range (10..100). Aborted.
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=msi START_CHARGE_THRESH_BAT0="0" STOP_CHARGE_THRESH_BAT0="9"
Error in configuration at STOP_CHARGE_THRESH_BAT0="9": not specified, invalid or out of range (10..100). Aborted.
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=msi START_CHARGE_THRESH_BAT0="0" STOP_CHARGE_THRESH_BAT0="101"
Error in configuration at STOP_CHARGE_THRESH_BAT0="101": not specified, invalid or out of range (10..100). Aborted.
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=msi START_CHARGE_THRESH_BAT0="97" STOP_CHARGE_THRESH_BAT0="97" X_SOC_CHECK=0
Setting temporary charge thresholds for battery BAT0:
  stop  =  97
  start =  87 (due to hardware constraint)
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=msi START_CHARGE_THRESH_BAT0="95" STOP_CHARGE_THRESH_BAT0="96" X_SOC_CHECK=0
Setting temporary charge thresholds for battery BAT0:
  stop  =  96
  start =  86 (due to hardware constraint)
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=msi START_CHARGE_THRESH_BAT0="95" STOP_CHARGE_THRESH_BAT0="96" X_SOC_CHECK=0
Setting temporary charge thresholds for battery BAT0:
  stop  =  96 (no change)
  start =  86 (no change)
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=msi START_CHARGE_THRESH_BAT0="DEF" STOP_CHARGE_THRESH_BAT0="DEF"
Setting temporary charge thresholds for battery BAT0:
  stop  = 100
  start =  90 (due to hardware constraint)
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=msi NATACPI_ENABLE=0 TPACPI_ENABLE=0 START_CHARGE_THRESH_BAT0="DEF" STOP_CHARGE_THRESH_BAT0="DEF"
Error: there is no hardware driver support for charge thresholds.
$ #
$ # --- tlp setcharge w/ arguments
$ sudo tlp setcharge 70 100 > /dev/null 2>&1 # re-initialize
$ sudo tlp setcharge 70 90 -- X_BAT_PLUGIN_SIMULATE=msi X_SOC_CHECK=0
Setting temporary charge thresholds for battery BAT0:
  stop  =  90
  start =  80 (due to hardware constraint)
$ sudo tlp setcharge 70 90 -- X_BAT_PLUGIN_SIMULATE=msi X_SOC_CHECK=0
Setting temporary charge thresholds for battery BAT0:
  stop  =  90 (no change)
  start =  80 (no change)
$ sudo tlp setcharge 0 XYZZY -- X_BAT_PLUGIN_SIMULATE=msi
Error: stop charge threshold (XYZZY) for battery BAT0 is not specified, invalid or out of range (10..100). Aborted.
$ sudo tlp setcharge 0 9 -- X_BAT_PLUGIN_SIMULATE=msi
Error: stop charge threshold (9) for battery BAT0 is not specified, invalid or out of range (10..100). Aborted.
$ sudo tlp setcharge 0 101 -- X_BAT_PLUGIN_SIMULATE=msi
Error: stop charge threshold (101) for battery BAT0 is not specified, invalid or out of range (10..100). Aborted.
$ sudo tlp setcharge DEF DEF -- X_BAT_PLUGIN_SIMULATE=msi
Setting temporary charge thresholds for battery BAT0:
  stop  = 100
  start =  90 (due to hardware constraint)
$ sudo tlp setcharge 97 97 -- X_BAT_PLUGIN_SIMULATE=msi X_SOC_CHECK=0
Setting temporary charge thresholds for battery BAT0:
  stop  =  97
  start =  87 (due to hardware constraint)
$ sudo tlp setcharge 95 96 -- X_BAT_PLUGIN_SIMULATE=msi X_SOC_CHECK=0
Setting temporary charge thresholds for battery BAT0:
  stop  =  96
  start =  86 (due to hardware constraint)
$ sudo tlp setcharge 95 96 -- X_BAT_PLUGIN_SIMULATE=msi X_THRESH_SIMULATE_READERR="1"
Error: could not read current stop charge threshold for battery BAT0. Aborted.
$ [ -n "$VWRITE_SLEEP" ] && sleep "$VWRITE_SLEEP" # workaround: mitigate void writes (in simulation)
$ sudo tlp setcharge 95 96 -- X_BAT_PLUGIN_SIMULATE=msi X_THRESH_SIMULATE_START="60" X_THRESH_SIMULATE_STOP="100"
Setting temporary charge thresholds for battery BAT0:
  stop  =  96
  start =  86 (due to hardware constraint)
$ sudo tlp setcharge 95 96 -- X_BAT_PLUGIN_SIMULATE=msi X_SOC_CHECK=0
Setting temporary charge thresholds for battery BAT0:
  stop  =  96 (no change)
  start =  86 (no change)
$ sudo tlp setcharge BAT2 -- X_BAT_PLUGIN_SIMULATE=msi
Error: battery BAT2 not present.
$ sudo tlp setcharge 0 3 BAT2 -- X_BAT_PLUGIN_SIMULATE=msi
Error: battery BAT2 not present.
$ sudo tlp setcharge XYZZY ABCDE BAT2 -- X_BAT_PLUGIN_SIMULATE=msi
Error: battery BAT2 not present.
$ #
$ # --- tlp-stat
$ sudo tlp-stat -b -- X_BAT_PLUGIN_SIMULATE=msi | grep -E 'BAT0/charge_control'
/sys/class/power_supply/BAT0/charge_control_start_threshold =     86 [%]
/sys/class/power_supply/BAT0/charge_control_end_threshold   =     96 [%]
$ sudo tlp-stat -b -- X_BAT_PLUGIN_SIMULATE=msi X_THRESH_SIMULATE_READERR=1 | grep -E 'BAT0/charge_control'
/sys/class/power_supply/BAT0/charge_control_start_threshold = (not available) [%]
/sys/class/power_supply/BAT0/charge_control_end_threshold   = (not available) [%]
$ #
$ # +++ Samsung ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$ #
$ # --- tlp start
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=samsung START_CHARGE_THRESH_BAT0= STOP_CHARGE_THRESH_BAT0= START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=samsung START_CHARGE_THRESH_BAT0="42" STOP_CHARGE_THRESH_BAT0="24" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
Error in configuration at STOP_CHARGE_THRESH_BAT0="24": life extender not specified or invalid (must be 0 or 1). Skipped.
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=samsung START_CHARGE_THRESH_BAT0="42" STOP_CHARGE_THRESH_BAT0="1" X_THRESH_SIMULATE_STOP="0" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
Error: writing life extender failed.
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=samsung START_CHARGE_THRESH_BAT0="DEF" STOP_CHARGE_THRESH_BAT0="DEF" X_THRESH_SIMULATE_STOP="0" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=samsung NATACPI_ENABLE=0 START_CHARGE_THRESH_BAT0="DEF" STOP_CHARGE_THRESH_BAT0="DEF" 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ #
$ # --- tlp setcharge w/o arguments
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=samsung START_CHARGE_THRESH_BAT0="42" STOP_CHARGE_THRESH_BAT0="24"
Error in configuration at STOP_CHARGE_THRESH_BAT0="24": life extender not specified or invalid (must be 0 or 1). Aborted.
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=samsung START_CHARGE_THRESH_BAT0="42" STOP_CHARGE_THRESH_BAT0="1" X_THRESH_SIMULATE_STOP="0"
Setting temporary charge threshold for all batteries:
  life extender = 1 (Error: write failed)
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=samsung NATACPI_ENABLE=0 START_CHARGE_THRESH_BAT0="DEF" STOP_CHARGE_THRESH_BAT0="DEF"
Error: there is no hardware driver support for charge thresholds.
$ #
$ # --- tlp setcharge w/ arguments
$ sudo tlp setcharge 42 24 -- X_BAT_PLUGIN_SIMULATE=samsung
Error: life extender (24) not specified or invalid (must be 0 or 1). Aborted.
$ sudo tlp setcharge ABCDE XYZZY -- X_BAT_PLUGIN_SIMULATE=samsung
Error: life extender (XYZZY) not specified or invalid (must be 0 or 1). Aborted.
$ sudo tlp setcharge 42 1 -- X_BAT_PLUGIN_SIMULATE=samsung X_THRESH_SIMULATE_STOP="0"
Setting temporary charge threshold for all batteries:
  life extender = 1 (Error: write failed)
$ sudo tlp setcharge 42 1 -- X_BAT_PLUGIN_SIMULATE=samsung X_THRESH_SIMULATE_STOP="1" X_SOC_CHECK=0
Setting temporary charge threshold for all batteries:
  life extender = 1 (no change)
$ sudo tlp setcharge DEF DEF -- X_BAT_PLUGIN_SIMULATE=samsung X_THRESH_SIMULATE_STOP="0"
Setting temporary charge threshold for all batteries:
  life extender = 0 (no change)
$ sudo tlp setcharge 42 24 BAT2 -- X_BAT_PLUGIN_SIMULATE=samsung
Error: battery BAT2 not present.
$ sudo tlp setcharge BAT2 -- X_BAT_PLUGIN_SIMULATE=samsung
Error: battery BAT2 not present.
$ #
$ # --- tlp-stat
$ sudo tlp-stat -b -- X_BAT_PLUGIN_SIMULATE=samsung | grep "battery_life_extender"
/sys/devices/platform/samsung/battery_life_extender         = (not available)
$ #
$ # +++ Sony ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$ #
$ # --- tlp start
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=sony START_CHARGE_THRESH_BAT0= STOP_CHARGE_THRESH_BAT0= START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=sony START_CHARGE_THRESH_BAT0="42" STOP_CHARGE_THRESH_BAT0="24" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
Error in configuration at STOP_CHARGE_THRESH_BAT0="24": care limiter not specified or invalid (must be 50, 80 or 100). Skipped.
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=sony START_CHARGE_THRESH_BAT0="42" STOP_CHARGE_THRESH_BAT0="50" X_THRESH_SIMULATE_STOP="0" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
Error: writing care limiter failed.
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=sony START_CHARGE_THRESH_BAT0="42" STOP_CHARGE_THRESH_BAT0="80" X_THRESH_SIMULATE_STOP="50" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
Error: writing care limiter failed.
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=sony START_CHARGE_THRESH_BAT0="42" STOP_CHARGE_THRESH_BAT0="100" X_THRESH_SIMULATE_STOP="80" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
Error: writing care limiter failed.
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=sony START_CHARGE_THRESH_BAT0="DEF" STOP_CHARGE_THRESH_BAT0="DEF" X_THRESH_SIMULATE_STOP="50" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
Error: writing care limiter failed.
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=sony NATACPI_ENABLE=0 START_CHARGE_THRESH_BAT0="DEF" STOP_CHARGE_THRESH_BAT0="DEF" 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ #
$ # --- tlp setcharge w/o arguments
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=sony START_CHARGE_THRESH_BAT0="42" STOP_CHARGE_THRESH_BAT0="24"
Error in configuration at STOP_CHARGE_THRESH_BAT0="24": care limiter not specified or invalid (must be 50, 80 or 100). Aborted.
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=sony START_CHARGE_THRESH_BAT0="ABCDE" STOP_CHARGE_THRESH_BAT0="XYZZY"
Error in configuration at STOP_CHARGE_THRESH_BAT0="XYZZY": care limiter not specified or invalid (must be 50, 80 or 100). Aborted.
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=sony START_CHARGE_THRESH_BAT0="42" STOP_CHARGE_THRESH_BAT0="50" X_THRESH_SIMULATE_STOP="0"
Setting temporary charge threshold for all batteries:
  care limiter =  50 (Error: write failed)
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=sony START_CHARGE_THRESH_BAT0="42" STOP_CHARGE_THRESH_BAT0="80" X_THRESH_SIMULATE_STOP="50"
Setting temporary charge threshold for all batteries:
  care limiter =  80 (Error: write failed)
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=sony START_CHARGE_THRESH_BAT0="42" STOP_CHARGE_THRESH_BAT0="100" X_THRESH_SIMULATE_STOP="80"
Setting temporary charge threshold for all batteries:
  care limiter = 100 (Error: write failed)
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=sony NATACPI_ENABLE=0 START_CHARGE_THRESH_BAT0="DEF" STOP_CHARGE_THRESH_BAT0="DEF"
Error: there is no hardware driver support for charge thresholds.
$ #
$ # --- tlp setcharge w/ arguments
$ sudo tlp setcharge 42 24 -- X_BAT_PLUGIN_SIMULATE=sony
Error: care limiter (24) not specified or invalid (must be 50, 80 or 100). Aborted.
$ sudo tlp setcharge ABCDE XYZZY -- X_BAT_PLUGIN_SIMULATE=sony
Error: care limiter (XYZZY) not specified or invalid (must be 50, 80 or 100). Aborted.
$ sudo tlp setcharge 42 50 -- X_BAT_PLUGIN_SIMULATE=sony X_THRESH_SIMULATE_STOP="0"
Setting temporary charge threshold for all batteries:
  care limiter =  50 (Error: write failed)
$ sudo tlp setcharge 42 80 -- X_BAT_PLUGIN_SIMULATE=sony X_THRESH_SIMULATE_STOP="50"
Setting temporary charge threshold for all batteries:
  care limiter =  80 (Error: write failed)
$ sudo tlp setcharge 42 100 -- X_BAT_PLUGIN_SIMULATE=sony X_THRESH_SIMULATE_STOP="80"
Setting temporary charge threshold for all batteries:
  care limiter = 100 (Error: write failed)
$ sudo tlp setcharge 42 80 -- X_BAT_PLUGIN_SIMULATE=sony X_THRESH_SIMULATE_STOP="80" X_SOC_CHECK=0
Setting temporary charge threshold for all batteries:
  care limiter =  80 (no change)
$ sudo tlp setcharge DEF DEF -- X_BAT_PLUGIN_SIMULATE=sony X_THRESH_SIMULATE_STOP="0" X_SOC_CHECK=0
Setting temporary charge threshold for all batteries:
  care limiter = 100 (no change)
$ sudo tlp setcharge 42 24 BAT2 -- X_BAT_PLUGIN_SIMULATE=sony
Error: battery BAT2 not present.
$ sudo tlp setcharge 2 -- X_BAT_PLUGIN_SIMULATE=sony
Error: battery 2 not present.
$ #
$ # --- tlp-stat
$ sudo tlp-stat -b -- X_BAT_PLUGIN_SIMULATE=sony | grep "battery_care_limiter"
/sys/devices/platform/sony-laptop/battery_care_limiter      = (not available) [%]
$ #
$ # +++ System76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$ #
$ # --- tlp start
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=system76 START_CHARGE_THRESH_BAT0= STOP_CHARGE_THRESH_BAT0= START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=system76 START_CHARGE_THRESH_BAT0="60" STOP_CHARGE_THRESH_BAT0="100" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=system76 START_CHARGE_THRESH_BAT0="100" STOP_CHARGE_THRESH_BAT0="100" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
Error in configuration at START_CHARGE_THRESH_BAT0="100": not specified, invalid or out of range (0..99). Battery skipped.
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=system76 START_CHARGE_THRESH_BAT0="0" STOP_CHARGE_THRESH_BAT0="0" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
Error in configuration at STOP_CHARGE_THRESH_BAT0="0": not specified, invalid or out of range (1..100). Battery skipped.
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=system76 START_CHARGE_THRESH_BAT0="0" STOP_CHARGE_THRESH_BAT0="101" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
Error in configuration at STOP_CHARGE_THRESH_BAT0="101": not specified, invalid or out of range (1..100). Battery skipped.
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=system76 START_CHARGE_THRESH_BAT0="97" STOP_CHARGE_THRESH_BAT0="97" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
Error in configuration: START_CHARGE_THRESH_BAT0 >= STOP_CHARGE_THRESH_BAT0. Battery skipped.
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=system76 START_CHARGE_THRESH_BAT0="95" STOP_CHARGE_THRESH_BAT0="96" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ [ -n "$VWRITE_SLEEP" ] && sleep "$VWRITE_SLEEP" # workaround: mitigate void writes (in simulation)
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=system76 START_CHARGE_THRESH_BAT0="DEF" STOP_CHARGE_THRESH_BAT0="DEF" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ #
$ # --- tlp setcharge w/o arguments
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=system76  START_CHARGE_THRESH_BAT0="60" STOP_CHARGE_THRESH_BAT0="100"
Setting temporary charge thresholds for battery BAT0:
  start =  60
  stop  = 100 (no change)
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=system76 START_CHARGE_THRESH_BAT0="100" STOP_CHARGE_THRESH_BAT0="100"
Error in configuration at START_CHARGE_THRESH_BAT0="100": not specified, invalid or out of range (0..99). Aborted.
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=system76 START_CHARGE_THRESH_BAT0="ABCDE" STOP_CHARGE_THRESH_BAT0="100"
Error in configuration at START_CHARGE_THRESH_BAT0="ABCDE": not specified, invalid or out of range (0..99). Aborted.
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=system76 START_CHARGE_THRESH_BAT0="0" STOP_CHARGE_THRESH_BAT0="0"
Error in configuration at STOP_CHARGE_THRESH_BAT0="0": not specified, invalid or out of range (1..100). Aborted.
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=system76 START_CHARGE_THRESH_BAT0="0" STOP_CHARGE_THRESH_BAT0="101"
Error in configuration at STOP_CHARGE_THRESH_BAT0="101": not specified, invalid or out of range (1..100). Aborted.
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=system76 START_CHARGE_THRESH_BAT0="0" STOP_CHARGE_THRESH_BAT0="XYZZY"
Error in configuration at STOP_CHARGE_THRESH_BAT0="XYZZY": not specified, invalid or out of range (1..100). Aborted.
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=system76 START_CHARGE_THRESH_BAT0="97" STOP_CHARGE_THRESH_BAT0="97"
Error in configuration: START_CHARGE_THRESH_BAT0 >= STOP_CHARGE_THRESH_BAT0. Aborted.
$ [ -n "$VWRITE_SLEEP" ] && sleep "$VWRITE_SLEEP" # workaround: mitigate void writes (in simulation)
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=system76 START_CHARGE_THRESH_BAT0="95" STOP_CHARGE_THRESH_BAT0="96" X_SOC_CHECK=0
Setting temporary charge thresholds for battery BAT0:
  start =  95
  stop  =  96
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=system76 START_CHARGE_THRESH_BAT0="95" STOP_CHARGE_THRESH_BAT0="96" X_SOC_CHECK=0
Setting temporary charge thresholds for battery BAT0:
  start =  95 (no change)
  stop  =  96 (no change)
$ [ -n "$VWRITE_SLEEP" ] && sleep "$VWRITE_SLEEP" # workaround: mitigate void writes (in simulation)
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=system76 START_CHARGE_THRESH_BAT0="DEF" STOP_CHARGE_THRESH_BAT0="DEF"
Setting temporary charge thresholds for battery BAT0:
  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: there is no hardware driver support for charge thresholds.
$ #
$ # --- tlp setcharge w/ arguments
$ sudo tlp setcharge 60 100 -- X_BAT_PLUGIN_SIMULATE=system76
Setting temporary charge thresholds for battery BAT0:
  start =  60
  stop  = 100 (no change)
$ sudo tlp setcharge 100 100 -- X_BAT_PLUGIN_SIMULATE=system76
Error: start charge threshold (100) for battery BAT0 is not specified, invalid or out of range (0..99). Aborted.
$ sudo tlp setcharge 0 0 -- X_BAT_PLUGIN_SIMULATE=system76
Error: stop charge threshold (0) for battery BAT0 is not specified, invalid or out of range (1..100). Aborted.
$ sudo tlp setcharge 0 101 -- X_BAT_PLUGIN_SIMULATE=system76
Error: stop charge threshold (101) for battery BAT0 is not specified, invalid or out of range (1..100). Aborted.
$ sudo tlp setcharge ABCDE 0 -- X_BAT_PLUGIN_SIMULATE=system76
Error: start charge threshold (ABCDE) for battery BAT0 is not specified, invalid or out of range (0..99). Aborted.
$ sudo tlp setcharge 0 XYZZY -- X_BAT_PLUGIN_SIMULATE=system76
Error: stop charge threshold (XYZZY) for battery BAT0 is not specified, invalid or out of range (1..100). Aborted.
$ sudo tlp setcharge 97 97 -- X_BAT_PLUGIN_SIMULATE=system76
Error: start threshold >= stop threshold for battery BAT0. Aborted.
$ sudo tlp setcharge 95 96 -- X_BAT_PLUGIN_SIMULATE=system76 X_SOC_CHECK=0
Setting temporary charge thresholds for battery BAT0:
  start =  95
  stop  =  96
$ sudo tlp setcharge 95 96 -- X_BAT_PLUGIN_SIMULATE=system76 X_THRESH_SIMULATE_READERR="1"
Error: could not read current charge threshold(s) for battery BAT0. Aborted.
$ [ -n "$VWRITE_SLEEP" ] && sleep "$VWRITE_SLEEP" # workaround: mitigate void writes (in simulation)
$ sudo tlp setcharge 95 96 -- X_BAT_PLUGIN_SIMULATE=system76 X_THRESH_SIMULATE_START="60" X_THRESH_SIMULATE_STOP="100"
Setting temporary charge thresholds for battery BAT0:
  start =  95
  stop  =  96
$ sudo tlp setcharge 95 96 -- X_BAT_PLUGIN_SIMULATE=system76 X_SOC_CHECK=0
Setting temporary charge thresholds for battery BAT0:
  start =  95 (no change)
  stop  =  96 (no change)
$ [ -n "$VWRITE_SLEEP" ] && sleep "$VWRITE_SLEEP" # workaround: mitigate void writes
$ sudo tlp setcharge DEF DEF -- X_BAT_PLUGIN_SIMULATE=system76
Setting temporary charge thresholds for battery BAT0:
  start =  90
  stop  = 100
$ sudo tlp setcharge BAT2 -- X_BAT_PLUGIN_SIMULATE=system76
Error: battery BAT2 not present.
$ sudo tlp setcharge 0 3 BAT2 -- X_BAT_PLUGIN_SIMULATE=system76
Error: battery BAT2 not present.
$ sudo tlp setcharge XYZZY ABCDE BAT2 -- X_BAT_PLUGIN_SIMULATE=system76
Error: battery BAT2 not present.
$ #
$ # --- tlp-stat
$ sudo tlp-stat -b -- X_BAT_PLUGIN_SIMULATE=system76 | grep -E 'BAT0/charge_control'
/sys/class/power_supply/BAT0/charge_control_start_threshold =     90 [%]
/sys/class/power_supply/BAT0/charge_control_end_threshold   =    100 [%]
$ sudo tlp-stat -b -- X_BAT_PLUGIN_SIMULATE=system76 X_THRESH_SIMULATE_READERR=1 | grep -E 'BAT0/charge_control'
/sys/class/power_supply/BAT0/charge_control_start_threshold = (not available) [%]
/sys/class/power_supply/BAT0/charge_control_end_threshold   = (not available) [%]
$ #
$ # +++ Toshiba/Dynabook ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$ #
$ # --- initialize
$ sudo tlp start -- START_CHARGE_THRESH_BAT0="35" STOP_CHARGE_THRESH_BAT0="100" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ #
$ # --- tlp start
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=toshiba START_CHARGE_THRESH_BAT0= STOP_CHARGE_THRESH_BAT0= START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=toshiba START_CHARGE_THRESH_BAT0="42" STOP_CHARGE_THRESH_BAT0="24" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
Error in configuration at STOP_CHARGE_THRESH_BAT0="24": not specified or invalid (must be 80 or 100). Battery skipped.
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=toshiba START_CHARGE_THRESH_BAT0="42" STOP_CHARGE_THRESH_BAT0="80" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=toshiba START_CHARGE_THRESH_BAT0="DEF" STOP_CHARGE_THRESH_BAT0="DEF" START_CHARGE_THRESH_BAT1= STOP_CHARGE_THRESH_BAT1= 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ sudo tlp start -- X_BAT_PLUGIN_SIMULATE=toshiba NATACPI_ENABLE=0 START_CHARGE_THRESH_BAT0="DEF" STOP_CHARGE_THRESH_BAT0="DEF" 2>&1 | sed -r "s/(TLP started).*/\1/"
TLP started
$ #
$ # --- tlp setcharge w/o arguments
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=toshiba START_CHARGE_THRESH_BAT0="42" STOP_CHARGE_THRESH_BAT0="24"
Error in configuration at STOP_CHARGE_THRESH_BAT0="24": not specified or invalid (must be 80 or 100). Aborted.
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=toshiba START_CHARGE_THRESH_BAT0="ABCDE" STOP_CHARGE_THRESH_BAT0="XYZZY"
Error in configuration at STOP_CHARGE_THRESH_BAT0="XYZZY": not specified or invalid (must be 80 or 100). Aborted.
$ sudo tlp setcharge -- X_BAT_PLUGIN_SIMULATE=toshiba START_CHARGE_THRESH_BAT0="DEF" STOP_CHARGE_THRESH_BAT0="DEF"
Setting temporary charge threshold for battery BAT0:
  stop  = 100 (no change)
$ #
$ # --- tlp setcharge w/ arguments
$ sudo tlp setcharge 42 24 -- X_BAT_PLUGIN_SIMULATE=toshiba
Error: stop charge threshold (24) for battery BAT0 is not specified or invalid (must be 80 or 100). Aborted.
$ sudo tlp setcharge ABCDE XYZZY -- X_BAT_PLUGIN_SIMULATE=toshiba
Error: stop charge threshold (XYZZY) for battery BAT0 is not specified or invalid (must be 80 or 100). Aborted.
$ sudo tlp setcharge 42 100 -- X_BAT_PLUGIN_SIMULATE=toshiba
Setting temporary charge threshold for battery BAT0:
  stop  = 100 (no change)
$ sudo tlp setcharge 42 80 -- X_BAT_PLUGIN_SIMULATE=toshiba X_SOC_CHECK=0
Setting temporary charge threshold for battery BAT0:
  stop  =  80
$ sudo tlp setcharge DEF DEF -- X_BAT_PLUGIN_SIMULATE=toshiba
Setting temporary charge threshold for battery BAT0:
  stop  = 100
$ sudo tlp setcharge 42 80 BAT2 -- X_BAT_PLUGIN_SIMULATE=toshiba
Error: battery BAT2 not present.
$ sudo tlp setcharge BAT2 -- X_BAT_PLUGIN_SIMULATE=toshiba
Error: battery BAT2 not present.
$ #
$ # --- tlp-stat
$ sudo tlp-stat -b -- X_BAT_PLUGIN_SIMULATE=toshiba | grep -E 'BAT0/charge_control'
/sys/class/power_supply/BAT0/charge_control_end_threshold   =    100 [%]
$ #
$ # --- Reset test machine to configured thresholds
$ sudo tlp setcharge BAT0  > /dev/null 2>&1
$ #