-
Notifications
You must be signed in to change notification settings - Fork 119
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
applespi: Disable/re-enable gpe interrupt on suspend/resume. #30
Conversation
At least on MBP13,3 the keyboard is non-responsive after the resume otherwise.
@roadrunner2: So suspend is working on your MacBookPro13,3? If yes, then the NVMe controller in the MacBookPro13,1 and MacBookPro13,2 should be the only component preventing suspend to work on these models. |
@Dunedan yeah, to the best of my knowledge with my MacBook9,1; it's really only the NVMe controller that's blocking things. Suspend / resume when booting from USB storage without the NVMe initialized seems to work perfectly. There's a bunch of discussion at #2 about getting the NVMe controller to behave. Basically what I figured out was that the Apple driver sends a custom command to the NVMe controller to prepare it for shutdown (or put it in a low power sleep mode - |
Also interestingly enough, it seems this behaviour differs between versions. On the Macbook9,1 it's not needed for the keyboard / mouse to work on resume. |
@cb22 Yes, from the discussions in #2 I figured this wasn't an issue on the MacBook's; but at the same time, I figured disabling the interrupt makes sense anyway, since the docs for @Dunedan I'm still working on suspend/resume, but currently the following are needed for it to work reliably:
|
I got something which might be the key. MacOS sends a packet, which contains "DRLC" two times before each suspend and once or twice whenever it wakes up again. Check the attached traces for more information: touchbar-suspend.zip |
@Dunedan Thanks for the info. Since this about the touchbar, it might be better to continue this discussion on roadrunner2#3. |
@roadrunner2 @Dunedan I'm wondering if this might be helpful to someone with more experience than me for a wake solution: |
@roadrunner2, having fixed the keyboard suspend bug does the display come on? If that’s fixed is then is the computer usable after closing and opening the lid? |
@atyshka You don't mention what model you have, so I can only give you generic info: AFAIK, suspend/resume works on MB9,1 and later; on MB8,1 there's an open issue about the keyboard being unresponsive after resume; on MBP*,3 suspend/resume generally works, at least as long as you're not using external displays, but not on other MBP's due to a problem with NVMe driver. When I say "works", yes, this would mean the display comes on, at least the internal one. |
@roadrunner I’m not sure what number lthis corresponds to but I have a 15” 2016 pro model with gpu. |
@atyshka That sounds like you have the MBP13,3 then (under Linux see also |
@roadrunner2 Is suspend/resume working on MBP 14,1 with Intel iGPU? that's the only breaking bug preventing me from dual boot. |
On models with the Apple NVMe controller (which includes all *,1 and *,2 models) the disk does not wake up correctly - see Dunedan/mbp-2016-linux#37 . |
I fixed my 14,1 for suspend/resume. This is as simple as a setting in the PCI driver, for the nvme storage. This needs to be done as root, sudo won't allow access on Ubuntu 19.xx. I wrote a simple script and a systemd wrapper for startup - depends multiuser. I suspect this may work for other modern MBP models, prior to T2-chip introduction. You'll want to use lspci to determine the correct pci device for your specific model. |
These fixes work like a charm under Ubuntu/Pop_OS! 19.04 and 19.10 beta. /etc/systemd/system/fix_sleep.service
/sbin/fixsleep
|
Ive tried imputing the files on my Mac-same one as yours and while on opening the lid, it aloows me to log in but then it goes dead. |
Did you confirm output of Before starting these with systemd services, you can test this from the terminal, issuing the command: |
I can confirm that running
|
This is great. I think it's the first confirmation of this working on another model than my 14,1! |
Does not work on my 9,1 unfortunately... 😞 |
|
Not that old, the 2016 12“ MacBook: https://wiki.archlinux.org/index.php/Mac#April_2016_12"_-_Version_9,1 Has an NVMe disk. |
Nice. Keeping the Apple designations straight is a tasking enterprise! |
Hi @yerke,
so 01:00.0 should be the NVM. I can fix my suspension problem just disable d3_cold for 01:00.0.
|
At least on MBP13,3 the keyboard is non-responsive after the resume otherwise.