Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TLP 1.8 Beta] Call for testers #781

Open
linrunner opened this issue Jan 19, 2025 · 18 comments
Open

[TLP 1.8 Beta] Call for testers #781

linrunner opened this issue Jan 19, 2025 · 18 comments

Comments

@linrunner
Copy link
Owner

linrunner commented Jan 19, 2025

Hi @ALL,

I'm looking forward to your help with test coverage, as with every beta release!

Test Objectives

  1. General regression testing (check if everything still works for you)

    • When changing the power source AC <-> BAT, do the tunables change accordingly (compare output of tlp-stat)?
    • Can the charge thresholds be changed ?
    • Does tlp recalibrate still work? - ThinkPads only
  2. Battery Care

    • Check that the newly supported hardware can set the charge threshold(s):
      • Chromebooks (modded with chrultrabook/coreboot custom UEFI firmware) and Framewok laptops: kernel 6.12.8 or later required - also supporting recalibration and targeted discharge (ex: sudo tlp discharge 80 ), please pay attention to the related warnings
      • Dell laptops - kernel 6.12 or later required
    • ThinkPads: checkout discharging to a target percentage - ex: sudo tlp discharge 80

Beta Packages - Arch, Debian/Ubuntu, Fedora
See the download page.

What do I need from the testers?
After installing please reboot. After that I expect your unabbreviated outputs of

sudo tlp-stat

on battery and AC (via Gist please).

Bug Reports
If something does not work as expected → please open an issue.

I appreciate your feedback on the beta :-)

References

@Sempro97
Copy link

Sempro97 commented Jan 19, 2025

Hi!

@samuelemusiani
Copy link

Hi, the following link should have both AC and BATT. Let me know if you need anything else:
https://gist.github.com/samuelemusiani/aff1b982fecf130247454f3b0c3192a4

@linrunner
Copy link
Owner Author

@samuelemusiani Thank you. Thresholds have not yet been applied by TLP, they were probably already there before. Please run this and show the output

sudo tlp setcharge
sudo tlp-stat -s -v -b

@samuelemusiani
Copy link

The first command fails, i don't know why:

samu@leibniz ~ $ sudo tlp setcharge
Setting temporary charge thresholds for battery BAT0:
Error: failed to set 'Custom' charge type for battery BAT0. Aborted.
samu@leibniz ~ $ sudo tlp-stat -s -v -b
--- TLP 1.8.0-beta.1 --------------------------------------------

+++ System Info
System         = Dell Inc.  Latitude 7400 2-in-1
BIOS           = 1.23.0
OS Release     = Arch Linux
Kernel         = 6.12.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 18 Jan 2025 02:26:57 +0000 x86_64
/proc/cmdline  = initrd=\initramfs-linux.img cryptdevice=UUID=adb7306c-57c0-48c9-bce7-cb36fbad084f:cryptroot root=/dev/mapper/cryptroot rw
Init system    = systemd 
Boot mode      = UEFI
Suspend mode   = [s2idle] deep

+++ TLP Status
State          = enabled
RDW state      = enabled
Last run       = 02:19:27 PM, 800 sec(s) ago
Mode           = battery
Power source   = battery

+++ Battery Care
Plugin: dell
Supported features: charge thresholds
Driver usage:
* natacpi (dell_laptop) = active (charge thresholds)
Parameter value ranges:
* START_CHARGE_THRESH_BAT0/1:  50..95(default)
* STOP_CHARGE_THRESH_BAT0/1:   55..100(default)

+++ Battery Status: BAT0
/sys/class/power_supply/BAT0/manufacturer                   = SMP
/sys/class/power_supply/BAT0/model_name                     = DELL 85XM894
/sys/class/power_supply/BAT0/cycle_count                    =      0 (or not supported)
/sys/class/power_supply/BAT0/charge_full_design             =   6843 [mAh]
/sys/class/power_supply/BAT0/charge_full                    =   4668 [mAh]
/sys/class/power_supply/BAT0/charge_now                     =   3605 [mAh]
/sys/class/power_supply/BAT0/current_now                    =   1051 [mA]
/sys/class/power_supply/BAT0/status                         = Discharging

/sys/class/power_supply/BAT0/voltage_min_design             =   7600 [mV]
/sys/class/power_supply/BAT0/voltage_now                    =   8138 [mV]

/sys/class/power_supply/BAT0/charge_control_start_threshold =     50 [%]
/sys/class/power_supply/BAT0/charge_control_end_threshold   =     90 [%]
/sys/class/power_supply/BAT0/charge_types                   = [Trickle] Fast Standard Adaptive Custom

Charge                                                      =   77.2 [%]
Capacity                                                    =   68.2 [%]

@linrunner
Copy link
Owner Author

linrunner commented Jan 22, 2025

We still have a problem with the new Dell plugin.

After you, @Sempro97, were unable to write the thresholds with TLP in your first test, you helped yourself with cctk and set charge_types to Custom. After that, tlp setcharge worked.

I then extended the code by setting charge_types to Custom before writing the thresholds.

In your test, @samuelemusiani, however, the writing of charge_types fails.

At the moment I am at a loss as to how TLP could get Dell laptops to accept threshold values. Which is also due to the fact that I don't know this hardware better.

I only had a brief opportunity to test on a Dell. It initially had charge_types set to Adaptive and changing it to Custom and afterwards writing the thresholds worked immediately.

I don't find it acceptable that it would take an intervention with cctk to get TLP to work.

Any ideas guys?

@linrunner
Copy link
Owner Author

Packages for Fedora are online in the Beta Repo.

@Senior-Moe
Copy link

Senior-Moe commented Jan 24, 2025

Device: Thinkpad E590
OS: Voidlinux

I am using Thinkpad E590 and this output for tlp-stat -b after plug it on the charger:

$  sudo tlp-stat -b
--- TLP 1.8.0-beta.1 --------------------------------------------

+++ Battery Care
Plugin: thinkpad
Supported features: charge thresholds, recalibration
Driver usage:
* natacpi (thinkpad_acpi) = active (charge thresholds, recalibration)
Parameter value ranges:
* START_CHARGE_THRESH_BAT0/1:  0(off)..96(default)..99
* STOP_CHARGE_THRESH_BAT0/1:   1..100(default)

+++ ThinkPad Battery Status: BAT0 (Main / Internal)
/sys/class/power_supply/BAT0/manufacturer                   = Celxpert
/sys/class/power_supply/BAT0/model_name                     = 01AV448
/sys/class/power_supply/BAT0/cycle_count                    =    877
/sys/class/power_supply/BAT0/energy_full_design             =  45730 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  36610 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  35000 [mWh]
/sys/class/power_supply/BAT0/power_now                      =      0 [mW]
/sys/class/power_supply/BAT0/status                         = Not charging

/sys/class/power_supply/BAT0/charge_control_start_threshold =     95 [%]
/sys/class/power_supply/BAT0/charge_control_end_threshold   =    100 [%]
/sys/class/power_supply/BAT0/charge_behaviour               = [auto] inhibit-charge force-discharge

Charge                                                      =   95.6 [%]
Capacity                                                    =   80.1 [%]

if I remove charger:

 λ sudo tlp-stat -b
--- TLP 1.8.0-beta.1 --------------------------------------------

+++ Battery Care
Plugin: thinkpad
Supported features: charge thresholds, recalibration
Driver usage:
* natacpi (thinkpad_acpi) = active (charge thresholds, recalibration)
Parameter value ranges:
* START_CHARGE_THRESH_BAT0/1:  0(off)..96(default)..99
* STOP_CHARGE_THRESH_BAT0/1:   1..100(default)

+++ ThinkPad Battery Status: BAT0 (Main / Internal)
/sys/class/power_supply/BAT0/manufacturer                   = Celxpert
/sys/class/power_supply/BAT0/model_name                     = 01AV448
/sys/class/power_supply/BAT0/cycle_count                    =    877
/sys/class/power_supply/BAT0/energy_full_design             =  45730 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  36610 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  34990 [mWh]
/sys/class/power_supply/BAT0/power_now                      =   3186 [mW]
/sys/class/power_supply/BAT0/status                         = Discharging

/sys/class/power_supply/BAT0/charge_control_start_threshold =     95 [%]
/sys/class/power_supply/BAT0/charge_control_end_threshold   =    100 [%]
/sys/class/power_supply/BAT0/charge_behaviour               = [auto] inhibit-charge force-discharge

Charge                                                      =   95.6 [%]
Capacity                                                    =   80.1 [%]

It is not charging.

also if I tested ontlp recalibrate BAT0 command , the outputs are :

Currently discharging battery BAT0 to 0% (0 mWh):
voltage            =  12048 [mV]
remaining energy   =  35080 [mWh]
remaining percent  =   95.8 [%]
remaining time     =    482 [min]
power              =   4361 [mW]
status             = Discharging
force-discharge    = 1
Press Ctrl+C to cancel.

finally, the output of sudo tlp discharge 90 is:

Currently discharging battery BAT0 to 90% (32949 mWh):
voltage            =  12161 [mV]
remaining energy   =  34810 [mWh]
remaining percent  =   95.1 [%]
remaining time     =     26 [min]
power              =   4195 [mW]
status             = Discharging
force-discharge    = 1
Press Ctrl+C to cancel.
Error: battery BAT0 discharge was aborted early -- check your hardware (battery, charger).

I will return to version 1.7 to use my device while see this reply.

@linrunner
Copy link
Owner Author

linrunner commented Jan 24, 2025

@Senior-Moe

/sys/class/power_supply/BAT0/status = Not charging
/sys/class/power_supply/BAT0/charge_control_start_threshold = 95 [%]
/sys/class/power_supply/BAT0/charge_control_end_threshold = 100 [%]
Charge = 95.6 [%]

The charge level 95.6% ist above the start charge threshold 95%, so the Thinkpad is not charging. Normal and expected behaviour.

if I remove charger:
/sys/class/power_supply/BAT0/status = Discharging
It is not charging.

If the charger is not connected, it does not charge, of course. Expected behaviour as well.

also if I tested ontlp recalibrate BAT0 command , the outputs are:
Currently discharging battery BAT0 to 0% (0 mWh):
voltage = 12048 [mV]
remaining energy = 35080 [mWh]
remaining percent = 95.8 [%]
remaining time = 482 [min]
power = 4361 [mW]
status = Discharging
force-discharge = 1
Press Ctrl+C to cancel.

Why don't you just wait until the charge level is below the start threshold, for example 90%, and then cancel with Ctrl+C? Then the condition to charge is met again.

Up to this point, I only see problems of understanding regarding charge thresholds on your part, but no problem at all in TLP.

Error: battery BAT0 discharge was aborted early -- check your hardware (battery, charger).

This could be a problem, but until my previous questions have been clarified, I would like to put this on hold.

I will return to version 1.7 to use my device while see this reply.

1.7 will not change the charge behaviour of your ThinkPad.

@Senior-Moe
Copy link

Senior-Moe commented Jan 24, 2025

@linrunner

I only see problems of understanding regarding charge thresholds on your part, but no problem at all in TLP.

You are clearly right, what if

Why don't you just wait until the charge level is below the start threshold, for example 90%, and then cancel with Ctrl+C?

I made it again when the charger level was 82, the output is:

$ sudo tlp-stat -b
--- TLP 1.8.0-beta.1 --------------------------------------------

+++ Battery Care
Plugin: thinkpad
Supported features: charge thresholds, recalibration
Driver usage:
* natacpi (thinkpad_acpi) = active (charge thresholds, recalibration)
Parameter value ranges:
* START_CHARGE_THRESH_BAT0/1:  0(off)..96(default)..99
* STOP_CHARGE_THRESH_BAT0/1:   1..100(default)

+++ ThinkPad Battery Status: BAT0 (Main / Internal)
/sys/class/power_supply/BAT0/manufacturer                   = Celxpert
/sys/class/power_supply/BAT0/model_name                     = 01AV448
/sys/class/power_supply/BAT0/cycle_count                    =    877
/sys/class/power_supply/BAT0/energy_full_design             =  45730 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  36610 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  30290 [mWh]
/sys/class/power_supply/BAT0/power_now                      =   5759 [mW]
/sys/class/power_supply/BAT0/status                         = Discharging

/sys/class/power_supply/BAT0/charge_control_start_threshold =     96 [%]
/sys/class/power_supply/BAT0/charge_control_end_threshold   =    100 [%]
/sys/class/power_supply/BAT0/charge_behaviour               = [auto] inhibit-charge force-discharge

Charge                                                      =   82.7 [%]
Capacity                                                    =   80.1 [%]

Other command, tlp recalibrate BAT0 the output is:

$ sudo tlp recalibrate BAT0
Setting temporary charge thresholds for battery BAT0:
  start =  96 (no change)
  stop  = 100 (no change)
Initiating discharge of battery BAT0 ...............
Error: discharge BAT0 malfunction -- check your hardware (battery, charger).

finally:

 $ sudo tlp discharge 90
Error: target level (90%) is too high compared to the actual charge level (82%) of battery BAT0.
$ sudo tlp discharge 80
Initiating discharge of battery BAT0 ...............
Error: discharge BAT0 malfunction -- check your hardware (battery, charger).

1.7 will not change the charge behaviour of your ThinkPad.

Yes, you are right. the laptop was not charging then I assume the issue in TLP. it is recharge it after reading man pages by command sudo tlp setcharge

Battery
AC

@linrunner
Copy link
Owner Author

linrunner commented Jan 24, 2025

@Senior-Moe

Error: discharge BAT0 malfunction -- check your hardware (battery, charger).

I am far from convinced that this is an issue in TLP. The force-discharge function of your ThinkPad cannot be activated. Did you try with 1.7 yet?

Shut down the system. Then press the emergency reset hole on the bottom with a paper clip. Switch on and start up. Try

sudo tlp discharge # without target level! 

again.

@Senior-Moe
Copy link

Senior-Moe commented Jan 24, 2025

@linrunner
My model doesn't have emergency reset hole on the bottom or any place. here is the manual of E590 and this instruction:

For models without an emergency reset hole: Disconnect all power sources. Press and hold the power button for about seven seconds. Then, reconnect to ac power and restart the computer.

the output:

Currently discharging battery BAT0 to 0% (0 mWh):
voltage            =  11460 [mV]
remaining energy   =  30490 [mWh]
remaining percent  =   83.3 [%]
remaining time     =    126 [min]
power              =  14416 [mW]
status             = Discharging
force-discharge    = 1
Press Ctrl+C to cancel.

it is stop charging.

I am far from convinced that this is an issue in TLP. The force-discharge function of your ThinkPad cannot be activated. Did you try with 1.7 yet?

Not yet, waiting your sign to reinstall version 1.7 and I will share the output.

edit: mistake in model word.

@Senior-Moe
Copy link

@linrunner
on the version 1.7 the output of sudo tlp discharge :

Currently discharging battery BAT0:
voltage            =  11506 [mV]
remaining capacity =  29240 [mWh]
remaining percent  =     79 [%]
remaining time     =    121 [min]
power              =  14440 [mW]
status             = Discharging
force-discharge    = 1
Press Ctrl+C to cancel.

tlp-stat without cancel tlp discharge :
AC
Battery

when I cancelled sudo tlp discharge on 1.7 it recharge normally:

AC
Barrery

@linrunner
Copy link
Owner Author

@Senior-Moe How many dots does tlp discharge (TLP 1.7) show when initiating discharge?

Initiating discharge of battery BAT0 ...............

@Senior-Moe
Copy link

Senior-Moe commented Jan 24, 2025

@linrunner

How many dots does tlp discharge (TLP 1.7) show when initiating discharge?

On the 1.7 only 4 dots.

On the 1.8 it take long like this:

    Initiating discharge of battery BAT0 ...............

I didn't count it.

@linrunner
Copy link
Owner Author

OK. So there is an issue with 1.8. I'll have to think about how to debug this. I guess I'll get back to you on sunday.

I didn't count it.

No problem. It should be 15 dots (corresponding to 15 secs), after that the routine aborts.

@linrunner
Copy link
Owner Author

@Sempro97 @samuelemusiani Analysis of the Dell threshold write errors continues in #785. Please post any new findings there.

@linrunner
Copy link
Owner Author

linrunner commented Jan 25, 2025

@Senior-Moe ThinkPad E590 discharge malfunction: please continue in #784.

@linrunner linrunner added this to the 1.8 Release milestone Jan 26, 2025
@linrunner
Copy link
Owner Author

Many thanks to all testers up to here! 👍

Have you noticed anything else during operation with version 1.8?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants