Skip to content

linux-omarchy: mark the EC GPE wake-capable on the MacBookPro14,3 - #2472

Closed
patattzel wants to merge 1 commit into
omacom:masterfrom
patattzel:acpi-ec-mbp143-gpe-wake
Closed

patattzel wants to merge 1 commit into
omacom:masterfrom
patattzel:acpi-ec-mbp143-gpe-wake

Conversation

@patattzel

@patattzel patattzel commented Nov 10, 2026 •

Copy link
Copy Markdown

Problem

On the MacBookPro14,3, opening the lid does not wake s2idle. The firmware has an ECDT and no PNP0D80 device, so lps0_device_attach() never runs. That is the only caller of acpi_ec_mark_gpe_for_wake().

Lid open is an EC query (_Q20 notifies LID0), not a direct wake on the lid _PRW GPE. acpi_s2idle_prepare() still calls acpi_ec_set_gpe_wake_mask(ACPI_GPE_ENABLE), and acpi_set_gpe_wake_mask() returns AE_TYPE while ACPI_GPE_CAN_WAKE is clear. The EC wrapper ignores that status, so the lid event is processed only after some other wakeup.

This is unchanged in current mainline. It is not fixed by 0776, which marks _Ixx GPEs; this EC GPE has a driver handler, not an _Ixx method.

Change

For MacBookPro14,3 only, after the boot EC exists, call the same acpi_ec_mark_gpe_for_wake() helper the LPS0 path uses. It only sets ACPI_GPE_CAN_WAKE. No AML evaluation and no EC register write. ec_no_wakeup still wins, and the S3 path does not use this mask.

Carried in linux-omarchy, linux-omarchy-eevdf, and linux-omarchy-muqss. The patch applies to drivers/acpi/ec.c from linux-7.2.y; no existing patch in these packages touches that file.

Evidence

Two MacBookPro14,3 units, firmware 529.140.2.0.0, ECDT, no PNP0D80:

Not claimed: a vanilla mainline build, battery drain, any other MacBook model, or that a generic no-LPS0 change is the right upstream shape. That question is still open with linux-acpi; this does not send that mail. @makoni asked to add the second unit to that report rather than send a separate patch. That confirmation is in, and the Tested-by below is on a kernel built from this branch without the out-of-tree helper.

This does not replace omarchy-pkgs#596, #544, or omarchy#14692. Those remain the Thunderbolt, resume-delay, and s2idle-policy pieces. Without this mark, #14692's "the lid wakes the machine" line is not true on these two units.

Tested-by: Sergey Armodin [email protected]

MacBookPro14,3, firmware 529.140.2.0.0, recipe d5a5d2d3, no EC wake helper module. The log has ACPI: EC: GPE=0x7 marked wake-capable. One lid-closed s2idle cycle, T1 USB remote wake disabled: timekeeping suspended 243.531 s, then ACPI EC GPE status set, ACPI EC GPE dispatched, Wakeup after ACPI Notify sync. Opening the lid woke the machine with no key press and no earlier wakeup. noirq resume was 5.15 s; that is #544, not this change. One cycle; battery drain not measured.

Test

On a MacBookPro14,3, do not load macbook143_ec_wake. After boot the log should contain ACPI: EC: GPE=0x7 marked wake-capable. With mem_sleep_default=s2idle and the T1 USB remote wake disabled, opening the lid should wake the machine without a key press. Any other product should not log that line.

Prepared with AI assistance from the existing public reports and the 7.2.15 source. No new lid cycle was run on this machine for this pull request.

This model has an ECDT and no LPS0 device, so nothing marks the EC GPE
wake-capable. Lid open is an EC query and is ignored in s2idle until some
other wakeup. Call the same helper the LPS0 path uses.
@greptile-apps

greptile-apps Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed changes appear safe to merge; no actionable defect was established.

Summary

Adds an EC wake-capability quirk for MacBookPro14,3 across all three x86_64 kernel variants.

  • Opening a MacBookPro14,3 lid can now wake s2idle.

Reviews (1) · Last reviewed commit: "linux-omarchy: mark the EC GPE wake-capa..." · Reviewed by Greptile

@makoni

makoni commented Nov 11, 2026

Copy link
Copy Markdown

Tested-by: Sergey Armodin [email protected]

MacBookPro14,3, firmware 529.140.2.0.0. I took the recipe from this branch (d5a5d2d3), ran its prepare() with only the version suffix changed (7.2.15-3-omarchy-ectest), and built with a plain make all instead of makepkg, so the bpftool and NVIDIA steps didn't run and nothing was packaged. I installed it by hand with T1Bridge 0.1.12 built through DKMS and booted it from a separate UKI with the default entry's command line. No EC wake helper module (neither macbook143_ec_wake nor my local mbp_ec_wake) existed for this kernel. The config differs from the recipe's only in the Rust lines: rustc 1.99.1 (LLVM 23) here instead of 1.98.1 (LLVM 22).

  • The log has ACPI: EC: GPE=0x7 marked wake-capable.
  • One lid-closed s2idle cycle, with the T1's USB remote wake disabled and pm_debug_messages on: Timekeeping suspended for 243.531 seconds, then ACPI: EC: ACPI EC GPE status set, ACPI: EC: ACPI EC GPE dispatched and ACPI: PM: Wakeup after ACPI Notify sync. Opening the lid woke the machine by itself, within a few seconds as I saw it, with no key press and no earlier wakeup.
  • noirq resume took 5.15 s on this build. That is the resume delay linux-omarchy: carry ACPICA PCI bus fix for resume delays #544 addresses, not this change.

One cycle on one unit; battery drain not measured.

Copy link
Copy Markdown
Author

Sorry, this was closed by accident: I deleted my fork by mistake, and GitHub closed the PR with it. It can't be reopened, so I've opened a new PR with the same commit and no changes: #3393. Earlier discussion stays here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants