Closed rickysarraf closed 2 years ago
On a ThinkPad T14 Gen2 with Linux 5.15, one can directly write the thresholds to sysfs, which I wrote through exec-modules
Like:
rrs@priyasi:.../BAT0$ for x in charge_*; do echo $x; cat $x; done
charge_control_end_threshold
90
charge_control_start_threshold
60
charge_start_threshold
60
charge_stop_threshold
90
22:14 ♒ ॐ ♅ ♄ ⛢ ☺ 😄
rrs@priyasi:.../BAT0$ pwd
/sys/class/power_supply/BAT0
22:14 ♒ ॐ ♅ ♄ ⛢ ☺ 😄
Note to self: Is this all enough ? Is there any additional trigger required to trigger the charge disconnect ? Any events ? Not sure if the thresholds are in effect when the trip point reaches.
tpacpi-bat
and acpi_call (out-of-tree kernel module)
are not really needed on (modern) ThinkPads that are supported through the thinkpad-acpi.ko
in-tree kernel module.
As for machines supported by thinkpad-acpi.ko
(including T14 Gen2
), there's nothing much to do than just writing the values in sysfs
.
So good job on part of thinkpad-acpi
and there's nothing much to do here. Closing.
On a ThinkPad T14 Gen2 with Linux 5.15, one can directly write the thresholds to sysfs, which I wrote through
exec-modules
Note to self: Is this all enough ? Is there any additional trigger required to trigger the charge disconnect ? Any events ? Not sure if the thresholds are in effect when the trip point reaches.
To answer my question, nothing is really needed to be done. The ThinkPad EC is in control of the AC charge connect/disconnect. The kernel sysfs is only used to write the charge threshold; nothing more.
Also to note is that: Start Threshold: 60
and Stop Threshold: 90
means:
90
60
), once it reaches 90
.On a ThinkPad T14 Gen2 with Linux 5.15, one can directly write the thresholds to sysfs, which I wrote through
exec-modules
Note to self: Is this all enough ? Is there any additional trigger required to trigger the charge disconnect ? Any events ? Not sure if the thresholds are in effect when the trip point reaches.To answer my question, nothing is really needed to be done. The ThinkPad EC is in control of the AC charge connect/disconnect. The kernel sysfs is only used to write the charge threshold; nothing more.
Also to note is that:
Start Threshold: 60
andStop Threshold: 90
means:* That when on AC, charge will not go beyond `90` * And also that when on AC, charge will not go on battery (and discharge to `60`), once it reaches `90`.
Another important bit:
battery current charge
in between the thresholds. For example, if you disconnect your laptop at 90, do some work, and when you reconnect at 65; the battery won't trigger a charge to 90. The battery only triggers when the battery current charge
falls below the lower threshold, i.e. 60. So, when the battery current charge
is say 55, then when you connect to AC, it'll charge all the way till max threshold, i.e. 90.
Describe the bug Explore
charge threshold
feature on the ThinkPad.Notes:
acpi-call
version 1.2.2+tpacpi