Bug 119261

Summary: Boot EC requirement - Lid no longer wakes system from suspend
Product: ACPI Reporter: Gabriele Mazzotta (gabriele.mzt)
Component: ACPICA-CoreAssignee: Lv Zheng (lv.zheng)
Status: CLOSED CODE_FIX    
Severity: normal CC: gabriele.mzt, rjw, rui.zhang
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.7-rc1 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: acpidump output
dmesg
[PATCH] ACPI / EC: Restore boot_ec support for the EC device described in DSDT

Description Gabriele Mazzotta 2016-05-30 15:14:44 UTC
Created attachment 218241 [details]
acpidump output

Hi,

with 4.7-rc1 the lid of my laptop no longer wakes the system from suspend. In addition to that, dell-wmi no longer loads because it can't find a needed WMI GUID.

In the dmesg I found the following:
[    0.422597] ACPI Error: No handler for Region [ECRM] (ffff8802154ec2d0) [EmbeddedControl] (20160422/evregion-166)
[    0.422602] ACPI Error: Region EmbeddedControl (ID=3) has no handler (20160422/exfldio-299)
[    0.422606] ACPI Error: Method parse/execution failed [\_SB.LID0._PSW] (Node ffff8802154f1370), AE_NOT_EXIST (20160422/psparse-542)
[    0.422612] ACPI: _PSW execution failed

Both the problems disappear if I revert the following commits. I tried to revert them separately on top of v4.7-rc1, but that didn't work.

commit 3d4b7ae96d81dc8ed4ecd556118b632c2707ff08
Author: Lv Zheng <lv.zheng@intel.com>
Date:   Thu Mar 24 10:43:08 2016 +0800

    ACPI 2.0 / AML: Improve module level execution by moving the If/Else/While execution to per-table basis


commit 59f0aa9480cfef9173a648cec4537addc5f3ad94
Author: Lv Zheng <lv.zheng@intel.com>
Date:   Thu Mar 24 10:42:53 2016 +0800

    ACPI 2.0 / ECDT: Remove early namespace reference from EC
Comment 1 Gabriele Mazzotta 2016-05-30 15:15:52 UTC
Created attachment 218251 [details]
dmesg
Comment 2 Gabriele Mazzotta 2016-05-30 22:35:07 UTC
I'm sorry, dell-wmi doesn't work even with the above commits reverted. Probably I saw it working again while bisecting and got confused. I'll see if I can find what broke it and open a separate bug report if unrelated.
Comment 3 Lv Zheng 2016-05-30 23:15:16 UTC
(In reply to Gabriele Mazzotta from comment #2)
> I'm sorry, dell-wmi doesn't work even with the above commits reverted.
> Probably I saw it working again while bisecting and got confused. I'll see
> if I can find what broke it and open a separate bug report if unrelated.

OK.
Probably because of a different issue.
Please also upload the acpidump of the machine here for us to confirm.

If you are using 4.7-rc1, I do know 1 issue that can be fixed by the following patch:
https://patchwork.kernel.org/patch/9137615/
You can try again with this patch applied.

Thanks in advance.

Best regards
-Lv
Comment 4 Gabriele Mazzotta 2016-05-31 08:48:14 UTC
> Please also upload the acpidump of the machine here for us to confirm.

It's already uploaded.

> If you are using 4.7-rc1, I do know 1 issue that can be fixed by the
> following patch:
> https://patchwork.kernel.org/patch/9137615/
> You can try again with this patch applied.

This seems to make no difference regarding the issue here reported.
Comment 5 Lv Zheng 2016-06-01 03:14:22 UTC
Yes, I saw the acpidump.
After extracting it, I got no ECDT.
So the problem is not ECDT related.

From the dmesg, I can see:
[    0.410275] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    0.421787] ACPI Error: No handler for Region [ECRM] (ffff88021688a3f0) [EmbeddedControl] (20160422/evregion-166)
[    0.421792] ACPI Error: Region EmbeddedControl (ID=3) has no handler (20160422/exfldio-299)
[    0.421796] ACPI Error: Method parse/execution failed [\_SB.LID0._PSW] (Node ffff88021688f4d8), AE_NOT_EXIST (20160422/psparse-542)
[    0.421802] ACPI: _PSW execution failed
...
[    0.437173] ACPI : EC: GPE = 0xa, I/O: command/status = 0x66, data = 0x62
[    0.437175] ACPI : EC: EC started

This looks like the order issue.
We have plan to stop implementing EC opregion as a driver, but handle it by default using an operation region handler.
This should be able to fix this issue.

Let me try this and post the fix here.

Thanks
-Lv
Comment 6 Lv Zheng 2016-06-01 09:07:42 UTC
Created attachment 218601 [details]
[PATCH] ACPI / EC: Restore boot_ec support for the EC device described in DSDT

Please give this fix a try.

Thanks
-Lv
Comment 7 Gabriele Mazzotta 2016-06-01 09:44:05 UTC
(In reply to Lv Zheng from comment #6)
> Created attachment 218601 [details]
> [PATCH] ACPI / EC: Restore boot_ec support for the EC device described in
> DSDT
> 
> Please give this fix a try.
> 
> Thanks
> -Lv

This fixed the problem, thanks.
Comment 8 Lv Zheng 2016-06-02 00:49:05 UTC
Thanks for the confirmation.
I'll send it to the upstream.

Best regards
-Lv
Comment 9 Gabriele Mazzotta 2016-06-02 08:16:53 UTC
(In reply to Lv Zheng from comment #8)
> Thanks for the confirmation.
> I'll send it to the upstream.
> 
> Best regards
> -Lv

I've just noticed that part of my email address got lost in the Reported-by string.
Comment 10 Lv Zheng 2016-06-03 00:42:57 UTC
(In reply to Gabriele Mazzotta from comment #9)
> (In reply to Lv Zheng from comment #8)
> > Thanks for the confirmation.
> > I'll send it to the upstream.
> > 
> > Best regards
> > -Lv
> 
> I've just noticed that part of my email address got lost in the Reported-by
> string.

Ah, yes!
I'll send an update to the mailing list.

Thanks
-Lv
Comment 11 Lv Zheng 2016-06-21 05:34:05 UTC
Let me close it because the fix has been upstreamed:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dcf15cb

Thanks
-Lv