-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
6.5.7-t2 does not wake from suspend #53
Comments
Suspend has been broken since macOS Sonoma |
Thanks, should I keep this issue open ? For other who may have trouble with this, in the meantime the behavior can be changed for lid close = ignore or lock. reference |
Can be kept open |
Hi there!, |
I guess there is a regression in kernel 6.5 that broke Bluetooth for some models. Can you see if you get Bluetooth working on a 6.4.x and a 6.5 kernel @rydymth |
Hi! |
Can you share your complete |
HI! |
I've filed a bug report upstream: |
Hi @rydymth Kernel 6.6.1-2 has a patch sent by upstream maintainers to fix Bluetooth on your model. Can you give it a test when it compiles. It should compile after 2.5-3hrs after I send this message. |
Hi @AdityaGarg8! |
Hi, I am a bit confused as to how @rydymth BT’s issue is related to the suspend issue I reported ? Thanks. |
Its not related to suspend, but is an issue that deserves to be fixed |
Ok, I guess @rydymth could have created another GH issue, hence my confusion. |
Looks like the UBSAN error got fixed. Got another patch, try 6.6.1-3 |
Yes UBSAN error is fixed. For the ASPM error i put
It shuts the display and i believe it suspends tasks and processes just fine. I have the USB-C connector attached to this laptop and while the screen is off the light on the USB-C connector still lights up, thats how i know my macbook didnt shut itself down. |
Suspend is related to apple-bce so please don't mix it with Bluetooth. But cause your Bluetooth issue has been introduced here, let it be here |
I would prefer a log without the ASPM parameters you added and before suspending. |
Suspend may break Bluetooth, but rn the priority is to make it working before suspending. |
No worries @rydymth , I was trying to find some correlation or understanding, thanks. |
Got It! |
So no errors, but Bluetooth still broken? |
Yes... |
Is journalctl you sent post suspend? |
And what is presuspend |
No, This is journalctl normally after booting up.
This one is just a scirpt i wrote above. Before going to suspend i put the dmesg into this preSuspend.txt. So everytime i do systemctl suspend the dmesg gets is written to the file. In the scrpit i also have written the postSuspend script but that doesnt work... |
Why your journalctl does not have the kernel parameters. I want |
And please, no suspend |
I need to talk to upstream, so would prefer keeping suspend out of this. Suspend is an issue which we need to handle, not upstream. |
Got it |
apple-bce desync's so i don't think loading the other modules work in that state. This also happens for me (as far as i can remember from when i tested it) so i think its an issue with the patch being used to test. |
I was just completing loading all other modules, but I realized that it also has no impact (no crash) and loading the modules doesn't actually activate their corresponding devices... So what's the conclusion to-date :( ? PS: desync --> |
i think the delayed resume fails here somewhere before it hits whatever causes the crashing. commenting out the bit registering the usb controller might help but that's just a guess and i cant test that right now. https://github.com/Redecorating/apple-bce-drv/blob/642a27091c16967da54ee344847c3fb417190cc6/vhci/vhci.c#L92 |
No worries, I can try it, commented out those two lines, recompiled,... No dice, same behaviour as before. |
I want to mention that I am facing this issue too on my 2018 Intel T2 MacBook Air. If this is fixed, I won't buy a dedicated Linux laptop. |
I don't find suspend getting fixed anytime soon. Also, the camera fix in your article is not relevant at all. |
My MacBook webcam was not working and https://devicetests.com/fix-webcam-issues-ubuntu-macbook-air actually fixed my webcam. It worked for me. MacBooks are popular and last a long time. Linux support on MacBooks will definitely boost Linux adoption. Although, yes, open source hardware is the best. I hope for the suspend fix for my current daily driver. |
I'm currently affected by this issue in a MacBook I've recently acquired, with Sonoma installed. Is there any way to downgrade my running MacOS to get the sleep and bluetooth features working? Which was the latest working version? |
Even if you downgrade, the sleep issue won't get fixed. People have got success with s2idle sleep, you can try that. |
You can search in the discord general channel « s2idle », I think it works for some & not others & it isn’t true deep sleep so battery consumption may still be an issue. I haven’t tried it yet as I am rarely using Ubuntu on my MBP 2018.
|
S2 will not be enough to have the MBP disconnected for many hours... Maybe a solution could be to have it configured to hibernate after a few minutes. I hope this suspend issue gets fixed. |
Does not work for me, either. Macbook Pro 2018 15,1 This seems like a hard one, bc after trying to wake the macbook from deep sleep, it does not turn on the screen or log any messages (?? if it was bce_vhci it would at least be able to write something to the disk or am I mistaken here??); although something appears to be happening:
S2Idle does not work for me, same behavior (maybe I need to switch to Intel graphics, haven't tried it yet). Hibernation (suspend to disk) also doesn't work, since bce_vhci does not resume, so touchpad & keyboard won't work (but I think it might be a different issue). I can not confirm @aboulfad s findings since if I blacklist all the modules suspend shows the exact same behavior. EDIT: If somebody needs any help debugging this, recompiling an testing a module etc etc I've got time and motivation to do it :) |
I've noticed s2idle works only with Intel GPU. |
Sadly, not on my 2018 MBP i7 (Intel Iris Plus Graphics 655), s2idle also results in a frozen system requiring a hard reset. |
I can confirm, still not working when setting my Intel UHD Graphics 630 as the main graphics and blacklisting the amdgpu kernel module. Maybe it's macbooks with ONLY integrated GPUs, like many 13 inch models? Can somebody with a working s2idle state post system configuration / specs? Maybe also a boot log? Maybe it would be helpful to compare boot logs of a working (old firmware?) system in general, since there are some ACPI errors in mine; and given the system doesn't boot enough to even log anything it could be some power management issue. Also apple_bce resumes normally if the suspend is aborted just before power off (sometimes the wifi card does prevent suspending, but this is also a seperate issue I think). apple_bce shuts down, then resumes correctly in that case, when power was not fully off. |
Contact the discord if you want to chat with people who have this working. |
@Simon-Martens s2idle doesn’t work on my 2018 MBP 13” intel integrated gpu only. I’ve already checked many of the discord suggestions to no avail, good luck for your setup. |
Have there been any updates to this issue in the last two months? I have a 16' 2019 MBP with BRCM Wi-Fi card and AMD graphics card and have been troubleshooting this issue all weekend to no avail. |
Not yet |
dmesg.log
I also blocked non-working suspend. I had resume kernel arguments preset in grub cmdline before and it actually worked. It was able to save image, then turn off properly without reset, then i booted it back and it actually restored image
Is it worth trying to make it work further? It seems issues are related to some frozen ACPI modules. Can you kindly tell me what modules can I unload and reload or what else can i try to make system usable after restore from hibernation. My grub cmdline: Linux macbookpro 6.8.8-t2 #1 SMP PREEMPT_DYNAMIC Sun Apr 28 07:27:07 UTC 2024 x86_64 GNU/Linux Thanks UPD: And i cant repeat it... on top of that my touchbar not going back even across reboots, like its still some tainted boot that i cant cleanse. Thats strange: it gave me hope and now doing same thing again. Well not exact same thing: now it just wakes up instantly instead of going to hibernation. UPD2: I am able to put it to hibernation again, i just have to type touchpad --restart first so touchpad starts working and then hibernation doesnt gets cancelled with systemctl hibernate. But still after restore of state I am unable to make keyboard and touchpad and touchbar to work. Hibernation could be nice alternative if its possible to make these modules work |
Interesting finding, but the issue you are facing is most likely due to apple-bce. Do you have any logs from apple-bce after resuming? |
since now i am able to repeat the process i can collect any kind of logs. Where are the apple-bce logs if its not dmesg? Dmesg after restore i did already provide above. |
Probably check [ 232.734819] bce-vhci: Possible desync, cmd cancel timed out This was in your dmesg, indicates its bce at fault. Nothing can be done here. |
i booted today with macbook connected to external keyboard and monitor and touchbar was working straight away i didnt have to restart it.
Are these the logs you wanted to see? |
i just found my macbook inside my bag hot af because i closed it and forgot to poweroff. Luckily it seems nothing bad happened this time but it proves that this issue is really painful and my lid-closing habits can actually ruin the hardware. While i am still hoping for a possibility to make hibernation work with some crutch that resets those frozen modules after RAM image restore, but for now I will live with currently posted shutdown-type hibernation method because it both does action on lid closure and saves the data currently in RAM. One important thing to add to my previous post: |
I was able to follow through this and am getting the same exact problem that you are facing @POMATu ! But my wifi and bluetooth works and i am able to ssh into my system as well. |
Hi guys. Recently bought used mba 2020 i5 for ubuntu and googled t2 project. This is awesome and thank you for this gem. Maybe this will help when you'll have a time. Some additional things to say.
followed this instruction for setup swapfile https://linuxhint.com/enable-hibernate-ubuntu-22-04-lts/ Really hope suspend/hib will addressed eventually otherwise I have to run my dev environment/docker every day 🙂 and I see no other workaround. |
There was not point to reverting back to Monterey. Just keep your Mac updated now. Wi-Fi firmware has no role in suspend. For Wi-Fi issues, your Mac model has broken Bluetooth driver with interferes with Wi-Fi. Prefer using a 5Ghz Wi-Fi or just blacklist Bluetooth driver if you don't need it. |
So I made a few tests using this apple-bce-drv fork... Following this guide I retrieved these results: Resume failed, dmesg after reboot:
Following this guide I retrieved these results: core: failed
processors: failed
platform: failed
devices: success freezer: success Still unknown what's causing the panic. NOTE:
From: https://www.kernel.org/doc/Documentation/power/basic-pm-debugging.txt |
Issue
MacBook Pro (MBP) always freezes/crashes when using suspend in Linux-t2-ubuntu. This is evident when re-starting, the boot screen shows fsck (or equivalent) running as well as the MBP bong & login to Linux. I included dmesg log as well screenshot from boot process.
MBP Info
MacBook Pro 2018, i7
Model ID: MacBookPro15,2
Controller Firmware version: 21P365
OS: Sonoma (14.0)
T2Linux Info
kernel: 6.5.7-t2
OS: Ubuntu 23.10 (Mantic Minotaur)
dmesg.log
The text was updated successfully, but these errors were encountered: