Bug 203199 - ACPI errors when plugin/unplugin AC on Lenovo T580
Summary: ACPI errors when plugin/unplugin AC on Lenovo T580
Status: RESOLVED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: ACPICA-Core (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: acpi_acpica-core@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-09 11:48 UTC by Laurent Bigonville
Modified: 2019-12-08 19:52 UTC (History)
3 users (show)

See Also:
Kernel Version: 4.19
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg (76.38 KB, text/plain)
2019-04-09 11:48 UTC, Laurent Bigonville
Details
acpidump (1.09 MB, text/plain)
2019-04-09 12:02 UTC, Laurent Bigonville
Details
acpidump 1.21 (1.10 MB, text/plain)
2019-05-16 11:07 UTC, Laurent Bigonville
Details

Description Laurent Bigonville 2019-04-09 11:48:19 UTC
Created attachment 282191 [details]
dmesg

Hello,

When plugin/unplugin the AC on my lenovo T580, I see the following error in dmesg:

[   79.024942] ACPI Error: AE_AML_PACKAGE_LIMIT, Index (0x000000008) is beyond end of object (length 0x8) (20180810/exoparg2-396)
[   79.025000] ACPI Error: Method parse/execution failed \_SB.PCI0.LPCB.EC.BRNS, AE_AML_PACKAGE_LIMIT (20180810/psparse-516)
[   79.026405] ACPI Error: Method parse/execution failed \_SB.PCI0.LPCB.EC._Q27, AE_AML_PACKAGE_LIMIT (20180810/psparse-516)
[   88.027504] ACPI Error: AE_AML_PACKAGE_LIMIT, Index (0x000000008) is beyond end of object (length 0x8) (20180810/exoparg2-396)
[   88.027630] ACPI Error: Method parse/execution failed \_SB.PCI0.LPCB.EC.BRNS, AE_AML_PACKAGE_LIMIT (20180810/psparse-516)
[   88.027665] ACPI Error: Method parse/execution failed \_SB.PCI0.LPCB.EC._Q26, AE_AML_PACKAGE_LIMIT (20180810/psparse-516)

With AC pluged in:
bigon@edoras:~$ cat /sys/class/power_supply/BAT1/status
Unknown
bigon@edoras:~$ cat /sys/class/power_supply/BAT0/status
Unknown

With AC unplugged:
bigon@edoras:~$ cat /sys/class/power_supply/BAT1/status
Unknown
bigon@edoras:~$ cat /sys/class/power_supply/BAT0/status
Discharging
Comment 1 Laurent Bigonville 2019-04-09 12:02:59 UTC
Created attachment 282193 [details]
acpidump
Comment 2 Erik Kaneda 2019-04-12 23:38:21 UTC
Hi Laurent, Are you running the latest firmware distributed by lenovo?
Comment 3 Laurent Bigonville 2019-04-15 08:56:34 UTC
I think yes:

[   13.662480] thinkpad_acpi: ThinkPad BIOS N27ET34W (1.20 ), EC unknown

https://pcsupport.lenovo.com/be/fr/products/laptops-and-netbooks/thinkpad-t-series-laptops/thinkpad-t580-type-20l9-20la/downloads/ds502395
Comment 4 Laurent Bigonville 2019-04-15 09:22:37 UTC
Not that I suspect that these errors are preventing upower to get the notification when the AC power is inserted/removed
Comment 5 Erik Kaneda 2019-04-15 17:11:07 UTC
Here's what's going on (for your information and for my future reference):

When the AC adapter is plugged/unplugged, _Q26 and _Q27 control methods attempt to index a package element out of bounds in the BRNS control method. The indices are from these operation region fields: BNTN and BRLV. These variables are values that are contained inside system memory.

Method (BRNS, 0, NotSerialized)
{
    Local0 = (\BRLV + 0x02)
    Local3 = \BNTN
    If (\_SB.PCI0.GFX0.DRDY)
    {
        Local2 = DerefOf (DerefOf (BRTB [Local3]) [Local0]) // Index out of bounds runtime error
        \_SB.PCI0.GFX0.AINT (0x01, Local2)
    }
}

I'm asking around internally to see if someone from Lenovo can fix it...
Comment 6 edwin 2019-04-15 19:13:16 UTC
for what's worth.
I have the same issue:

2019-04-14T09:38:06.256739+02:00 linux-5q3o kernel: [   10.210587] thinkpad_acpi: ThinkPad BIOS N27ET34W (1.20 ), EC unknown
2019-04-14T09:38:06.256742+02:00 linux-5q3o kernel: [   10.210589] thinkpad_acpi: Lenovo ThinkPad T580, model 20L9CTO1WW


2019-04-15T20:04:35.866454+02:00 linux-5q3o kernel: [ 7680.344966] ACPI Error: AE_AML_PACKAGE_LIMIT, Index (0x000000008) is beyond end of object (length 0x8) (20181213/exoparg2-396)
2019-04-15T20:04:35.866499+02:00 linux-5q3o kernel: [ 7680.345167] ACPI Error: Method parse/execution failed \_SB.PCI0.LPCB.EC.BRNS, AE_AML_PACKAGE_LIMIT (20181213/psparse-531)
2019-04-15T20:04:35.866505+02:00 linux-5q3o kernel: [ 7680.345201] ACPI Error: Method parse/execution failed \_SB.PCI0.LPCB.EC._Q26, AE_AML_PACKAGE_LIMIT (20181213/psparse-531)


Is it possible that this is related to the problem that the internal battery is never used? Did not test this very intensely but my laptop will shutdown without warning after the first battery is empty.
The good part is that it first discharge BAT1 (the external battery)
Comment 7 Laurent Bigonville 2019-05-16 11:07:20 UTC
Created attachment 282791 [details]
acpidump 1.21

Hello,

Updated to 1.21 and I think this is fixed
Comment 8 Laurent Bigonville 2019-05-16 11:10:56 UTC
Or maybe not completely, the status of BAT0 always (AC plugged-in or not) shows "Unknown"

$ cat /sys/class/power_supply/BAT0/status
Unknown

BAT1 is showing the proper state Full/Discharging
Comment 9 Erik Kaneda 2019-05-16 18:05:17 UTC
Are you using firmware version N27ET35W?
Comment 10 Laurent Bigonville 2019-05-17 08:52:10 UTC
Yes I'm using N27ET35W
Comment 11 Erik Kaneda 2019-05-17 21:11:15 UTC
Great, that was the change that Lenovo pushed to resolve the ACPI error. From what they said through email, the BAT0 status being unknown seems to be expected. This bug is about ACPI errors and they have been solved so I'll close this bug. If you feel that this BAT0's unknown status is bothersome, please file a separate bug.
Comment 12 SingeInfini 2019-12-08 19:52:59 UTC
I'm getting exactly the same errors with the last UEFI firmare from Lenovo (v1.58 released 04 Dec 2019): 
[   14.102849] thinkpad_acpi: ThinkPad ACPI Extras v0.26
[   14.102850] thinkpad_acpi: http://ibm-acpi.sf.net/
[   14.102850] thinkpad_acpi: ThinkPad BIOS N2IET80P (1.58 ), EC unknown
[   14.102851] thinkpad_acpi: Lenovo ThinkPad T490, model 20N2CTO1WW

Here is my dmesg:
déc. 08 20:48:33 hostname kernel: ACPI BIOS Error (bug): Could not resolve [\_SB.PCI0.RP09.PEGP.NVDN], AE_NOT_FOUND (20180810/psargs-330)
déc. 08 20:48:33 hostname kernel: ACPI Error: Method parse/execution failed \_SB.PCI0.LPCB.EC._Q27, AE_NOT_FOUND (20180810/psparse-514)
déc. 08 20:48:33 hostname root[1558]: AC adapter plugged/unplugged
déc. 08 20:48:35 hostname kernel: ACPI BIOS Error (bug): Could not resolve [\_SB.PCI0.RP09.PEGP.NVDN], AE_NOT_FOUND (20180810/psargs-330)
déc. 08 20:48:35 hostname kernel: ACPI Error: Method parse/execution failed \_SB.PCI0.LPCB.EC._Q26, AE_NOT_FOUND (20180810/psparse-514)
déc. 08 20:48:35 hostname root[1561]: AC adapter plugged/unplugged

(AC adapter messages comes from acpid)

Is a fix planned ?

Note You need to log in before you can comment on or make changes to this bug.