r/coreboot • • Jan 24 '20

t440p - ACPI errors

Hi, I am trying to figure out why some of the (previously working) functions do not work on my corebooted t440p (battery threshold, keyboard backlight etc) and it all seem to boil down to ACPI errors. This seems to be somewhat confirmed if you check a stock bios, as an example for kbd backlit:

Stock has tpacpi::kbd_backlight -> ../../devices/platform/thinkpad_acpi/leds/tpacpi::kbd_backlight in /sys/class/leds while on coreboot this 'device' is not created by kernel hence no chance to control the backlit.

for tpacpi, stock in dmesg looks like this: thinkpad_acpi: ThinkPad ACPI Extras v0.26 thinkpad_acpi: http://ibm-acpi.sf.net/
thinkpad_acpi: ThinkPad BIOS GLETA0WW (2.54 ), EC GLHT30WW for my coreboot: ThinkPad BIOS CBET4000 0da4d8c80f-dirty, EC GLHT30WW-3.2 - I can't figure out why it outputs the BIOS version as 'XXX-dirty' other's do not seem to have this issue, seems like there's some issue on my end, but I can't figure out what exactly..

As for the ACPI errors, here's what I see in my kernel log:

[   65.432174] thinkpad_acpi: acpi_evalf(BCTG, dd, ...) failed: AE_NOT_FOUND
[   65.432178] ACPI: _SB_.PCI0.LPCB.EC__.HKEY: BCTG: evaluate failed
[   66.180453] thinkpad_acpi: acpi_evalf(BCTG, dd, ...) failed: AE_NOT_FOUND
[   66.180461] ACPI: _SB_.PCI0.LPCB.EC__.HKEY: BCTG: evaluate failed
[   66.200322] thinkpad_acpi: acpi_evalf(BCTG, dd, ...) failed: AE_NOT_FOUND
[   66.200331] ACPI: _SB_.PCI0.LPCB.EC__.HKEY: BCTG: evaluate failed
[  115.575684] acpi_call: Cannot get handle: Error: AE_NOT_FOUND
[  264.776139] acpi_call: Cannot get handle: Error: AE_NOT_FOUND
[ 1148.744628] thinkpad_acpi: acpi_evalf(BCTG, dd, ...) failed: AE_NOT_FOUND
[ 1148.744634] ACPI: _SB_.PCI0.LPCB.EC__.HKEY: BCTG: evaluate failed
[ 1149.515367] thinkpad_acpi: acpi_evalf(BCTG, dd, ...) failed: AE_NOT_FOUND
[ 1149.515374] ACPI: _SB_.PCI0.LPCB.EC__.HKEY: BCTG: evaluate failed
[ 1149.536480] thinkpad_acpi: acpi_evalf(BCTG, dd, ...) failed: AE_NOT_FOUND
[ 1149.536488] ACPI: _SB_.PCI0.LPCB.EC__.HKEY: BCTG: evaluate failed
[ 2033.645267] thinkpad_acpi: acpi_evalf(BCTG, dd, ...) failed: AE_NOT_FOUND
[ 2033.645272] ACPI: _SB_.PCI0.LPCB.EC__.HKEY: BCTG: evaluate failed

When trying to set battery charging thresholds via tpacpi-bat I get this error: Error: AE_NOT_FOUND for ASL base: _SB.PCI0.LPCB.EC.HKEY

I also get some ACPI related errors when shutting down, but can't for the life of me find them in the logs..

Also when building the new firmware today I noticed: You can now run IASL ACPI compiler from /home/user/coreboot/util/crossgcc/xgcc but I can't find any documentantion for this on the coreboot site.. So right now I am not sure if I am chasing a red herring here or this is indeed related?

Would someone smarter/more experienced with coreboot than me chime in, and maybe point me in the right direction? :) thanks a lot!

Edit: i hate reddit text editor...

7 Upvotes

27 comments sorted by

View all comments

Show parent comments

1

u/whizz_inf May 15 '20

I don't think so, I compiled the latest release and it pops up as soon as tlp starts:

[ 28.321680] thinkpad_acpi: acpi_evalf(BCTG, dd, ...) failed: AE_NOT_FOUND

[ 28.333497] thinkpad_acpi: acpi_evalf(BCTG, dd, ...) failed: AE_NOT_FOUND

1

u/whizz_inf May 15 '20

TLP also reports that none of the battery callibration or methods for setting a threshold work [NATACPI/TPACPI/TPSMAPI]. On my other T440p with the stock bios there are no errors and tlp detects everything correctly.

1

u/MrChromebox May 15 '20

so try with the change then?

1

u/whizz_inf May 15 '20

My apology, I did not understand your point or maybe i formulated my question incorrectly. On a t440p with coreboot 4.12 and tlp installed errors crop up at boot or every time tlp is invoked but on a second machine with the lenovo bios and tlp ACPI works fine with no errors.

1

u/MrChromebox May 15 '20

I meant, you should try making the change I mentioned earlier:

https://www.reddit.com/r/coreboot/comments/etdee6/t440p_acpi_errors/ffng3rt/

ie, add the missing ACPI include

1

u/whizz_inf May 16 '20

Thank you so much, you're a star! I built a new rom with the suggested changes and the errors are gone, tlp works and the natacpi driver can now see the data and manipulate the thresholds.

1

u/MrChromebox May 16 '20

ok great, just need to push these changes upstream now

1

u/whizz_inf May 16 '20

1

u/MrChromebox May 16 '20

great, thanks for doing that. Added a few comments to help you tidy things up :)

1

u/whizz_inf May 16 '20

You helped me out and i saw a lot of users trying to make it work without success which is why i tried to push the patch upstream. I have also updated other threads to let users to test and improve the patch if needed.

→ More replies (0)

1

u/whizz_inf May 16 '20 edited May 17 '20

Can I ask you something else please? I traced the origin of the patch for other models in Coreboot and it is mentioned that tpacpi-bat also works but I've checked on my x230 and it's not the case just like on the t440p. A user on Skulls has suggested to use the following to recallibrate but there must be a better way:

./ectool -w 0xb4 -z 0x06

https://review.coreboot.org/plugins/gitiles/coreboot/+/93d6ba0889d0247ac264172858ef57698c960464

lm_sensors also work well on the x230 but some data seem to be missing on the t440p and i need to manually find the sensors and add them to configs for things like thinkfan to work. Can this also be fixed as the system cannot read or find /proc/acpi/ibm/*

find /sys/devices -type f -name "temp*_input"