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

2

u/MrChromebox Jan 24 '20

IIRC, there's something with the t440 currently that prevents the coreboot driver that injects the required info (into SMBIOS) for the ThinkPad ACPI driver to attach. But I could be mistaken.

pastebin the output of 'sudo dmidecode'?

3

u/[deleted] Jan 24 '20

4

u/MrChromebox Jan 24 '20

from that, I can see that the Lenovo serials driver, which reads data from the EC to populate the SMBIOS tables, is being compiled in (because the coreboot version is modified) but the EC queries are failing (mainboard part #, serial, UUID are not set as expected).

but looking closer, the issue is that the t440p, unlike the x230 (eg), does not include the Kconfig symbol H8_HAS_BAT_TRESHOLDS_IMPL. That Kconfig is what causes the battery threshold ACPI to be included with the EC ACPI. I'm not sure why it's not (not a Thinkpad expert by any means), but you could try adding it to the t440p Kconfig (add select H8_HAS_BAT_TRESHOLDS_IMPL to src/mainboard/lenovo/Kconfig @ ln 25) and then doing a clean build.

Also when building the new firmware today I noticed: <snip>

not at all related, that's just telling you that the ACPI compiler part of the crossgcc toolchain has been built.

2

u/[deleted] Jan 24 '20

Thanks a lot for your input, gonna test it over weekend and see how it goes.

2

u/[deleted] Jan 25 '20

Btw, since it was late at night y'day for me, does it matter that nothing came after the snip I have pasted y'day regarding IASL AcPI? It right after said the build is complete.. considering all the acpi issued I'd like to make sure I didn't miss anything

2

u/[deleted] Jan 25 '20 edited Jan 25 '20

select H8_HAS_BAT_TRESHOLDS_IMPL

I tried this out but dsdt.aml doesn't get generated correctly.

2

u/MrChromebox Jan 25 '20

will have to take a closer look then, try to build here

1

u/MrChromebox Jan 26 '20

looks like you also need to add

#include <ec/lenovo/h8/acpi/thinkpad_bat_thresholds_b0.asl>

in src/mainboard/lenovo/t44p/acpi/ec.asl

just like the x230 has

1

u/[deleted] Jan 26 '20

Thanks, that builds at least. I'll update when I get a chance to flash it.

2

u/MrChromebox Jan 26 '20

if it were me, I'd dump the Lenovo ACPI tables for the t440p and compare, so I'd know if the existing coreboot battery threshold ACPI was left out on purpose or accidentally

1

u/irudog Jan 27 '20

not on purpose, I hadn't tested this function when I was doing this port.

1

u/MrChromebox Jan 27 '20

ah ok, didn't realize you were the one that ported it

1

u/whizz_inf May 15 '20

u/uint4096_t did this fix work for you? u/MrChromebox I have two machines one with and the other without Coreboot, how can i help fix this issue?

2

u/MrChromebox May 15 '20

I don't have a t440 to test, but I believe the issue has been fixed in upstream coreboot

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

→ More replies (0)