Wake up from suspend takes 4 minutes

Ok, now the problem is solved for me, thank you. In my case the main issue was CPU 5, but i also noticed that CPU 6 and sometime 7 was slow waking up. I was looking in journalctl -b to see when MBP goes to sleep and wakes up. Then using dmesg -T was looking for a CPU that slows the waking up process. This was in my log

[Fri May 26 22:30:13 2023] x86: Booting SMP configuration:
[Fri May 26 22:30:13 2023] smpboot: Booting Node 0 Processor 1 APIC 0x2
[Fri May 26 22:30:15 2023] CPU1 is up
[Fri May 26 22:30:15 2023] smpboot: Booting Node 0 Processor 2 APIC 0x4
[Fri May 26 22:30:16 2023] CPU2 is up
[Fri May 26 22:30:16 2023] smpboot: Booting Node 0 Processor 4 APIC 0x1
[Fri May 26 22:30:16 2023] CPU4 is up
[Fri May 26 22:30:16 2023] smpboot: Booting Node 0 Processor 5 APIC 0x3
[Fri May 26 22:30:54 2023] perf: interrupt took too long (56978 > 56560), lowering kernel.perf_event_max_sample_rate to 3000
[Fri May 26 22:31:34 2023] CPU5 is up
[Fri May 26 22:31:34 2023] smpboot: Booting Node 0 Processor 6 APIC 0x5
[Fri May 26 22:32:14 2023] perf: interrupt took too long (71958 > 71222), lowering kernel.perf_event_max_sample_rate to 2000
[Fri May 26 22:32:16 2023] CPU6 is up
[Fri May 26 22:32:16 2023] smpboot: Booting Node 0 Processor 7 APIC 0x7
[Fri May 26 22:32:19 2023] CPU7 is up

Then i decided to disable before suspend and enable after wake up CPU 5, 6, 7

#!/bin/sh
echo "fix macbook wakeup"
case "$1/$2" in
  pre/*)
    echo "going to $2..."       
    echo 0 > /sys/devices/system/cpu/cpu5/online
    echo 0 > /sys/devices/system/cpu/cpu6/online
    echo 0 > /sys/devices/system/cpu/cpu7/online
    ;;
  post/*)
    echo "waking up from $2..."
    echo 1 > /sys/devices/system/cpu/cpu5/online
    echo 1 > /sys/devices/system/cpu/cpu6/online
    echo 1 > /sys/devices/system/cpu/cpu7/online
    ;;
esac

Now I’m considering to disable/enable all of them 1-7.

2 Likes