-
Notifications
You must be signed in to change notification settings - Fork 133
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
[T440p Coreboot] False battery readings #657
Comments
Hi, your Gist link doesn't work. |
Fixed the link |
Coreboot does not return the correct model string as the original BIOS via /sys/class/dmi/id/product_version. As a workaround you can try to configure:
Then show This information here is also wrong:
These are not mA(h) values but mW(h) values missing the last digit (I can conclude that because 56,000 mWh is a typical battery size for the T440p). See #626 (comment) . You should create a Coreboot bug report for both of your issues. |
Yes, the battery is 57 Wh. Here is the tlp-stat on ac: The env variable did work to convince it it is a t440p. Here's the battery variables you said were wrong (so TLP was just detecting the wrong unit?)
|
No, the kernel returns wrong values and I suppose it gets them from the BIOS via ACPI. Actually there are two sets of battery sysfiles, one for W units and one for A units (I have added dots as thousand separators for clarity): (1) W units scheme -- energy = J = Wh
(2) A units scheme -- charge = C = Ah
But your values are not plausible: the 6-cell with 57 Wh has a nominal voltage of ~11,5V resulting in ~4,96 Ah not 5,61 Ah. The correct kernel response would be in your case: So my conclusion based on your values is that Coreboot provides the battery values to the kernel in the wrong scheme. TLP accepts only the W units scheme for ThinkPads and thus doesn't display the A units sysfiles. Including a workaround in TLP for Coreboot wouldn't make sense, because the A unit values provided are incorrect anyway. |
Btw: you don't need |
@karstenes : Any news on this? Did you file a Coreboot bug yet? |
@linrunner sorry, been busy and forgot to. Anything else you want in the bug report other than what has been discussed? |
@karstenes My key points are all in #657 (comment) |
@karstenes Anything new to report here? |
Nothing as of now. The coreboot issue has not been responded to as of now. |
Do you mind posting the link to the coreboot issue here? |
Libreboot shows the same symptoms: https://thinkpad-forum.de/threads/projektvorstellung-tlp-%E2%80%93-linux-stromsparen.82441/post-2349536 |
apparently this was addressed some time ago? https://review.coreboot.org/c/coreboot/+/23178 |
@diabl0w The world does not only consist of charge thresholds. If you look at the output of @karstenes, you will see that the battery as well as the charge thresholds are recognized and thus should work.
The issue here is that false battery readings are provided by Coreboot. See my exhaustive explanation. If you are affected by this, please contribute by updating the coreboot bug or creating your own. Just asking here does not bring us closer to a solution. |
interesting, i guess i thought that was the only thing in the world. or more likely i made an innocemt error as i was naviagting a few things at once. who knows... anyways, i apologize for the false positive and i appreciate you looking into the feedback. i will go ahead and ping the current open coreboot report to being attention to it |
@linrunner, in fact, i do recall where that link came from. it came from Patrick Rudolph, a coreboot maintainer, who linked to that commit as a fix for the battery recalibration issue. perhaps he thinks thresholds are the only thing in the world as well: https://ticket.coreboot.org/issues/156 and, i obtained that link from the link i posted in my original comment which linked here |
…eboot Rationale: Coreboot and Libreboot provide ACPI mW(h) data incorrectly - using sysfiles for mA(h) - one decimal place too little Workaround: interpret values from /sys/class/power_supply/BAT[01]/ {charge_full*,charge_now,current_now} as mW(h) References: * #657 * https://thinkpad-forum.de/threads/projektvorstellung-tlp-%E2%80%93-linux-stromsparen.82441/page-118#post-2318015 * https://ticket.coreboot.org/issues/448
@karstenes @ALL Since no one from the Core- or Libreboot developers feels obliged to fix the problem, I changed my mind and added a workaround for the missing battery data in Packages are available here: https://download.linrunner.de/packages/ Please show the output of
|
Initial testing happened here. More tester are welcome! |
Hi @karstenes @diabl0w : TLP 1.7 Beta 1 is out with the corresponding change. Please verify -> #760 |
The beta test is complete, and TLP 1.7.0 is now available. Have fun! A huge thank you to all of our wonderful contributors, testers, and bug reporters! 👍 |
Describe the bug
TLP does not detect my original thinkpad T440p battery on open-rc artix on coreboot. I have made sure acpi_call and thinkpad_acpi are running and I am able to control the fans through thinkpad_acpi. TLP continues to use the generic driver for the battery however. I have tried running linux-lts (linux 5.15.74-1) but no luck with that either.
Expected behavior
TLP detects the battery and uses the modern thinkpad driver.
To Reproduce
The problem occurs on both battery and AC. I am not sure how to reproduce, but my system is the latest artix linux openrc edition. I am running this on the latest skulls coreboot release as well.
Here is my tlp-stat:
https://gist.github.com/karstenes/f8e1b6f220c1d6d12df2587338814bee
The text was updated successfully, but these errors were encountered: