Closed RaistGH closed 9 months ago
The intended battery care plugin for your constellation is lg-legacy. Why it is not invoked in your case we have to find out. I will check my code, whether I notice something.
Please add the output of
tlp-stat -s
ls -al /sys/devices/platform/lg-laptop/
Yes, the patch worked :) Thanks!
Below requested outputs with working patch:
sudo tlp-stat -s -b
--- TLP 1.6.1 --------------------------------------------
+++ System Info
System = LG Electronics 0.1 14Z990-V.AA55B
BIOS = W1ZD1250 X64
OS Release = Ubuntu 20.04.6 LTS
Kernel = 5.15.0-83-generic #92~20.04.1-Ubuntu SMP Mon Aug 21 14:00:49 UTC 2023 x86_64
/proc/cmdline = BOOT_IMAGE=/boot/vmlinuz-5.15.0-83-generic root=UUID=ebf88faf-c8e4-40d8-81c2-3d6b7a9cdb93 ro pci=nommconf quiet splash vt.handoff=7
Init system = systemd v245 (245.4-4ubuntu3.22)
Boot mode = UEFI
Suspend mode = s2idle [deep]
+++ TLP Status
State = enabled
RDW state = enabled
Last run = 22:31:18, 77 sec(s) ago
Mode = AC
Power source = AC
+++ Battery Care
Plugin: lg-legacy
Supported features: charge threshold
Driver usage:
* vendor (lg_laptop) = active (charge threshold)
Parameter value range:
* STOP_CHARGE_THRESH_BAT0: 80(on), 100(off) -- battery care limit
/sys/devices/platform/lg-laptop/battery_care_limit = 100 [%]
+++ Battery Status: CMB0
/sys/class/power_supply/CMB0/manufacturer = LG
/sys/class/power_supply/CMB0/model_name = LGC-LGC
/sys/class/power_supply/CMB0/cycle_count = 648
/sys/class/power_supply/CMB0/energy_full_design = 72770 [mWh]
/sys/class/power_supply/CMB0/energy_full = 53400 [mWh]
/sys/class/power_supply/CMB0/energy_now = 14420 [mWh]
/sys/class/power_supply/CMB0/power_now = 25230 [mW]
/sys/class/power_supply/CMB0/status = Charging
Charge = 27.0 [%]
Capacity = 73.4 [%]
ls -al /sys/devices/platform/lg-laptop/
total 0
drwxr-xr-x 4 root root 0 sep 14 17:05 .
drwxr-xr-x 33 root root 0 sep 13 00:59 ..
-rw-r--r-- 1 root root 4096 sep 15 22:31 battery_care_limit
lrwxrwxrwx 1 root root 0 sep 14 17:05 driver -> ../../../bus/platform/drivers/lg-laptop
-rw-r--r-- 1 root root 4096 sep 14 17:05 driver_override
-rw-r--r-- 1 root root 4096 sep 14 17:05 fan_mode
-rw-r--r-- 1 root root 4096 sep 14 18:03 fn_lock
drwxr-xr-x 4 root root 0 sep 14 17:05 leds
-r--r--r-- 1 root root 4096 sep 14 17:05 modalias
drwxr-xr-x 2 root root 0 sep 14 17:05 power
-rw-r--r-- 1 root root 4096 sep 14 17:08 reader_mode
lrwxrwxrwx 1 root root 0 sep 14 17:05 subsystem -> ../../../bus/platform
-rw-r--r-- 1 root root 4096 sep 14 17:05 uevent
-rw-r--r-- 1 root root 4096 sep 14 17:05 usb_charge
Great. Thanks for reporting this.
I just released TLP 1.6.1. PPA packages are on the way.
[x] I've read and accepted the Bug Reporting Howto [x] I've provided all required
tlp-stat
outputs via Gist (see below)Describe the bug
Since new 1.6 version in LG Gram laptop shows an error when trying
tlp setcharge
ortlp fullcharge
: "Error: battery charge thresholds not available." and/sys/devices/platform/lg-laptop/battery_care_limit
value is not written.Expected behavior
/sys/devices/platform/lg-laptop/battery_care_limit
to be written when executing tlp commandsTo Reproduce
Additional context
I cannot downgrade to previous TLP version. Repository only shows newest version (1.6.0-2) and maximum version in Ubuntu repository is 1.3.1-2 version and support was only added for version 1.4. My previous working version was 1.5.0-2.
Checking TLP documentation for LG it says that Kernel 5.18 and newer uses
charge_control_end_threshold
attribute instead ofbattery_care_limit
, however kernel version is 5.15 and/sys/class/power_supply/CMB0/
directory doesn't contain any file related to charge control: