You are not logged in.
Greetings! The wiki page states that charge threshold is *supported*. On TLP website, I followed the instuction for 'Other Lenovo' laptops, and got the following:
$ sudo tlp-stat -b
--- TLP 1.7.0 --------------------------------------------
+++ Battery Care
Plugin: lenovo
Supported features: charge threshold
Driver usage:
* vendor (ideapad_laptop) = active (charge threshold)
Parameter value range:
* STOP_CHARGE_THRESH_BAT0: 0(off), 1(on) -- battery conservation mode
/sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode = 1 (on)
+++ Battery Status: BAT0
/sys/class/power_supply/BAT0/manufacturer = Celxpert
/sys/class/power_supply/BAT0/model_name = L22C4PA1
/sys/class/power_supply/BAT0/cycle_count = 2
/sys/class/power_supply/BAT0/energy_full_design = 71000 [mWh]
/sys/class/power_supply/BAT0/energy_full = 72420 [mWh]
/sys/class/power_supply/BAT0/energy_now = 24230 [mWh]
/sys/class/power_supply/BAT0/power_now = 2912 [mW]
/sys/class/power_supply/BAT0/status = Discharging
Charge = 33.5 [%]
Capacity = 102.0 [%]
Meanwhile threshold didn't work, even after several reboots. (Battery is low because I am writing this post factum).
Then I found this page, made sure ideapad_laptop is loaded and did echo - no effect. Following the link in the 'Note:' box, I installed acpi and acpi_call and echoed the solution as root. I checked the value and got:
# echo '\_SB.PCI0.LPCB.EC0.VPC0.SBMC 0' >/proc/acpi/call
# cat /proc/acpi/call
Error: AE_NOT_FOUND
Moreover, searching for 'acpi_call' in journalctl -b (https://0x0.st/8oXF.txt):
Jan 13 15:25:10 f kernel: acpi_call: loading out-of-tree module taints kernel.
Jan 13 15:25:10 f kernel: acpi_call: module verification failed: signature and/or required key missing - tainting kernel
If they're somehow related. Web searching the message, people point out BIOS incompability (?). The journal is fresh and "recreated", because I didn't record anything initially, and documenting only now.
Last edited by flatmoll (2025-01-15 19:43:16)
Offline
Update:
I've noticed that usual charge threshold files aren't present in the BAT0 folder.
Alongside I tried to create (touch/echo/tee) them, but got 'Permission denied' even as root.
$ ls /sys/class/power_supply/BAT0/
alarm energy_full_design power_now type
capacity energy_now present uevent
capacity_level hwmon2 serial_number voltage_min_design
cycle_count manufacturer status voltage_now
device model_name subsystem
energy_full power technology
Either TLP fails to set thresholds, or there is a different way for this laptop.
Last edited by flatmoll (2025-01-15 18:48:11)
Offline
Solution:
Disregard the instructions I followed.
The only supported thresholds are 80 for stop and 75 for start; simply put them in TLP configuration.
No need to create anything in /sys/class/power_supply/BAT0/, and no need in acpi and acpi_call.
Last edited by flatmoll (2025-01-15 19:44:09)
Offline
This is interesting behaviour, can you tell us how you figured it out? Do the charge limit entries appear under /sys/class/... after you set those 75/80 thresholds?
Offline
This is interesting behaviour, can you tell us how you figured it out? Do the charge limit entries appear under /sys/class/... after you set those 75/80 thresholds?
No, they didn't appear - I guess the ideapad_laptop module manages it in some other way (the way firmware supports it).
I was setting values between 50 and 80, incrementing by 10 and charging by little, trying to bypass each limit, until is capped at 79%.
It may be the case that once enabled, charge threshold will always be at 80% regardless of the value in TLP config.
Last edited by flatmoll (2025-01-15 20:40:52)
Offline