首页   注册   登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  macOS

Mac 一夜待机掉电 30%多

  •  
  •   hu6360567 · 2017-09-13 09:48:53 +08:00 · 3659 次点击
    这是一个创建于 619 天前的主题,其中的信息可能已经有所发展或是发生改变。

    一夜时间不停的唤醒,基本都是 Wake on TCP data

    这令人窒息的操作 http://ww1.sinaimg.cn/large/579e04e3ly1fjhoxxlle1j20hy0igta3.jpg

    > pmset -g log|grep wake
    
    ...
    ...
    2017-09-13 09:02:14 +0800 Assertions          	PID 51(powerd) Created InternalPreventSleep "Network wake delay proxy assertion" 00:00:00  id:0x0xd00009d17 [System: No Assertions]
    2017-09-13 09:02:44 +0800 Assertions          	PID 51(powerd) TimedOut InternalPreventSleep "Network wake delay proxy assertion" 00:00:30  id:0x0xd00009d17 [System: SRPrevSleep kCPU]
    2017-09-13 09:04:48 +0800 Assertions          	PID 51(powerd) Created InternalPreventSleep "Network wake delay proxy assertion" 00:00:00  id:0x0xd00009d27 [System: No Assertions]
    2017-09-13 09:05:18 +0800 Assertions          	PID 51(powerd) TimedOut InternalPreventSleep "Network wake delay proxy assertion" 00:00:30  id:0x0xd00009d27 [System: SRPrevSleep kCPU]
    2017-09-13 09:07:20 +0800 Assertions          	PID 51(powerd) Created InternalPreventSleep "Network wake delay proxy assertion" 00:00:00  id:0x0xd00009d37 [System: No Assertions]
    2017-09-13 09:07:50 +0800 Assertions          	PID 51(powerd) TimedOut InternalPreventSleep "Network wake delay proxy assertion" 00:00:30  id:0x0xd00009d37 [System: SRPrevSleep kCPU]
    2017-09-13 09:09:39 +0800 Assertions          	PID 51(powerd) Created InternalPreventSleep "Network wake delay proxy assertion" 00:00:00  id:0x0xd00009d45 [System: No Assertions]
    2017-09-13 09:10:09 +0800 Assertions          	PID 51(powerd) TimedOut InternalPreventSleep "Network wake delay proxy assertion" 00:00:30  id:0x0xd00009d45 [System: SRPrevSleep kCPU]
    2017-09-13 09:12:14 +0800 Assertions          	PID 51(powerd) Created InternalPreventSleep "Network wake delay proxy assertion" 00:00:00  id:0x0xd00009d55 [System: No Assertions]
    2017-09-13 09:12:44 +0800 Assertions          	PID 51(powerd) TimedOut InternalPreventSleep "Network wake delay proxy assertion" 00:00:30  id:0x0xd00009d55 [System: SRPrevSleep kCPU]
    2017-09-13 09:14:48 +0800 Assertions          	PID 51(powerd) Created InternalPreventSleep "Network wake delay proxy assertion" 00:00:00  id:0x0xd00009d66 [System: No Assertions]
    2017-09-13 09:15:18 +0800 Assertions          	PID 51(powerd) TimedOut InternalPreventSleep "Network wake delay proxy assertion" 00:00:30  id:0x0xd00009d66 [System: SRPrevSleep kCPU]
    2017-09-13 09:17:21 +0800 Assertions          	PID 51(powerd) Created InternalPreventSleep "Network wake delay proxy assertion" 00:00:00  id:0x0xd00009d75 [System: No Assertions]
    2017-09-13 09:17:51 +0800 Assertions          	PID 51(powerd) TimedOut InternalPreventSleep "Network wake delay proxy assertion" 00:00:30  id:0x0xd00009d75 [System: SRPrevSleep kCPU]
    
    log show --last 1h|grep -i "wake reason"
    
    ...
    ...
    2017-09-13 09:00:17.004589+0800 0x73       Default     0x0                  0      kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)
    2017-09-13 09:00:17.004590+0800 0x73       Default     0x0                  0      kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)
    2017-09-13 09:02:13.368452+0800 0x138990   Default     0x0                  0      kernel: (AirPortBrcm4360) ARPT: 24488.933284: ARPT: Wake Reason: Wake on TCP Data
    2017-09-13 09:02:14.087715+0800 0x73       Default     0x0                  0      kernel: (AirPortBrcm4360) ARPT: 24489.652548: ARPT: Wake Reason: Wake on TCP Data
    2017-09-13 09:02:14.160176+0800 0x13897c   Default     0x0                  0      kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
    2017-09-13 09:02:51.008337+0800 0x73       Default     0x0                  0      kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)
    2017-09-13 09:02:51.008339+0800 0x73       Default     0x0                  0      kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)
    2017-09-13 09:04:47.365485+0800 0x139258   Default     0x0                  0      kernel: (AirPortBrcm4360) ARPT: 24526.945705: ARPT: Wake Reason: Wake on TCP Data
    2017-09-13 09:04:48.090161+0800 0x73       Default     0x0                  0      kernel: (AirPortBrcm4360) ARPT: 24527.669956: ARPT: Wake Reason: Wake on TCP Data
    2017-09-13 09:04:48.158642+0800 0x13924e   Default     0x0                  0      kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
    2017-09-13 09:05:24.986493+0800 0x73       Default     0x0                  0      kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)
    2017-09-13 09:05:24.986495+0800 0x73       Default     0x0                  0      kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)
    2017-09-13 09:07:19.364717+0800 0x139af9   Default     0x0                  0      kernel: (AirPortBrcm4360) ARPT: 24564.938818: ARPT: Wake Reason: Wake on TCP Data
    2017-09-13 09:07:20.086609+0800 0x73       Default     0x0                  0      kernel: (AirPortBrcm4360) ARPT: 24565.660712: ARPT: Wake Reason: Wake on TCP Data
    2017-09-13 09:07:20.157641+0800 0x139af6   Default     0x0                  0      kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
    2017-09-13 09:07:56.993356+0800 0x73       Default     0x0                  0      kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)
    2017-09-13 09:07:56.993358+0800 0x73       Default     0x0                  0      kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)
    2017-09-13 09:09:38.362418+0800 0x13a36e   Default     0x0                  0      kernel: (AirPortBrcm4360) ARPT: 24602.936955: ARPT: Wake Reason: Wake on Scan offload; Disconnect reason: Class 3 frame received from nonassociated STA
    2017-09-13 09:09:39.093391+0800 0x73       Default     0x0                  0      kernel: (AirPortBrcm4360) ARPT: 24603.667932: ARPT: Wake Reason: Wake on Scan offload
    2017-09-13 09:09:39.164285+0800 0x13a575   Default     0x0                  0      kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
    2017-09-13 09:10:15.998291+0800 0x73       Default     0x0                  0      kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)
    2017-09-13 09:10:15.998292+0800 0x73       Default     0x0                  0      kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)
    2017-09-13 09:12:13.362651+0800 0x13abe8   Default     0x0                  0      kernel: (AirPortBrcm4360) ARPT: 24640.942554: ARPT: Wake Reason: Wake on TCP Data
    2017-09-13 09:12:14.093345+0800 0x73       Default     0x0                  0      kernel: (AirPortBrcm4360) ARPT: 24641.673249: ARPT: Wake Reason: Wake on TCP Data
    2017-09-13 09:12:14.166800+0800 0x13abe1   Default     0x0                  0      kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
    2017-09-13 09:12:50.997403+0800 0x73       Default     0x0                  0      kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)
    2017-09-13 09:12:50.997405+0800 0x73       Default     0x0                  0      kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)
    2017-09-13 09:14:47.369067+0800 0x13b466   Default     0x0                  0      kernel: (AirPortBrcm4360) ARPT: 24678.953449: ARPT: Wake Reason: Wake on TCP Data
    2017-09-13 09:14:48.082384+0800 0x73       Default     0x0                  0      kernel: (AirPortBrcm4360) ARPT: 24679.666768: ARPT: Wake Reason: Wake on TCP Data
    2017-09-13 09:14:48.154034+0800 0x13b4cd   Default     0x0                  0      kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
    2017-09-13 09:15:24.989082+0800 0x73       Default     0x0                  0      kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)
    2017-09-13 09:15:24.989083+0800 0x73       Default     0x0                  0      kernel: (AppleACPIPlatform) Wake reason: ARPT (Network)
    2017-09-13 09:17:20.361235+0800 0x13bd12   Default     0x0                  0      kernel: (AirPortBrcm4360) ARPT: 24716.941766: ARPT: Wake Reason: Wake on TCP Data
    2017-09-13 09:17:21.089504+0800 0x73       Default     0x0                  0      kernel: (AirPortBrcm4360) ARPT: 24717.670035: ARPT: Wake Reason: Wake on TCP Data
    2017-09-13 09:17:21.160259+0800 0x13bd15   Default     0x0                  0      kernel: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
    
    4 回复  |  直到 2018-10-07 08:47:17 +08:00
        1
    tyhunter   2017-09-13 10:20:59 +08:00
    可以看下这个帖子 https://www.v2ex.com/t/275936 里面的回复
    我前几天也发现睡一夜会掉 10%左右
    昨天按照帖子里的改了现在掉 2%左右
        2
    qinix   2017-09-13 11:10:41 +08:00 via iPhone
    关掉 QQ
        3
    nyanyh   2017-09-13 13:55:16 +08:00   ♥ 1
    有两种办法
    1.
    1) 关闭 SIP,进入系统开启终端

    2) cd /System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/X86PlatformPlugin.kext/Contents/Resources

    3) 通过 ioreg -l | grep board-id 查看型号,然后编辑这个目录下的同名文件
    4) 修改
    <key>TCPKeepAliveDuringSleep</key>
    <true/>

    中的 true 为 false,保存文件

    5) 重启,开启 SIP


    2.
    开启终端,输入 sudo pmset -b tcpkeepalive 0
        4
    madao100   230 天前
    @nyanyh 已修改 测试一下
    关于   ·   FAQ   ·   API   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   2323 人在线   最高记录 5043   ·  
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.3 · 18ms · UTC 14:12 · PVG 22:12 · LAX 07:12 · JFK 10:12
    ♥ Do have faith in what you're doing.
    沪ICP备16043287号-1