t2linux / T2-Debian-and-Ubuntu-Kernel

Ubuntu Kernel for T2 Macs.
128 stars 14 forks source link

6.5.7-t2 does not wake from suspend #53

Open aboulfad opened 8 months ago

aboulfad commented 8 months ago

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

bootlog
rydymth commented 7 months ago

Uname will not differentiate between 6.6.1-3 and 6.6.1-4

Ohh yess! Here is the output

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

linux-headers-6.6.1-t2-mantic/now 6.6.1-3 amd64 [installed,local]
linux-image-6.6.1-t2-mantic/now 6.6.1-3 amd64 [installed,local]
linux-libc-dev/now 6.6.1-3 amd64 [installed,local]
aboulfad commented 7 months ago

@rydymth would you kindly create a separate issue to track the BT/wifi issues you are investigating with @AdityaGarg8 ? I'd greatly appreciate your understanding. This will help with actively tracking & reducing notifications,...

AdityaGarg8 commented 7 months ago

Uname will not differentiate between 6.6.1-3 and 6.6.1-4

Ohh yess! Here is the output

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

linux-headers-6.6.1-t2-mantic/now 6.6.1-3 amd64 [installed,local]
linux-image-6.6.1-t2-mantic/now 6.6.1-3 amd64 [installed,local]
linux-libc-dev/now 6.6.1-3 amd64 [installed,local]

That's the right kernel

rydymth commented 7 months ago

@rydymth would you kindly create a separate issue to track the BT/wifi issues you are investigating with @AdityaGarg8 ? I'd greatly appreciate your understanding. This will help with actively tracking & reducing notifications,...

Sure! Creating a new issue

aboulfad commented 7 months ago

As you predicted, there was no crash/freeze ... tbh I didn't read the changes, just did what you asked. Here's the journal log: suspend1.log

I did a suspend next & mac crashed or froze. I didn't power it down, rather closed & re-opened lid & it started booting.

bumping my last suspend update to here past the BT updates.

Redecorating commented 6 months ago

If you (or someone else) still have interest looking into this, maybe test this copy, where the problematic resume of apple-bce-vhci gets delayed till you have terminals open and tell it to continue. https://github.com/Redecorating/apple-bce-drv/commit/642a27091c16967da54ee344847c3fb417190cc6 see this commit message. I've been intending to fix this up a bit so there would be no errors (i was thinking of just never registering the usb hci) if doing it on pre-sonoma firmware, but given Ive procrastinated doing that for 3 weeks, im probably not going to get around to it anytime soon.

aboulfad commented 6 months ago

@Redecorating ill try tomorrow, have to refresh my memory as it’s been a while : ) ok here's the steps I followed:

1- switched to branch https://github.com/Redecorating/apple-bce-drv/compare/sonoma_suspend_debug and did a pull to get your last commit 2- compiled all 3 mods, re-added the blacklist entries, rebooted. Keyb/TP disabled, added all 3 mods. 3- suspended then resumed, check attached kernel logs since sleep @ 08:05am 4- the echo foo cmd gives an Connection timed outafter some time

Odd, is that with this delay you added, there's no crash, freeze or weird behaviour... Should I proceed and re-add some of the blacklisted entries (via modprobe), after or before the echo foo cmd ? delay805.log

Redecorating commented 6 months ago

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.

aboulfad commented 6 months ago

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 --> ce-vhci: Possible desync, cmd cancel timed out

Redecorating commented 6 months ago

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 if ((status = usb_add_hcd(vhci->hcd, 0, 0))) goto fail_hcd; these two lines ^

aboulfad commented 6 months ago

No worries, I can try it, commented out those two lines, recompiled,... No dice, same behaviour as before.

mdsheraj123 commented 6 months ago

I want to mention that I am facing this issue too on my 2018 Intel T2 MacBook Air. I use the latest LTS Ubuntu and everything works including wifi and bluetooth but not the suspend on lid close https://mdsheraj123.github.io/2023/11/11/Installing-Ubuntu-22.04-LTS-on-a-Intel-MacBook-air-2018-with-T2-chip/html. This is a problem because I have assigned lid close to lock my screen and often forget to manually shut down. This leads to my battery draining out when I reopen my laptop making it unreliable and losing the charm of the MacBook battery life.

If this is fixed, I won't buy a dedicated Linux laptop.

AdityaGarg8 commented 6 months ago

I want to mention that I am facing this issue too on my 2018 Intel T2 MacBook Air. I use the latest LTS Ubuntu and everything works including wifi and bluetooth but not the suspend on lid close https://mdsheraj123.github.io/2023/11/11/Installing-Ubuntu-22.04-LTS-on-a-Intel-MacBook-air-2018-with-T2-chip/html. This is a problem because I have assigned lid close to lock my screen and often forget to manually shut down. This leads to my battery draining out when I reopen my laptop making it unreliable and losing the charm of the MacBook battery life.

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.

mdsheraj123 commented 6 months ago

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.

nicovell3 commented 6 months ago

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?

AdityaGarg8 commented 6 months ago

Even if you downgrade, the sleep issue won't get fixed. People have got success with s2idle sleep, you can try that.

aboulfad commented 5 months ago

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.

echo freeze | sudo tee /sys/power/state

nicovell3 commented 5 months ago

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.

Simon-Martens commented 5 months ago

Does not work for me, either.

Macbook Pro 2018 15,1 Hybrid graphics with an Radeon Pro 555X Kernel: Linux 6.6.8-t2-mantic (on Ubuntu 23.10)

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:

  1. In a suspended state I press any key to wake the macbook
  2. The touchbar turns on, but is non responsive.
  3. 5-10 seconds nothing else happens, screen is black.
  4. The fans start spinning for a second and the laptop is shut down (sometimes i have to manually shut it down pressing the power button, after waiting a bit).

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 :)

AdityaGarg8 commented 5 months ago

I've noticed s2idle works only with Intel GPU.

aboulfad commented 5 months ago

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.

Simon-Martens commented 5 months ago

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.

AdityaGarg8 commented 5 months ago

Contact the discord if you want to chat with people who have this working.

aboulfad commented 5 months ago

@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.

riddlework commented 3 months ago

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.

AdityaGarg8 commented 3 months ago

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

POMATu commented 2 months ago

dmesg.log hi everyone, while its not suspend, i was somehow able to make it hibernate. Neither was working for me before. I edited /etc/systemd/sleep.conf and found out that there is some "shutdown type" for hibernation

[Sleep]
AllowSuspend=no
AllowHibernation=yes
#AllowSuspendThenHibernate=yes
AllowHybridSleep=no
#SuspendMode=
#SuspendState=mem standby freeze
#HibernateMode=platform shutdown
HibernateMode=shutdown
HibernateState=disk
#HybridSleepMode=suspend platform shutdown
#HybridSleepState=disk
#HibernateDelaySec=
#SuspendEstimationSec=60min

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 Just few issues make system unusable: 1) internal macbook keyboard not working, but external USB does work, thats how i was able to unlock lockscreen 2) touchbar completely dead 3) wifi ping working from macbook but i cant connect SSH to macbook for some reason, it drops connection straight after banner and i wasnt able to use ssh until i rebooted. The issue was same on ethernet cable and on wifi. I collected dmesg tho, it said it restored from hibernation, didnt see much errors

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: GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt pcie_ports=compat resume=UUID=61787ea2-d76f-4e2d-94d7-be27c37cf26f resume_offset=35284992 init_on_alloc=0 apple_set_os"

Linux macbookpro 6.8.8-t2 #1 SMP PREEMPT_DYNAMIC Sun Apr 28 07:27:07 UTC 2024 x86_64 GNU/Linux Debian 12

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 BTW dropbear luks unlock works just fine keyboard stops working later (when it actually restores image from swap)

AdityaGarg8 commented 2 months ago

dmesg.log hi everyone, while its not suspend, i was somehow able to make it hibernate. Neither was working for me before. I edited /etc/systemd/sleep.conf and found out that there is some "shutdown type" for hibernation

[Sleep]
AllowSuspend=no
AllowHibernation=yes
#AllowSuspendThenHibernate=yes
AllowHybridSleep=no
#SuspendMode=
#SuspendState=mem standby freeze
#HibernateMode=platform shutdown
HibernateMode=shutdown
HibernateState=disk
#HybridSleepMode=suspend platform shutdown
#HybridSleepState=disk
#HibernateDelaySec=
#SuspendEstimationSec=60min

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 Just few issues make system unusable:

  1. internal macbook keyboard not working, but external USB does work, thats how i was able to unlock lockscreen
  2. touchbar completely dead
  3. wifi ping working from macbook but i cant connect SSH to macbook for some reason, it drops connection straight after banner and i wasnt able to use ssh until i rebooted. The issue was same on ethernet cable and on wifi. I collected dmesg tho, it said it restored from hibernation, didnt see much errors

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: GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt pcie_ports=compat resume=UUID=61787ea2-d76f-4e2d-94d7-be27c37cf26f resume_offset=35284992 init_on_alloc=0 apple_set_os"

Linux macbookpro 6.8.8-t2 #1 SMP PREEMPT_DYNAMIC Sun Apr 28 07:27:07 UTC 2024 x86_64 GNU/Linux Debian 12

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 BTW dropbear luks unlock works just fine keyboard stops working later (when it actually restores image from swap)

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?

POMATu commented 2 months ago

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.

AdityaGarg8 commented 2 months ago

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 journalctl

[ 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.

POMATu commented 2 months ago

i booted today with macbook connected to external keyboard and monitor and touchbar was working straight away i didnt have to restart it. Then i hibernated and restored and collected both logs: 30apr-dmesg.log journalctl-30apr.log I have done nothing else on linux today and system is utterly unconfigured and vanilla so logs should be clean from garbage. And now I uploaded logs via actual working system. If i am using external keyboard and monitor - system is 100% usable, no issues with wifi, just as i said before: touchbar, internal keyboard dont work

Apr 30 14:05:15 macbookpro kernel: bce_vhci: suspend started
Apr 30 14:05:15 macbookpro kernel: bce_vhci: suspend endpoints
Apr 30 14:05:15 macbookpro kernel: bce-vhci: Not implemented: wait for pending output requests
Apr 30 14:05:15 macbookpro kernel: bce-vhci: Not implemented: wait for pending output requests
Apr 30 14:05:15 macbookpro kernel: bce_vhci: suspend ports
Apr 30 14:05:15 macbookpro kernel: bce_vhci: suspend controller
Apr 30 14:05:15 macbookpro kernel: bce_vhci: suspend done
Apr 30 14:05:15 macbookpro kernel: bce_vhci: resume started
Apr 30 14:05:15 macbookpro kernel: bce_vhci: resume controller
Apr 30 14:05:15 macbookpro kernel: bce-vhci: Possible desync, cmd cancel timed out
Apr 30 14:05:15 macbookpro kernel: bce-vhci bce-vhci: HC died; cleaning up
Apr 30 14:05:15 macbookpro kernel: cdc_ncm 7-1:1.0 enxacde48001122: unregister 'cdc_ncm' usb-bce-vhci-1, CDC NCM (NO ZLP)
Apr 30 14:05:15 macbookpro kernel: bce_vhci_drop_endpoint 1:1
Apr 30 14:05:16 macbookpro PackageKit[1522]: search-file transaction /1026_bcdcbcea from uid 1000 finished with success after 275ms
Apr 30 14:05:20 macbookpro PackageKit[1522]: get-details transaction /1037_abceeeec from uid 1000 finished with success after 240ms
Apr 30 14:05:21 macbookpro kernel: bce-vhci: Possible desync, cmd cancel timed out

Are these the logs you wanted to see?

POMATu commented 2 months ago

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. Some people in this thread proposed to disable action on lid closure, but it seems i have to enable some sort of powering off or it will happen again. Someone else proposed switching it off on lid closure but then you will loose not-saved data if you did it by accident. Hence I think this "shutdown type" hibernation is good compromise in terms of both having some action that turns it off (so it doesnt overheats in bag) and saving the data, that you can at least recover with usb mouse or even android phone as HID controller.

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 think its mandatory to have touchbar --restart somewhere late after boot, in desktop environment startup file and maybe in /etc/rc.local too just in case it wasnt unlocked yet, because sometimes touchbar doesnt starts for me randomly and if it doesnt starts then my hibernation method cancels instead of doing shutdown and then i might get hot bag issue again. Anyways thats just a backup for the situation when i forgot to turn it off normally.

rydymth commented 1 month ago

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 Just few issues make system unusable:

internal macbook keyboard not working, but external USB does work, thats how i was able to unlock lockscreen

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. For me the s2Idle sleep works but drains a lot of battery and for some reason my laptop gets heated at times... I think its just like @AdityaGarg8 said its an apple_bce error.

stereo4nick commented 3 weeks ago

Hi guys. Recently bought used mba 2020 i5 for ubuntu and googled t2 project. This is awesome and thank you for this gem. As ppl said in above I'm also can't reach suspend/hibernate. Here is my uname -a Linux mba 6.9.4-1-t2-jammy #1 SMP PREEMPT_DYNAMIC Wed Jun 12 17:36:21 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux and journalctl logs for suspend/hib

hibernate.log suspend.log

Maybe this will help when you'll have a time.

Some additional things to say.

  1. Tried 24.04 but noticed more power consumtion than 22.04. So preferring 22.04
  2. Unfortunately before figured out I updated my mba to sonoma but rolled back it to monterey for no reason. I grabbed firmware for myself from macos' 11,12,13. Right now 22.04 use 12's firmware but same behavior on 13's firmware, it seems 11's is not supported.
  3. Switched handling closed lid to lock screen, with my 900 cycles bat it won't last long ~20h from 100% to empty. Tried to hibernate but no luck. It looks like system go to sleep: display and backlit turns off but after 10-15 sec it wake up without working keyboard and touchpad. Here is my /etc/systemd/sleep.conf:
    [Sleep]
    AllowSuspend=no
    AllowHibernation=yes
    #AllowSuspendThenHibernate=yes
    AllowHybridSleep=no
    #SuspendMode=
    #SuspendState=mem standby freeze
    HibernateMode=shutdown
    HibernateState=disk
    #HybridSleepMode=suspend platform shutdown
    #HybridSleepState=disk
    #HibernateDelaySec=180min

    followed this instruction for setup swapfile https://linuxhint.com/enable-hibernate-ubuntu-22-04-lts/ probably in t2 kernels has some different settings for hibernate because of it wakes up after ~15 sec?

  4. OS wakes up after several seconds (more faster than hib) from suspend. Sometimes wifi works but sometimes there is empty wifi list because of broken brcm I guess which can be reloaded with modprobe -r hci_bcm4377 ...
  5. Tried to disable all items in /proc/acpi/wakeup because noticed in log Jun 15 12:36:06 mba kernel: PM: Some devices failed to suspend, or early wake event detected but no luck

Really hope suspend/hib will addressed eventually otherwise I have to run my dev environment/docker every day 🙂 and I see no other workaround.

AdityaGarg8 commented 3 weeks ago

Hi guys. Recently bought used mba 2020 i5 for ubuntu and googled t2 project. This is awesome and thank you for this gem. As ppl said in above I'm also can't reach suspend/hibernate. Here is my uname -a Linux mba 6.9.4-1-t2-jammy #1 SMP PREEMPT_DYNAMIC Wed Jun 12 17:36:21 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux and journalctl logs for suspend/hib

hibernate.log suspend.log

Maybe this will help when you'll have a time.

Some additional things to say.

  1. Tried 24.04 but noticed more power consumtion than 22.04. So preferring 22.04
  2. Unfortunately before figured out I updated my mba to sonoma but rolled back it to monterey for no reason. I grabbed firmware for myself from macos' 11,12,13. Right now 22.04 use 12's firmware but same behavior on 13's firmware, it seems 11's is not supported.
  3. Switched handling closed lid to lock screen, with my 900 cycles bat it won't last long ~20h from 100% to empty. Tried to hibernate but no luck. It looks like system go to sleep: display and backlit turns off but after 10-15 sec it wake up without working keyboard and touchpad. Here is my /etc/systemd/sleep.conf:
[Sleep]
AllowSuspend=no
AllowHibernation=yes
#AllowSuspendThenHibernate=yes
AllowHybridSleep=no
#SuspendMode=
#SuspendState=mem standby freeze
HibernateMode=shutdown
HibernateState=disk
#HybridSleepMode=suspend platform shutdown
#HybridSleepState=disk
#HibernateDelaySec=180min

followed this instruction for setup swapfile https://linuxhint.com/enable-hibernate-ubuntu-22-04-lts/ probably in t2 kernels has some different settings for hibernate because of it wakes up after ~15 sec? 4. OS wakes up after several seconds (more faster than hib) from suspend. Sometimes wifi works but sometimes there is empty wifi list because of broken brcm I guess which can be reloaded with modprobe -r hci_bcm4377 ... 5. Tried to disable all items in /proc/acpi/wakeup because noticed in log Jun 15 12:36:06 mba kernel: PM: Some devices failed to suspend, or early wake event detected but no luck

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.

angelobdev commented 3 weeks ago

So I made a few tests using this apple-bce-drv fork...

Following this guide I retrieved these results:

Resume failed, dmesg after reboot:

[    0.304723] PM:   Magic number: 12:311:243
[    0.304766] acpi device:86: hash matches

Following this guide I retrieved these results:

core: failed

[    0.308562] PM:   Magic number: 12:520:346
[    0.308579] tty tty63: hash matches

processors: failed

[    0.305757] PM:   Magic number: 12:967:295
[    0.305775] tty tty28: hash matches

platform: failed

[    0.316095] PM:   Magic number: 12:314:144
[    0.316136] acpi device:15: hash matches

devices: success
dmesg_devices.txt

freezer: success
dmesg_freezer.txt

Still unknown what's causing the panic.

NOTE:

freezer
- test the freezing of processes

devices
- test the freezing of processes and suspending of devices

platform
- test the freezing of processes, suspending of devices and platform
  global control methods(*)

processors
- test the freezing of processes, suspending of devices, platform
  global control methods(*) and the disabling of nonboot CPUs

core
- test the freezing of processes, suspending of devices, platform global
  control methods(*), the disabling of nonboot CPUs and suspending of
  platform/system devices

(*) the platform global control methods are only available on ACPI systems
    and are only tested if the hibernation mode is set to "platform"

From: https://www.kernel.org/doc/Documentation/power/basic-pm-debugging.txt

POMATu commented 22 hours ago

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. For me the s2Idle sleep works but drains a lot of battery and for some reason my laptop gets heated at times... I think its just like @AdityaGarg8 said its an apple_bce error.

Hey i want to clarify few points in this thread for the people that landed here from search engine, because it was utterly unclear for me at the time i found this thread, that time i thought i gotta use my macbook without suspend working, but its not true:

1) You can actually have suspend working in some distros with suspend workaround here: https://wiki.t2linux.org/guides/postinstall/#suspend-workaround and by using latest t2 kernels I got it working on my debian and it works on arch and maybe somewhere else too. This workaround just adds extra latency to suspend+restore but it works, you can actually close lid and put it to bag and then take out and open it back like normal and have somewhat normal non-disabled linux on laptop experience

2) You might get better help and faster response on discord server, so if you are googling solution to your problem you might wanna go there and ask. I randomly decided to join discord server and realized that i should've done that from the start