Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACPI wakeup not working #4

Open
cgutman opened this issue Sep 16, 2016 · 5 comments
Open

ACPI wakeup not working #4

cgutman opened this issue Sep 16, 2016 · 5 comments

Comments

@cgutman
Copy link
Contributor

cgutman commented Sep 16, 2016

I tried getting this to work during my work on #2 but never managed it. I called device_init_wakeup(dev, true) in probe(), but I never seemed to get any GPEs when the system was suspended. /proc/acpi/wakeup indicated that the GPE was enabled for wakeup.

Because we need to re-enable SPI after resume, maybe we're powering down certain devices that should be left on in S3 to support wakeup?

@l1k
Copy link
Contributor

l1k commented Sep 17, 2016

It's possible that wakeup isn't signalled with the GPE, but via I2C to the SMC, so maybe this needs to be fixed in drivers/hwmon/applesmc.c.

@l1k
Copy link
Contributor

l1k commented Sep 19, 2016

This patch popped up on linux-acpi this morning and looks like it could be related, maybe the GPE mask needs to be fixed up?

http://marc.info/?l=linux-acpi&m=147422516722501&w=2

@cgutman
Copy link
Contributor Author

cgutman commented Sep 21, 2016

I tried waking the machine via clicking the trackpad and checking what Windows claimed woke the machine, and the result seems to only add to the confusion.

Windows (via powercfg /lastwake) claims the system was woken by the ACPI Lid when clicking the trackpad to wake the machine. When waking the PC via a USB keyboard, it correctly identified the keyboard as the wake source. Actually waking the PC via the lid also results in the system claiming the lid woke it up.

@cgutman
Copy link
Contributor Author

cgutman commented Sep 21, 2016

This might be related to _OSI(Darwin) it seems. When I pass acpi_osi="Windows 2012" on the kernel command line, it wakes perfectly via the trackpad or keyboard.

@cb22 can you confirm this?

@l1k
Copy link
Contributor

l1k commented Sep 21, 2016

This might be related to _OSI(Darwin) it seems. When I pass acpi_osi="Windows 2012" on the kernel command line, it wakes perfectly via the trackpad or keyboard.

Hm, according to the DSDT, wakeup is signaled with GPE 0x6F and the only difference that I can find between OSDW and !OSDW is that for Darwin the "deepest power system sleeping state that can be entered while still providing wake functionality" is S4, wheras for !Darwin it's S3.

Windows (via powercfg /lastwake) claims the system was woken by the ACPI Lid when clicking the trackpad to wake the machine. When waking the PC via a USB keyboard, it correctly identified the keyboard as the wake source. Actually waking the PC via the lid also results in the system claiming the lid woke it up.

Pin 26 on the trackpad connector signals a lid status change to the SMC. Looks like the trackpad board contains the hall effect sensor to detect lid status. Perhaps when clicking the trackpad, this signal is muxed onto that pin?

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

No branches or pull requests

2 participants