MacBook 提升电池效率的一些设置

虽然说Macbook电池能够撑爆很长时间,但是,对于电池来说,永远不够的。 下面一些设置,可减少合起盖子的时候的耗电。当然,你的其他部分功能会缺失。


使用 pmset 命令可以查看系统电源的管理设置

停用 AddressBookSour

看到这句 (sleep prevented by AddressBookSour) , 于是怀疑会不会是 AddressBook 应用引起的系统无法进入休眠状态.

查找了一些关于 AddressBook 的一些资料, 这其实是 Mac OS 用来同步联系人信息的工具, 同时因为这个工具出现很多系统问题.

这个工具对我来说也没有任何意义, 将其停用完事.

在 /System/Library/Frameworks/ 目录下进入 AddressBook.framework , 然后删除 Helpers 目录下的 即可. (不要将整个 AddressBook.framework 删除, 不然会导致 Finder 等应用无法正常工作)


现在执行 pmset -g 命令 (sleep prevented by AddressBookSour) 这句提示已经消失了:


停用 AddressBookSour 后, 发现合盖后系统还是无法立即进入休眠状态, 问题就出在休眠模式(hibermode)上.

设置系统 hibernatemode :



缩短上面的 standbydelay 时间,终端输入命令: sudo pmset -a standbydelay [你希望的秒数]。我改成了一个小时,因为我如果合上盖子之后一个多小时没有打开,我一般都是有事出去了,所以电脑两个小时就可以休眠了。

MacBook Pro 13 with Retina display consumes 10% battery overnight with the lid closed, is this normal?

The problem is the macOS continues to check for updates (including email, software, news, etc.) while your MacBook Pro is asleep. This means it's very quick to get up and running, but it also means your battery goes down.

To fix it, you can tell you MacBook Pro to disconnect from the Internet while it's a sleep.

To do this, you need to set the tcpkeepalive setting to 0.

Open up Terminal and type:

sudo pmset -b tcpkeepalive 0

After you enter your password for sudo it gives you a warning saying some features may not work properly. This is fine, it simply disables Internet access during sleep.

You can check it is set correctly by running:

pmset -g

Which should show "tcpkeepalive 0"

And you can of course reverse it at any time by running:

sudo pmset -b tcpkeepalive 1


Note: You can also force your Mac not to connect to the Internet when it's asleep even when connected to a power supply, if you like: sudo pmset -a tcpkeepalive 0. (Personally I don't mind as long as it's not using my battery, so -b is fine for me.)

The results from pmset -g will depend on if you MacBook Pro is connected to power or not. It will reflect the current tcpkeepalive setting, depending on its current power situation.