Bug 192501

Summary: _REG execution: Xiaomi Air 13 ACPI errors in dmesg
Product: ACPI Reporter: Coşku Baş (cosku.bas)
Component: ACPICA-CoreAssignee: Lv Zheng (lv.zheng)
Status: CLOSED DUPLICATE    
Severity: normal CC: lv.zheng, yu.c.chen
Priority: P1    
Hardware: Intel   
OS: Linux   
Kernel Version: 4.8.13 Tree: Mainline
Regression: No
Attachments: dmesg
dmesg for latest stable kernel
ACPI dump on kernel 4.9

Description Coşku Baş 2017-01-13 20:29:33 UTC
Created attachment 251501 [details]
dmesg

Attached is the dmesg for a Xiaomi Air 13 laptop with a fresh 64-bit Arch install. Updated to latest packages.

The relevant part of the attachment goes like this:

[    0.482670] ACPI Error: No handler for Region [RAM_] (ffff8802760db900) [EmbeddedControl] (20160422/evregion-166)
[    0.482674] ACPI Error: Region EmbeddedControl (ID=3) has no handler (20160422/exfldio-299)
[    0.482677] ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] (Node ffff8802760daca8), AE_NOT_EXIST (20160422/psparse-542)
[    0.482809] ACPI Error: No handler for Region [RAM_] (ffff8802760db900) [EmbeddedControl] (20160422/evregion-166)
[    0.482811] ACPI Error: Region EmbeddedControl (ID=3) has no handler (20160422/exfldio-299)
[    0.482813] ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] (Node ffff8802760daca8), AE_NOT_EXIST (20160422/psparse-542)
...
...
[    0.617094] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
[    0.617129] acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM

I'm not sure if it's related but GNOME keeps saying "Estimating" for the battery. Even when it's plugged to AC. Other than that I don't see anything not working.
Comment 1 Lv Zheng 2017-01-16 02:18:23 UTC
Please try latest kernel again. If it's still there, then please provide acpidump for your platform.
Comment 2 Coşku Baş 2017-01-16 06:28:08 UTC
Created attachment 251881 [details]
dmesg for latest stable kernel
Comment 3 Coşku Baş 2017-01-16 06:28:44 UTC
Created attachment 251891 [details]
ACPI dump on kernel 4.9
Comment 4 Coşku Baş 2017-01-16 06:29:21 UTC
Error persist on latest stable kernel from Arch testing repo which is 4.9.3
Comment 5 Coşku Baş 2017-01-16 17:10:59 UTC
Another thing I've noticed in the dmesg:

[    0.791607] platform MSFT0101:00: failed to claim resource 1
[    0.791612] acpi MSFT0101:00: platform device creation failed: -16

this one is also printed to the boot console while the others stay hidden in the dmesg.
Comment 6 Chen Yu 2017-01-20 06:20:19 UTC
MSFT error is due to the Bios's declaration of resources under the MSFT that, dynamically allocated resource just return the same address as the range declared in static resource.
4.10 -rc 4 should has more info dump on this.
Comment 7 Lv Zheng 2017-01-20 06:49:03 UTC
Thanks for Yu to clarify the last error log.
You can also find detailed information at:
https://bugzilla.kernel.org/show_bug.cgi?id=188511
Please use this link to track the issue.

I think this is harmless:
[    0.617094] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
[    0.617129] acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM
If you can see real problems related to that, please file a separate bug to power components.

I'll help to check this error here:
[    0.482670] ACPI Error: No handler for Region [RAM_] (ffff8802760db900) [EmbeddedControl] (20160422/evregion-166)
[    0.482674] ACPI Error: Region EmbeddedControl (ID=3) has no handler (20160422/exfldio-299)
[    0.482677] ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] (Node ffff8802760daca8), AE_NOT_EXIST (20160422/psparse-542)
[    0.482809] ACPI Error: No handler for Region [RAM_] (ffff8802760db900) [EmbeddedControl] (20160422/evregion-166)
[    0.482811] ACPI Error: Region EmbeddedControl (ID=3) has no handler (20160422/exfldio-299)
[    0.482813] ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] (Node ffff8802760daca8), AE_NOT_EXIST (20160422/psparse-542)

Thanks
Lv
Comment 8 Lv Zheng 2017-01-20 07:43:42 UTC
Looks like an duplicate of a solved bug.
While the patch is not upstreamed.
https://bugzilla.kernel.org/show_bug.cgi?id=102421

I've put the patch into the ACPICA pull request.
https://github.com/acpica/acpica/pull/200

Please apply attachment 212581 [details] and test again.

Thanks
Lv
Comment 9 Coşku Baş 2017-01-20 07:52:22 UTC
Is it possible to patch it against 4.8.13 or only the latest rc?
Comment 10 Lv Zheng 2017-01-20 08:08:47 UTC
I successfully applied it to ACPICA upstream with quilt.
So it should be no difference for linux due to the synchronized ACPICA release process.
Please apply it with patch -p 1 < "saved attachment 212581 [details] file"
Comment 11 Coşku Baş 2017-01-20 10:59:59 UTC
Patch successfully gets rid off the mentioned error messages. Can we expect this on mainstream for 4.10 or will it be included in 4.11?

Thanks
Comment 12 Coşku Baş 2017-01-20 11:00:32 UTC

*** This bug has been marked as a duplicate of bug 102421 ***
Comment 13 Lv Zheng 2017-01-22 07:29:19 UTC
(In reply to Coşku Baş from comment #11)
> Patch successfully gets rid off the mentioned error messages.
> Can we expect this on mainstream for 4.10 or will it be included in 4.11?

This problem is actually related to _REG execution.
My recent finding reveals that Windows:
1. only executes _REG when a driver registers/unregisters region handlers,
   which means ACPICA's automatically _REG execution logic is not correct.
2. doesn't invoke _REG for address spaces that are default available.

From that point of view, we really need to change much.
And this commit looks more like a workaround for 2nd facts.

But since we only can do this in Linux upstream step by step.
and this commit can be considered as a regression safer approach,
I think the answer is:
Yes, I'll push it to ACPICA upstream.
You may be able to find it landed in Linux during 4.10/4.11 release cycles.

Thanks
Lv
Comment 14 Coşku Baş 2017-06-07 06:00:26 UTC
Unfortunately 4.11 still has the error messages
Comment 15 Lv Zheng 2017-07-04 01:34:05 UTC
Closing duplicated bugs.