升级 macOS Monterey 后设备休眠半夜频繁唤醒问题

最近更新到了 macOS Monterey, 半夜总会被屏幕照醒,就觉得很诡异,以前也有过,但都是有通知的时候才会点亮屏幕,现在是没有任何理由的自己点亮,硬件还是那个硬件,那就应该是软件的锅了。

在网上查了一圈,先是找到了苹果官方的教程:https://support.apple.com/zh-cn/guide/mac-help/mchlp2995/mac

写的很详细,但显然是没有任何用处的……

于是继续深挖,还真找到了原因,使用命令 pmset -g log | grep DarkWake 就可以看到,在你睡觉的过程中,你的 Mac 并没有歇着……

看看输出,这几个比较典型,大部分都是这样的,一个 DarkWake, 一个 Wake, 两个仅仅相连,那么问题就出来了, DarkWake 是给电脑在后台唤醒来更新数据的,但不知怎么的,外设被触发,从而导致了全局唤醒。

我的一个笔记本就这样一夜掉电10%。

 

总之,我并不想要这个功能, 就那个 PowerNap,对我来说,我更希望它能给我多省点电,于是大概解决思路就这么多:关掉网络访问唤醒,关掉 PowerNap……不过问题来了,在 m1 设备上,其实是没有 PowerNap 选项的……(显然,苹果对自己的续航很有信心,但他们忽略了Bug的威力)

在 m1 芯片上,就算是连接电源的界面也没有 PowerNap 选项

在 m1 芯片上,就算是连接电源的界面也没有 PowerNap 选项

于是对于 PowerNap 这个功能来说,我们只能从命令行下手,首先使用 pmset -g 命令查看当前状态,找到 powernap 的值,如果不是 0 ,说明是启用的状态,使用命令 sudo pmset -a powernap 0 关掉它。

同时,还有另外一个 tcpkeepalive ,这个默认应该也不是 0 ,也要关掉,它决定了你的 rmbp 在休眠时是否要保持 tcp 连接——显然,保持的话就需要定时唤醒来联网了…… sudo pmset -a tcpkeepalive 0 ,执行这条命令会导致终端提示:

大概是说关了的话某些功能会受到限制,其实就是系统功能不能休眠时联网了,我相信真有人偷了你 Mac,它也连不上网的。

总之,两条命令下来,问题应该就解决了,但我找的资料中,还有一条是“关闭优化电源充电”,就那个“Optimized battery charging”,但我不确定这个会不会同样导致唤醒,并且我之前的老 15 寸也确实鼓包了两块电池了,我决定先试试开着它,如果还唤醒,再关掉好了。

总之,就这样,如果你读到这篇文章的时候我没来更新,那说明上述方案是有效的 :)


参考文献:
  • https://discussions.apple.com/thread/252061187
  • https://apple.stackexchange.com/questions/253776/macbook-pro-13-with-retina-display-consumes-10-battery-overnight-with-the-lid-c
  • https://discussions.apple.com/thread/252276065

本文由 落格博客 原创撰写:落格博客 » 升级 macOS Monterey 后设备休眠半夜频繁唤醒问题

转载请保留出处和原文链接:https://www.logcg.com/archives/3528.html

About the Author

R0uter

如非声明,本人所著文章均为原创手打,转载请注明本页面链接和我的名字。

Comments

  1. 太强了,感谢大佬的教程,我是遇到了锁屏后,点击下面的叉号,不能立即黑屏而是黑一下屏幕有亮了,这教程很给力!!!

  2. Thanks R0uter for the fast reply.
    Yeah, I also was searching for very long time for a fix but nothing really helped out.

    Mostly I also have it on the cable and when I know I don´t use it the next few hours I shut it down to save my battery.

    Maybe someday a fix from Apple will come but I´m not really sure because I had this issue also under MacOS 12

    Thank you anyway 🙂

  3. HEY Router,
    it doesn´t worked for me.

    I use the current MacOS Version 13.3.1

    My PMSet are:

    System-wide power settings:
    SleepDisabled 0
    Currently in use:
    standby 1
    Sleep On Power Button 1
    SleepServices 0
    hibernatefile /var/vm/sleepimage
    powernap 0
    networkoversleep 0
    disksleep 10
    sleep 1 (sleep prevented by powerd)
    hibernatemode 3
    ttyskeepawake 0
    displaysleep 2
    tcpkeepalive 0
    lowpowermode 1
    womp 0

    Overnight I lose around 10% of battery. 🙁
    No external devices are connected.

    When I use the command: “pmset -g log | grep DarkWake”
    I got this answer from the terminal:

    2023-04-15 23:02:22 +0200 DarkWake DarkWake from Deep Idle [CDN] : due to AOP.OutboxNotEmpty spu_queue_overflow_ep42/ Using BATT (Charge:81%) 45 secs
    2023-04-16 00:31:57 +0200 DarkWake DarkWake from Deep Idle [CDN] : due to AOP.OutboxNotEmpty spu_queue_overflow_ep42/ Using BATT (Charge:79%) 45 secs
    2023-04-16 02:07:36 +0200 DarkWake DarkWake from Deep Idle [CDN] : due to AOP.OutboxNotEmpty spu_queue_overflow_ep42/ Using BATT (Charge:77%) 45 secs
    2023-04-16 03:13:31 +0200 DarkWake DarkWake from Deep Idle [CDN] : due to NUB.SPMISw3IRQ nub-spmi0.0x02 rtc/Maintenance Using BATT (Charge:75%) 45 secs
    2023-04-16 04:48:44 +0200 DarkWake DarkWake from Deep Idle [CDN] : due to AOP.OutboxNotEmpty spu_queue_overflow_ep42/ Using BATT (Charge:75%) 45 secs
    2023-04-16 06:24:12 +0200 DarkWake DarkWake from Deep Idle [CDN] : due to AOP.OutboxNotEmpty spu_queue_overflow_ep42/ Using BATT (Charge:73%) 45 secs
    2023-04-16 07:59:21 +0200 DarkWake DarkWake from Deep Idle [CDN] : due to AOP.OutboxNotEmpty spu_queue_overflow_ep42/ Using BATT (Charge:71%) 45 secs
    2023-04-16 09:34:34 +0200 DarkWake DarkWake from Deep Idle [CDN] : due to AOP.OutboxNotEmpty spu_queue_overflow_ep42/ Using BATT (Charge:70%) 45 secs

    Maybe you can help me? 🙂

    Kind regards
    Thomas

    1. Sry man, I ve done some research for you but no luck. This one due to AOP.OutboxNotEmpty looks like persist. Some ppl work, but some don’t, really have no idea.
      For me, now I m using m1 mac so even it still eating my battery, it lasts long enough and now I m more plug it in as a desktop tho 😆

      Sry not helping….

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注