-
Notifications
You must be signed in to change notification settings - Fork 109
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
Linux cannot wake up after closing the lid #37
Comments
Suspend & resume doesn't work. That's a known problem, I believe. |
Yes, this is a know problem, see: https://github.com/Dunedan/mbp-2016-linux#suspend--hibernation While it's not a great solution, the workaround is to disable suspend on lid close. See |
If anybody has the time and inclination to work on this, one suggestion might be to use |
Another thing that might be easier to try is to modify the DSDT: the |
I did play around with |
Still no movement on this? |
Is this going to be fixed by the nvme fixes in the 5.4 kernel? |
I fixed this issue for 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 |
These fixes work like a charm under Ubuntu/Pop_OS! 19.04 and 19.10 beta. /etc/systemd/system/fix_sleep.service
/sbin/fixsleep
|
@JeremiahCornelius unfortunately this fix doesn't seem to work on a MacBook9,1 :-( |
Seems to work for me on a MacBookPro13,1. Maybe we could add that to the README? |
Sure, just open a PR. 🙂 |
Works for my Macbook Pro 14,1 (13" 2017 without touchbar) running Ubuntu 19.10. However it takes about 10-20 seconds until the lockscreen shows up. Is there a fix for this behavior? |
I haven't yet figured what takes resume so comparatively long to complete. As is, it's completely usable, turning Linux on this MBP from being a hobby-project, to a real tool. |
any suggestion about how to do this when booting from usb ?
|
If you are having this problem when booting USB, it MAY still be the NVMe. Even if you don't have a filesystem active on it, the PCI wakeups are going to happen, right? I'd look to the same fix. If you find that the USB filesystem returns, but is mounted as write-protected, there will have to be a similar fix to my NVMe to be sorted. The difficulty with this is that USB information may be different between boots, if you attach to a different port, hub, etc. |
I'm on a Mid-2017 13" - MPXQ2LL/A* - MacBookPro14,1 - A1708 - 3164. You're the expert here, but I'm pretty sure my PCI fix isn't going to help those machines, because the T2 has all of its signing requirements to access devices it obscures. However? I do have a 2018 MB Air, that was mfd in Feb 2019. I'll see what I can do with a USB boot on the 5.3 kernels, and poke around with |
Not sure. The light on the usb drive (Samsung T5 SSD) is off and stays off when waking. Maybe I could try on the NVMe but seems doubtful. The usb drive doesn't have the same files in /sys/bus/usb as the NVMe drive. |
Yes, I wouldn't expect the structure to be the same. It does sound like a similar issue to PCI NVMe, where the defaults for power state of devices on the bus inhibits their waking after suspend/resume. I may have some time to look at this in the week ahead. |
No worries I'll have a look. Right after I'm done with the S section of my dictionary |
Great. Disabling |
Wow. I'm pretty proud of solving this. FWIW, my 14,1 is faster after a coupe of weeks of this. I also went to a low-latency kernel - I wonder if this is related? Resume is in the acceptable 4-5 second range. |
Not really much further on my usb drive with same issue. The device is identified as 6-1 but presumably this can change, though I can use a script to identify it. (Google being my friend)
I thought the power dir would be of interest but could not find anything in there:
So maybe this is controlled somewhere else?
Any idea if Debian has a systemd option that could simply disable sleeping the drive? |
I wish I'd more time to help you with this. The best starting resource for these inquiries is documentation on kernel.org: |
The more recent docs for 5.3 have references for USB persist during suspend: |
Any idea how one passes the grub-type commands through ReFind?
Thanks will have a look at that. Looks interesting. I'm pretty sure I saw that too. |
I am unsure about ReFind. Does it call GRUB? I have my machines booting natively from Mac firmware, mounting the HFS-plus EFI partition (/dev/nvme0n1p1), under /boot (/dev/nvme0n1p2). |
ReFind doesn't call grub. It finds the initram files and boots directly |
MBP 13,3 - Things work smoothly Ubuntu 20.04 Nightly
|
Which model? |
So what's the status of suspend nowadays? Working for everybody or still something which causes troubles? |
Hi, reviving the thread. Tried the |
I have this issue too with my 2015 early macbookpro 13' |
Hi! I have an issue with my MBP 14,1 running ubuntu 22.04. I tried doing the script. It works sometime. But most of the time it goes to the login screen where I can't type my passord. Or it enters a terminal kind of screen where the cursor is blinking? Did I do something wrong? |
I used the solution by @JeremiahCornelius on MBP 14.1 with Ubuntu 22.04 and it seems to be working great. Thank you! Using the Power Off / Log Out > Suspend option, I can bring the computer back up by the Power button (which takes about 7 seconds). I used sysfsutils instead of systemd to make the change permanent:
(I used lspci to verify that 0000:01:00.0 is indeed the correct path in my system.)
|
Hello all, in my MacBook Pro 14.1, running Fedora Linux, this solution with the d3cold state technically works on my machine, but it takes around 2 minutes for the laptop to wake up. The whole process is detailed in dmesg as such:
I believe the "unable to change power state" messages are from my dock (not sure), ohter than that smpboot seems to take a lot of time. Anyone have any idea why this is happening even though we are on the same hardware as @JeremiahCornelius ? |
Hello, The readme from this repository says “ Models with Apple's NVMe controller (MacBookPro13,1, MacBookPro13,2, PD: the comment from |
Another curiosity I would like to share follows. The ssd is removable for the *,1 models. So, if the Apple ssd is replaced by another ssd with a non-Apple ssd, that is, (if I am not mistaken) another controller, then the suspend/resume issue might disappear, right? |
Successfully resolved the issue described in this topic using the suggested above fix. The problem is resolved by setting |
The SSD is a samsung on mine (14,3) |
Tried a lot, but it totally freezes. Won't even hibernate |
suspend/resume is now working on my macbook9,1 |
Im on a MBP 14,1 it shows i have a samsung controller under lspci. I cant wake up from S3 but i can wake from s2idle it just takes ages. I ssh'ed into my MBP using my phone and to my suprise when it woke i got a massive chunk of text in my dmesg (i used dmesg -w to follow)
|
interestingly, i was not able to make it work with a crucial ( |
I successfully installed Ubuntu 16.04 on my MBP 13,1 and everything went on smoothly. However, I found that if I closed the lid while Linux is running, and I opened it again, nothing would show up. Completely black screen is the only result. This is quite annoying because every time I need to go somewhere else, I can only shut down Linux completely and start it up again somewhere else. Has anyone met the same problem as I have? Any help will be greatly appreciated. Thanks in advance.
The text was updated successfully, but these errors were encountered: